diff --git a/assets/ChallengeView-AzuLivC-.js b/assets/ChallengeView-AzuLivC-.js deleted file mode 100644 index dca9de0..0000000 --- a/assets/ChallengeView-AzuLivC-.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as x}from"./nft0-jw9de1Qy.js";import{_ as f,o as c,c as v,a,b,r as w,n as e,F as m,d as h,e as o,f as p}from"./index-Bv24iQuQ.js";const y="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",_="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",u="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",C={class:"modal"},k={__name:"ChallengeModal",emits:["closeModal"],setup(r,{emit:i}){const d=i,l=()=>{d("closeModal")};return(n,s)=>(c(),v("div",C,[a("div",{class:"modal-container"},[s[1]||(s[1]=a("div",{class:"modal-title-text"},"Challenge",-1)),a("div",{class:"modal-wrapper"},[a("div",{class:"close-wrapper"},[a("img",{src:u,alt:"close",onClick:l})]),s[0]||(s[0]=b('
Question
Submit
Answer
PK
Submit
',2))])])]))}},M=f(k,[["__scopeId","data-v-467a5cb9"]]),S={class:"modal"},D={__name:"CreateModal",emits:["closeCreateModal"],setup(r,{emit:i}){const d=i,l=()=>{d("closeCreateModal")};return(n,s)=>(c(),v("div",S,[a("div",{class:"modal-container"},[s[1]||(s[1]=a("div",{class:"title-text"},"Get started with a CTP",-1)),a("div",{class:"modal-wrapper"},[a("div",{class:"close-wrapper"},[a("img",{src:u,alt:"close",onClick:l})]),s[0]||(s[0]=b('
About you
Name
Description
Date
Award
USDC
type
Secret
Slang
Prompt
Secret
Submit
',2))])])]))}},A=f(D,[["__scopeId","data-v-f5c0c023"]]),B={key:0,class:"challenge"},P={class:"challenge-wrapper"},T={class:"challenge-live-filter"},U={class:"challenge-type-filter-wrapper"},$={class:"challenge-type-filter"},q={class:"nfts"},N={class:"nft-wrapper"},L={class:"pagination"},V={class:"pagination-wrapper"},E={class:"number-wrapper"},F={__name:"ChallengePage",setup(r){const i=w(!1),d=w(!1),l=()=>{i.value=!0},n=()=>{i.value=!1},s=()=>{d.value=!0},g=()=>{d.value=!1};return(I,t)=>(c(),v(m,null,[!i.value&&!d.value?(c(),v("div",B,[a("div",P,[t[8]||(t[8]=a("div",{class:"challenge-title-text"},"Challenge",-1)),a("div",T,[a("div",{class:e(["challenge-live-filter-btn",{"is-live-active":!0}])}," All "),a("div",{class:e(["challenge-live-filter-btn",{"is-live-active":!1}])}," Live "),a("div",{class:e(["challenge-live-filter-btn",{"is-live-active":!1}])}," End ")]),a("div",U,[a("div",$,[a("div",{class:e(["challenge-type-filter-btn",{"is-type-active":!0}])},[a("div",{class:e(["challenge-type-filter-btn-text",{"is-type-text-active":!0}])}," All Type ")]),a("div",{class:e(["challenge-type-filter-btn",{"is-type-active":!1}])},[a("div",{class:e(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Secret ")]),a("div",{class:e(["challenge-type-filter-btn",{"is-type-active":!1}])},[a("div",{class:e(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Slang ")]),a("div",{class:e(["challenge-type-filter-btn",{"is-type-active":!1}])},[a("div",{class:e(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Missmatch ")])]),a("div",{class:"challenge-create-new-btn",onClick:s}," +Create New Challange ")]),a("div",q,[(c(),v(m,null,h(6,(z,K)=>a("div",N,[t[1]||(t[1]=b('
nft
Live
MG12 Prompt
Secret
The first modular settlement layer designed to unlock Bitcoin's liquidity across diverse blockchain ecosystems.
Date
08.30 5:00 AM(UST)
~ 09.13 5:00 AM(UST)
Duration
14 days
Award
6,000 USDC
',1)),a("div",{class:"nft-btn",onClick:l},t[0]||(t[0]=[a("div",{class:"nft-btn-text"},"Challenge",-1)]))])),64))]),a("div",L,[a("div",V,[t[6]||(t[6]=a("img",{src:y,alt:"left"},null,-1)),a("div",E,[a("div",{class:e(["number-text",{"is-pagination-active":!0}])}," 1 "),t[2]||(t[2]=a("div",{class:"number-text"},"2",-1)),t[3]||(t[3]=a("div",{class:"number-text"},"3",-1)),t[4]||(t[4]=a("div",{class:"number-text"},"4",-1)),t[5]||(t[5]=a("div",{class:"number-text"},"5",-1))]),t[7]||(t[7]=a("img",{src:_,alt:"right"},null,-1))])])])])):o("",!0),i.value?(c(),p(M,{key:1,onCloseModal:n})):o("",!0),d.value?(c(),p(A,{key:2,onCloseCreateModal:g})):o("",!0)],64))}},G=f(F,[["__scopeId","data-v-2b6aa05c"]]),H={__name:"ChallengeView",setup(r){return(i,d)=>(c(),p(G))}};export{H as default}; diff --git a/assets/ChallengeView-Cm0XRX0k.js b/assets/ChallengeView-Cm0XRX0k.js new file mode 100644 index 0000000..d9a4d42 --- /dev/null +++ b/assets/ChallengeView-Cm0XRX0k.js @@ -0,0 +1 @@ +import{_ as N,u as J,a as z,b as L,r as p,o as w,c as C,d as t,t as c,w as _,v as h,e as j,B as R,J as Z,C as U,Z as q,k as V,f as G,p as Q,g as H,h as K,n as v,F as P,i as X,j as T,l as I,m as Y}from"./index-ZXgCnnEa.js";import{c as M,G as tt,U as et,B as st,g as at}from"./gameView-BAOQfz90.js";BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");BigInt("1000000000000000000");const it=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1);BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const nt="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",lt="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",E="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",ot={class:"modal"},dt={class:"modal-container"},rt={class:"modal-wrapper"},ct={class:"modal-info"},ft={class:"modal-info-top"},vt=["src"],pt={class:"modal-info-title-wrapper"},ut={class:"title-wrapper"},wt={class:"title-text"},mt={class:"type-wrapper"},gt={class:"type-text"},xt={class:"title-description"},_t={class:"modal-info-bottom"},ht={class:"details-title-wrapper"},yt={class:"details-content-text"},bt={class:"details-title-wrapper"},$t={class:"details-content-text"},Ct={class:"details-title-wrapper"},Dt={class:"details-content-text"},kt={class:"details-title-wrapper"},St={class:"details-award-text"},Mt={class:"bottom-wrapper"},At={class:"question-wrapper"},Bt={class:"question-content-wrapper"},Ut={class:"submit-btn"},Tt={class:"answer-wrapper"},It={class:"answer-content-wrapper"},Nt={class:"answer-content-input"},Vt={__name:"ChallengeModal",props:{nft:{type:Object,required:!0}},emits:["closeModal"],setup(l,{emit:o}){J(),z();const{address:d,chainId:r,isConnected:f}=L(),y=o,m=p(""),x=p(""),b=async()=>{const n="https://ib9fm6yjjg.execute-api.ap-northeast-2.amazonaws.com/ctp/gpt",e={user:d.value,nft:M.contracts.Badge,prompt:m.value};try{const i=await(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();console.log(i.message),x.value=i.message}catch(a){console.error("Error:",a)}},k=()=>{y("closeModal")},$=n=>new Date(n*1e3).toLocaleString("en-US",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),D=(n,e)=>{const i=(e-n)/(60*60*24);return Math.round(i)},s=n=>(n/1e18).toFixed(2);return(n,e)=>(w(),C("div",ot,[t("div",dt,[e[11]||(e[11]=t("div",{class:"modal-title-text"},"Challenge",-1)),t("div",rt,[t("div",{class:"close-wrapper"},[t("img",{src:E,alt:"close",onClick:k})]),t("div",ct,[t("div",ft,[t("img",{src:l.nft.imageUri||"@/assets/nft/0.png",alt:"nft"},null,8,vt),t("div",pt,[e[2]||(e[2]=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",ut,[t("div",wt,c(l.nft.name),1),t("div",mt,[t("div",gt,c(l.nft.gameType),1)]),t("div",xt,c(l.nft.description),1)])])]),t("div",_t,[t("div",ht,[e[3]||(e[3]=t("div",{class:"details-title-text"},"Start Date",-1)),t("div",yt,c($(l.nft.startDate)),1)]),t("div",bt,[e[4]||(e[4]=t("div",{class:"details-title-text"},"End Date",-1)),t("div",$t,c($(l.nft.endDate)),1)]),t("div",Ct,[e[5]||(e[5]=t("div",{class:"details-title-text"},"Duration",-1)),t("div",Dt,c(D(l.nft.startDate,l.nft.endDate))+" days ",1)]),t("div",kt,[e[6]||(e[6]=t("div",{class:"details-award-text"},"Awards",-1)),t("div",St,c(s(l.nft.awards))+" in USDC ",1)])])]),t("div",Mt,[t("div",At,[e[7]||(e[7]=t("div",{class:"question-title-text"},"Question",-1)),t("div",Bt,[_(t("input",{class:"question-content-input",type:"text","onUpdate:modelValue":e[0]||(e[0]=a=>m.value=a)},null,512),[[h,m.value]]),t("div",Ut,[t("div",{class:"submit-text",onClick:e[1]||(e[1]=a=>b())},"Submit")])])]),t("div",Tt,[e[9]||(e[9]=t("div",{class:"answer-title-text"},"Answer",-1)),t("div",It,[t("div",Nt,c(x.value),1),e[8]||(e[8]=t("div",{class:"empty-box"},null,-1))])]),e[10]||(e[10]=j('
Secret
Submit
',1))])])])]))}},Gt=N(Vt,[["__scopeId","data-v-e0f1d953"]]);let g,A,u={Game:void 0,Award:void 0,Badge:void 0};const F={gasPrice:"100000000001"};async function W(l){if(!g)try{g=new R(l)}catch(o){console.log(o),g=new Z(M.rpc)}console.log(g),A=await g.getSigner(),u.Game||(u.Game=new U(M.contracts.Game,tt.abi,g)),u.Award||(u.Award=new U(M.contracts.Award,et.abi,g)),u.Badge||(u.Badge=new U(M.contracts.Badge,st.abi,g))}function Pt(l){return new Promise(o=>setTimeout(o,l))}async function O(l){for(let d=0;d<10;d++){const r=await g.getTransactionReceipt(l);if(r)return r.status==1;await Pt(1e3)}return!1}async function Lt(l){await W(l);let o=await u.Award.connect(A).allowance(A.address,await u.Game.getAddress());if(console.log(o),o==0)try{let d=await u.Award.connect(A).approve(await u.Game.getAddress(),it,{...F});return await O(d.hash),d}catch(d){console.error(d);return}}async function jt(l,o,d,r){await W(l),console.log(o),console.log(d),console.log(r);try{let f=await u.Game.connect(A).mint(o,d,r,{...F});return await O(f.hash),f}catch(f){console.error(f);return}}const qt={class:"modal"},Et={class:"modal-container"},Ft={class:"modal-wrapper"},Wt={class:"content-wrapper"},Ot={class:"content-left-wrapper"},Jt={class:"name-wrapper"},zt={class:"description-wrapper"},Rt={class:"date-wrapper"},Zt={class:"date-input-wrapper"},Qt={class:"award-wrapper"},Ht={class:"award-input-wrapper"},Kt={class:"content-right-wrapper"},Xt={class:"description-wrapper"},Yt={class:"name-wrapper"},te={__name:"CreateModal",emits:["closeCreateModal"],setup(l,{emit:o}){const d=o,r=p({name:"",description:"",award:"",gameType:"secret",prompt:"",secret:"",start:0,end:0,winner:q}),f=p(""),y=p(""),m=p(""),x=p(""),b=p(""),k=()=>{d("closeCreateModal")},$=async()=>{r.value.start=new Date(x.value).getTime()/1e3,r.value.end=new Date(b.value).getTime()/1e3,r.value.prompt=V(G(y.value)),r.value.secret=V(G(m.value));const D=Q(f.value,18),{walletProvider:s}=H(),{address:n,chainId:e,isConnected:a}=L();await Lt(s.value),await jt(s.value,n.value,r.value,D)};return(D,s)=>(w(),C("div",qt,[t("div",Et,[s[18]||(s[18]=t("div",{class:"title-text"},"Get started with a CTP",-1)),t("div",Ft,[t("div",{class:"close-wrapper"},[t("img",{src:E,alt:"close",onClick:k})]),s[17]||(s[17]=t("div",{class:"about-wrapper"},[t("div",{class:"about-text"},"Create A New Challenge")],-1)),t("div",Wt,[t("div",Ot,[t("div",Jt,[s[7]||(s[7]=t("div",{class:"name-text"},"Name",-1)),_(t("input",{class:"name-input","onUpdate:modelValue":s[0]||(s[0]=n=>r.value.name=n),placeholder:"Name",type:"text"},null,512),[[h,r.value.name]])]),t("div",zt,[s[8]||(s[8]=t("div",{class:"description-text"},"Description",-1)),_(t("input",{class:"description-input","onUpdate:modelValue":s[1]||(s[1]=n=>r.value.description=n),placeholder:"Description",type:"text"},null,512),[[h,r.value.description]])]),t("div",Rt,[s[9]||(s[9]=t("div",{class:"date-text"},"Date",-1)),t("div",Zt,[_(t("input",{class:"date-input","onUpdate:modelValue":s[2]||(s[2]=n=>x.value=n),type:"date"},null,512),[[h,x.value]]),_(t("input",{class:"date-input","onUpdate:modelValue":s[3]||(s[3]=n=>b.value=n),type:"date"},null,512),[[h,b.value]])])]),t("div",Qt,[s[11]||(s[11]=t("div",{class:"award-text"},"Award",-1)),t("div",Ht,[_(t("input",{class:"award-input","onUpdate:modelValue":s[4]||(s[4]=n=>f.value=n),type:"text"},null,512),[[h,f.value]]),s[10]||(s[10]=t("div",{class:"usdc-wrapper"},[t("div",{class:"usdc-text"},"USDC")],-1))])])]),t("div",Kt,[s[16]||(s[16]=j('
Type
Secret
',1)),t("div",Xt,[s[12]||(s[12]=t("div",{class:"description-text"},"Prompt",-1)),_(t("input",{class:"description-input","onUpdate:modelValue":s[5]||(s[5]=n=>y.value=n),placeholder:"Prompt",type:"text"},null,512),[[h,y.value]])]),t("div",Yt,[s[13]||(s[13]=t("div",{class:"name-text"},"Secret",-1)),_(t("input",{class:"name-input","onUpdate:modelValue":s[6]||(s[6]=n=>m.value=n),placeholder:"Secret",type:"text"},null,512),[[h,m.value]])]),t("div",{class:"submit-wrapper"},[s[15]||(s[15]=t("div",{class:"empty-text"},null,-1)),t("div",{class:"submit-btn-wrapper",onClick:$},s[14]||(s[14]=[t("div",{class:"submit-btn-text"},"Submit",-1)]))])])])])])]))}},ee=N(te,[["__scopeId","data-v-e503df94"]]),se={key:0,class:"challenge"},ae={class:"challenge-wrapper"},ie={class:"challenge-live-filter"},ne={class:"challenge-type-filter-wrapper"},le={class:"challenge-type-filter"},oe={class:"nfts"},de={class:"nft-content-wrapper"},re={class:"nft-content-top-wrapper"},ce=["src"],fe={class:"nft-content-top-title-wrapper"},ve={class:"live-wrapper"},pe={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},ue=["fill"],we={class:"live-text"},me={class:"live-title-wrapper"},ge={class:"live-title-text"},xe={class:"type-wrapper"},_e={class:"type-text"},he={class:"nft-description"},ye={class:"nft-date-wrapper"},be={class:"nft-date-content-wrapper"},$e={class:"nft-date-content-text"},Ce={class:"nft-date-content-text"},De={class:"nft-duration-wrapper"},ke={class:"nft-duration-content-text"},Se={class:"nft-award-wrapper"},Me={class:"nft-award-content-text"},Ae=["onClick"],Be={class:"nft-btn-text"},Ue={class:"pagination"},Te={class:"pagination-wrapper"},Ie={class:"number-wrapper"},Ne={__name:"ChallengePage",setup(l){const o=p(!1),d=p(!1),r=p(null),f=p([]),y=e=>{r.value=e,o.value=!0},m=()=>{o.value=!1},x=()=>{d.value=!0},b=()=>{d.value=!1},k=async()=>{const e=await at(0,12);f.value=e.map(a=>{const i=a[8],B=Math.floor(Date.now()/1e3);console.log(i);let S="Live";return i.toLowerCase()==="0xffffffffffffffffffffffffffffffffffffffff"?S="Verified":i!==q?S="Solved":B>Number(a[6])&&(S="End"),{status:S,winnerAddress:i,id:a[0],name:a[1],description:a[2],gameType:a[3],imageUri:a[4],startDate:Number(a[5]),endDate:Number(a[6]),awards:Number(a[7])}}).reverse(),console.log(f.value)},$=e=>new Date(e*1e3).toLocaleString("en-US",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),D=(e,a)=>{const B=(a-e)/(60*60*24);return Math.round(B)},s=e=>Y(e.toString(),18),n=e=>e&&`Winner: ${e.slice(0,6)}...${e.slice(-4)}`;return K(()=>{k()}),(e,a)=>(w(),C(P,null,[!o.value&&!d.value?(w(),C("div",se,[t("div",ae,[a[9]||(a[9]=t("div",{class:"challenge-title-text"},"Challenges",-1)),t("div",ie,[t("div",{class:v(["challenge-live-filter-btn",{"is-live-active":!0}])}," All "),t("div",{class:v(["challenge-live-filter-btn",{"is-live-active":!1}])}," Live "),t("div",{class:v(["challenge-live-filter-btn",{"is-live-active":!1}])}," End ")]),t("div",ne,[t("div",le,[t("div",{class:v(["challenge-type-filter-btn",{"is-type-active":!0}])},[t("div",{class:v(["challenge-type-filter-btn-text",{"is-type-text-active":!0}])}," All Type ")]),t("div",{class:v(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:v(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Secret ")]),t("div",{class:v(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:v(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Slang ")]),t("div",{class:v(["challenge-type-filter-btn",{"is-type-active":!1}])},[t("div",{class:v(["challenge-type-filter-btn-text",{"is-type-text-active":!1}])}," Missmatch ")])]),t("div",{class:"challenge-create-new-btn",onClick:x}," + Create A New Challange ")]),t("div",oe,[(w(!0),C(P,null,X(f.value,(i,B)=>(w(),C("div",{key:i.id,class:"nft-wrapper"},[t("div",de,[t("div",re,[t("img",{src:i.imageUri?i.imageUri:"@/assets/nft/0.png",alt:"nft"},null,8,ce),t("div",fe,[t("div",ve,[(w(),C("svg",pe,[t("circle",{cx:"6",cy:"6.02026",r:"5.5",fill:i.status==="Live"?"#53926D":"#CC0000"},null,8,ue)])),t("div",we,c(i.status==="Live"?"Live":"End"),1)]),t("div",me,[t("div",ge,c(i.name),1),t("div",xe,[t("div",_e,c(i.gameType),1)])])])]),t("div",he,c(i.description),1),t("div",ye,[a[0]||(a[0]=t("div",{class:"nft-date-text"},"Date",-1)),t("div",be,[t("div",$e,c($(i.startDate)),1),t("div",Ce," ~ "+c($(i.endDate)),1)])]),t("div",De,[a[1]||(a[1]=t("div",{class:"nft-duration-text"},"Duration",-1)),t("div",ke,c(D(i.startDate,i.endDate))+" days ",1)]),t("div",Se,[a[2]||(a[2]=t("div",{class:"nft-award-text"},"Award",-1)),t("div",Me,c(s(i.awards))+" USDC ",1)])]),t("div",{class:v(["nft-btn",{disabled:i.status==="Solved"}]),onClick:S=>i.status!=="Solved"&&y(i)},[t("div",Be,c(i.status==="Solved"?n(i.winnerAddress):i.status==="Verified"?"Verified":"Challenge"),1)],10,Ae)]))),128))]),t("div",Ue,[t("div",Te,[a[7]||(a[7]=t("img",{src:nt,alt:"left"},null,-1)),t("div",Ie,[t("div",{class:v(["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:lt,alt:"right"},null,-1))])])])])):T("",!0),o.value?(w(),I(Gt,{key:1,nft:r.value,onCloseModal:m},null,8,["nft"])):T("",!0),d.value?(w(),I(ee,{key:2,onCloseCreateModal:b})):T("",!0)],64))}},Ve=N(Ne,[["__scopeId","data-v-cec673dd"]]),Le={__name:"ChallengeView",setup(l){return(o,d)=>(w(),I(Ve))}};export{Le as default}; diff --git a/assets/ChallengeView-BujYrqIM.css b/assets/ChallengeView-CzpuoxQi.css similarity index 54% rename from assets/ChallengeView-BujYrqIM.css rename to assets/ChallengeView-CzpuoxQi.css index 91f7b40..609eaab 100644 --- a/assets/ChallengeView-BujYrqIM.css +++ b/assets/ChallengeView-CzpuoxQi.css @@ -1 +1 @@ -.modal[data-v-467a5cb9]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-467a5cb9]{display:flex;width:944px;flex-direction:column;align-items:flex-start;gap:22px}.modal-title-text[data-v-467a5cb9]{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-467a5cb9]{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-467a5cb9]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper[data-v-467a5cb9]{cursor:pointer}.modal-info[data-v-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.modal-info-top[data-v-467a5cb9]{display:flex;padding:10px 43px;align-items:center;gap:18px;align-self:stretch}.modal-info-top img[data-v-467a5cb9]{width:138px;height:138px;border-radius:10px;border:2px solid #000}.modal-info-title-wrapper[data-v-467a5cb9]{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-467a5cb9]{display:flex;align-items:center;gap:4px}.live-text[data-v-467a5cb9]{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-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.title-text[data-v-467a5cb9]{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-467a5cb9]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000}.type-text[data-v-467a5cb9]{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-467a5cb9]{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-467a5cb9]{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-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.details-title-text[data-v-467a5cb9]{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-467a5cb9]{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-467a5cb9]{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-467a5cb9]{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-467a5cb9]{display:flex;padding:20px 41px;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.question-wrapper[data-v-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.question-title-text[data-v-467a5cb9]{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-467a5cb9]{display:flex;justify-content:flex-end;align-items:flex-end;gap:12px;align-self:stretch}.question-content-input[data-v-467a5cb9]{height:80px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.submit-btn[data-v-467a5cb9]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d}.submit-text[data-v-467a5cb9]{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-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.answer-title-text[data-v-467a5cb9]{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-wrapper[data-v-467a5cb9]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.answer-content-input[data-v-467a5cb9]{height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.empty-box[data-v-467a5cb9]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px}.pk-wrapper[data-v-467a5cb9]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.pk-title-text[data-v-467a5cb9]{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-467a5cb9]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.pk-content-input[data-v-467a5cb9]{height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.modal[data-v-f5c0c023]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-f5c0c023]{display:flex;flex-direction:column;align-items:flex-start;gap:22px}.title-text[data-v-f5c0c023]{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-f5c0c023]{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-f5c0c023]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper img[data-v-f5c0c023]{cursor:pointer}.about-wrapper[data-v-f5c0c023]{display:flex;padding:0 43px;align-items:center;gap:3px;align-self:stretch}.about-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;padding:32px 43px;align-items:flex-start;gap:60px;align-self:stretch}.content-left-wrapper[data-v-f5c0c023]{display:flex;width:448px;flex-direction:column;align-items:flex-start;gap:20px;flex:1 0 0}.name-wrapper[data-v-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.name-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;height:24px;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}.description-wrapper[data-v-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.description-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;height:201px;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}.date-wrapper[data-v-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.date-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.date-input[data-v-f5c0c023]{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;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-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;align-self:stretch}.award-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.award-input[data-v-f5c0c023]{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}.usdc-wrapper[data-v-f5c0c023]{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-f5c0c023]{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-f5c0c023]{display:flex;width:448px;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.type-wrapper[data-v-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.type-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.type-content-wrapper[data-v-f5c0c023]{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}.type-content-text[data-v-f5c0c023]{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-f5c0c023]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:16px}.empty-text[data-v-f5c0c023]{height:20px}.submit-btn-wrapper[data-v-f5c0c023]{display:flex;height:40px;padding:8px 30px;text-align:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;box-sizing:border-box}.submit-btn-text[data-v-f5c0c023]{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-2b6aa05c]{display:flex;flex-direction:column;align-items:center;gap:30px}.challenge-wrapper[data-v-2b6aa05c]{display:flex;width:1004px;flex-direction:column;align-items:flex-start;gap:20px}.challenge-title-text[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.challenge-live-filter-btn[data-v-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.challenge-type-filter[data-v-2b6aa05c]{display:flex;align-items:center;gap:10px}.challenge-type-filter-btn[data-v-2b6aa05c]{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-2b6aa05c]{border-radius:20px;border:2px solid #000;background:#f5f3f3}.challenge-type-filter-btn-text[data-v-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{display:flex;align-items:center;align-content:center;gap:16px;align-self:stretch;flex-wrap:wrap}.nft-wrapper[data-v-2b6aa05c]{display:flex;width:280px;padding:24px 20px;flex-direction:column;align-items:center;gap:20px;border-radius:20px;border:2px solid #000;background:#f5f3f3}.nft-content-wrapper[data-v-2b6aa05c]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.nft-content-top-wrapper[data-v-2b6aa05c]{display:flex;align-items:center;gap:18px;align-self:stretch}.nft-content-top-wrapper img[data-v-2b6aa05c]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-content-top-title-wrapper[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;align-items:center;gap:4px}.live-text[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.live-title-text[data-v-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.nft-date-content-text[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-duration-text[data-v-2b6aa05c]{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-2b6aa05c]{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-2b6aa05c]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-award-text[data-v-2b6aa05c]{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-2b6aa05c]{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}.nft-btn[data-v-2b6aa05c]{display:flex;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer}.nft-btn-text[data-v-2b6aa05c]{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-2b6aa05c]{display:flex;justify-content:center;align-items:center;align-self:stretch}.pagination-wrapper[data-v-2b6aa05c]{display:flex;align-items:center;gap:30px}.pagination-wrapper img[data-v-2b6aa05c]{cursor:pointer}.number-wrapper[data-v-2b6aa05c]{display:flex;align-items:center;gap:10px}.number-text[data-v-2b6aa05c]{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-2b6aa05c]{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-e0f1d953]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-e0f1d953]{display:flex;width:944px;flex-direction:column;align-items:flex-start;gap:22px}.modal-title-text[data-v-e0f1d953]{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-e0f1d953]{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-e0f1d953]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper[data-v-e0f1d953]{cursor:pointer}.modal-info[data-v-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.modal-info-top[data-v-e0f1d953]{display:flex;padding:10px 43px;align-items:center;gap:18px;align-self:stretch}.modal-info-top img[data-v-e0f1d953]{width:138px;height:138px;border-radius:10px;border:2px solid #000}.modal-info-title-wrapper[data-v-e0f1d953]{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-e0f1d953]{display:flex;align-items:center;gap:4px}.live-text[data-v-e0f1d953]{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-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.title-text[data-v-e0f1d953]{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-e0f1d953]{display:flex;padding:6px 10px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:1px solid #000}.type-text[data-v-e0f1d953]{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-e0f1d953]{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-e0f1d953]{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-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.details-title-text[data-v-e0f1d953]{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-e0f1d953]{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-e0f1d953]{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-e0f1d953]{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-e0f1d953]{display:flex;padding:20px 41px;flex-direction:column;align-items:flex-start;gap:20px;align-self:stretch}.question-wrapper[data-v-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.question-title-text[data-v-e0f1d953]{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-e0f1d953]{display:flex;justify-content:flex-end;align-items:flex-end;gap:12px;align-self:stretch}.question-content-input[data-v-e0f1d953]{height:80px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.submit-btn[data-v-e0f1d953]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d}.submit-text[data-v-e0f1d953]{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-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.answer-title-text[data-v-e0f1d953]{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-wrapper[data-v-e0f1d953]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.answer-content-input[data-v-e0f1d953]{height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.empty-box[data-v-e0f1d953]{display:flex;width:120px;padding:10px 30px;justify-content:center;align-items:center;gap:10px}.pk-wrapper[data-v-e0f1d953]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.pk-title-text[data-v-e0f1d953]{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-e0f1d953]{display:flex;justify-content:center;align-items:center;gap:12px;align-self:stretch}.pk-content-input[data-v-e0f1d953]{height:40px;flex:1 0 0;border-radius:20px;border:2px solid #000;background:#fff}.modal[data-v-e503df94]{display:flex;flex-direction:column;align-items:center}.modal-container[data-v-e503df94]{display:flex;flex-direction:column;align-items:flex-start;gap:22px}.title-text[data-v-e503df94]{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-e503df94]{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-e503df94]{display:flex;padding:0 10px;justify-content:flex-end;align-items:center;gap:20px;align-self:stretch}.close-wrapper img[data-v-e503df94]{cursor:pointer}.about-wrapper[data-v-e503df94]{display:flex;padding:0 43px;align-items:center;gap:3px;align-self:stretch}.about-text[data-v-e503df94]{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-e503df94]{display:flex;padding:32px 43px;align-items:flex-start;gap:60px;align-self:stretch}.content-left-wrapper[data-v-e503df94]{display:flex;width:448px;flex-direction:column;align-items:flex-start;gap:20px;flex:1 0 0}.name-wrapper[data-v-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.name-text[data-v-e503df94]{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-e503df94]{display:flex;height:24px;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}.description-wrapper[data-v-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.description-text[data-v-e503df94]{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-e503df94]{display:flex;height:201px;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}.date-wrapper[data-v-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.date-text[data-v-e503df94]{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-e503df94]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.date-input[data-v-e503df94]{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;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-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:16px;align-self:stretch}.award-text[data-v-e503df94]{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-e503df94]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.award-input[data-v-e503df94]{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}.usdc-wrapper[data-v-e503df94]{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-e503df94]{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-e503df94]{display:flex;width:448px;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.type-wrapper[data-v-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;align-self:stretch}.type-text[data-v-e503df94]{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-e503df94]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.type-content-wrapper[data-v-e503df94]{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}.type-content-text[data-v-e503df94]{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-e503df94]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:16px}.empty-text[data-v-e503df94]{height:20px}.submit-btn-wrapper[data-v-e503df94]{display:flex;height:40px;padding:8px 30px;text-align:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;box-sizing:border-box}.submit-btn-text[data-v-e503df94]{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-cec673dd]{display:flex;flex-direction:column;align-items:center;gap:30px}.challenge-wrapper[data-v-cec673dd]{display:flex;width:1004px;flex-direction:column;align-items:flex-start;gap:20px}.challenge-title-text[data-v-cec673dd]{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-cec673dd]{display:flex;align-items:flex-start;gap:20px;align-self:stretch}.challenge-live-filter-btn[data-v-cec673dd]{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-cec673dd]{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-cec673dd]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.challenge-type-filter[data-v-cec673dd]{display:flex;align-items:center;gap:10px}.challenge-type-filter-btn[data-v-cec673dd]{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-cec673dd]{border-radius:20px;border:2px solid #000;background:#f5f3f3}.challenge-type-filter-btn-text[data-v-cec673dd]{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-cec673dd]{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-cec673dd]{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-cec673dd]{display:flex;align-items:center;align-content:center;gap:16px;align-self:stretch;flex-wrap:wrap}.nft-wrapper[data-v-cec673dd]{display:flex;width:280px;padding:24px 20px;flex-direction:column;align-items:center;gap:20px;border-radius:20px;border:2px solid #000;background:#f5f3f3}.nft-content-wrapper[data-v-cec673dd]{display:flex;flex-direction:column;align-items:flex-start;gap:12px;align-self:stretch}.nft-content-top-wrapper[data-v-cec673dd]{display:flex;align-items:center;gap:18px;align-self:stretch}.nft-content-top-wrapper img[data-v-cec673dd]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-content-top-title-wrapper[data-v-cec673dd]{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-cec673dd]{display:flex;align-items:center;gap:4px}.live-text[data-v-cec673dd]{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-cec673dd]{display:flex;flex-direction:column;align-items:flex-start;gap:7px;align-self:stretch}.live-title-text[data-v-cec673dd]{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-cec673dd]{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-cec673dd]{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-cec673dd]{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-cec673dd]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-cec673dd]{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-cec673dd]{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.nft-date-content-text[data-v-cec673dd]{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-cec673dd]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-duration-text[data-v-cec673dd]{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-cec673dd]{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-cec673dd]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.nft-award-text[data-v-cec673dd]{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-cec673dd]{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}.nft-btn[data-v-cec673dd]{display:flex;padding:10px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#53926d;cursor:pointer}.nft-btn-text[data-v-cec673dd]{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-cec673dd]{display:flex;justify-content:center;align-items:center;align-self:stretch}.pagination-wrapper[data-v-cec673dd]{display:flex;align-items:center;gap:30px}.pagination-wrapper img[data-v-cec673dd]{cursor:pointer}.number-wrapper[data-v-cec673dd]{display:flex;align-items:center;gap:10px}.number-text[data-v-cec673dd]{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-cec673dd]{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-BXGRWozF.js b/assets/LeaderboardView-BXGRWozF.js deleted file mode 100644 index 78d6c95..0000000 --- a/assets/LeaderboardView-BXGRWozF.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as l,o as e,c as d,a as t,b as s,F as r,d as n,f as c}from"./index-Bv24iQuQ.js";const o={},f={class:"leaderboard"},p={class:"leaderboard-container"},x={class:"leaderboard-wrapper"},_={class:"table"},w={class:"table-content-wrapper"};function b(v,a){return e(),d("div",f,[t("div",p,[a[3]||(a[3]=s('
Overview
Total Challenges
100
Ongoing Challenges
10
Solved Challenges
30
Verified Challenges
60
',1)),t("div",x,[a[2]||(a[2]=t("div",{class:"leaderboard-text"},"Leaderboard",-1)),t("div",_,[a[1]||(a[1]=s('
Rank
Challenger
Total Award
Solved
',1)),(e(),d(r,null,n(6,(i,m)=>t("div",w,a[0]||(a[0]=[t("div",{class:"rank-content-text"},"1",-1),t("div",{class:"challenger-content-text"},"0x1234...1234",-1),t("div",{class:"award-content-text"},"$5,000",-1),t("div",{class:"solved-content-text"},"7",-1)]))),64))])])])])}const g=l(o,[["render",b],["__scopeId","data-v-8f127677"]]),h={__name:"LeaderboardView",setup(v){return(a,i)=>(e(),c(g))}};export{h as default}; diff --git a/assets/LeaderboardView-CkHSfi_X.css b/assets/LeaderboardView-CkHSfi_X.css new file mode 100644 index 0000000..b3dcdba --- /dev/null +++ b/assets/LeaderboardView-CkHSfi_X.css @@ -0,0 +1 @@ +.leaderboard[data-v-e3ef3900]{display:flex;flex-direction:column;align-items:center}.leaderboard-container[data-v-e3ef3900]{display:flex;width:945px;flex-direction:column;align-items:flex-end;gap:50px}.overview-wrapper[data-v-e3ef3900]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.overview-text[data-v-e3ef3900]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.overview-content-wrapper[data-v-e3ef3900]{display:flex;padding:24px 20px;flex-direction:column;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.data-wrapper[data-v-e3ef3900]{display:flex;padding:0 44px;justify-content:center;align-items:center;align-content:center;gap:10px 58px;align-self:stretch;flex-wrap:wrap}.title-wrapper[data-v-e3ef3900]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0}.title-text[data-v-e3ef3900]{color:#000000b3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.content-text[data-v-e3ef3900]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:50px;font-style:normal;font-weight:800;line-height:normal}.title-verified-text[data-v-e3ef3900]{color:#fc4b3bb3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.content-verified-text[data-v-e3ef3900]{color:#fc4b3b;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:50px;font-style:normal;font-weight:800;line-height:normal}.leaderboard-wrapper[data-v-e3ef3900]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.leaderboard-text[data-v-e3ef3900]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.table[data-v-e3ef3900]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.table-title-wrapper[data-v-e3ef3900]{display:flex;padding:20px 62px;justify-content:center;align-items:center;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#4dc4cf}.rank-text[data-v-e3ef3900],.challenger-text[data-v-e3ef3900],.award-text[data-v-e3ef3900],.solved-text[data-v-e3ef3900]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.rank-text[data-v-e3ef3900]{display:flex;width:98px;align-items:center}.challenger-text[data-v-e3ef3900],.award-text[data-v-e3ef3900]{display:flex;align-items:center;flex:1 0 0;align-self:stretch}.solved-text[data-v-e3ef3900]{display:flex;width:83px;align-items:center}.table-content-wrapper[data-v-e3ef3900]{display:flex;padding:16px 62px;justify-content:center;align-items:center;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.table-content-wrapper[data-v-e3ef3900]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.challenger-content-text[data-v-e3ef3900],.award-content-text[data-v-e3ef3900],.solved-content-text[data-v-e3ef3900]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:400;line-height:normal}.rank-content-text[data-v-e3ef3900]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal;display:flex;width:98px;align-items:center}.challenger-content-text[data-v-e3ef3900],.award-content-text[data-v-e3ef3900]{display:flex;align-items:center;flex:1 0 0;align-self:stretch}.solved-content-text[data-v-e3ef3900]{display:flex;width:83px;align-items:center} diff --git a/assets/LeaderboardView-WjfyNLCZ.css b/assets/LeaderboardView-WjfyNLCZ.css deleted file mode 100644 index ac3985e..0000000 --- a/assets/LeaderboardView-WjfyNLCZ.css +++ /dev/null @@ -1 +0,0 @@ -.leaderboard[data-v-8f127677]{display:flex;flex-direction:column;align-items:center}.leaderboard-container[data-v-8f127677]{display:flex;width:945px;flex-direction:column;align-items:flex-end;gap:50px}.overview-wrapper[data-v-8f127677]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.overview-text[data-v-8f127677]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.overview-content-wrapper[data-v-8f127677]{display:flex;padding:24px 20px;flex-direction:column;align-items:center;align-self:stretch;border-radius:20px;border:2px solid #000;background:#f5f3f3}.data-wrapper[data-v-8f127677]{display:flex;padding:0 44px;justify-content:center;align-items:center;align-content:center;gap:10px 58px;align-self:stretch;flex-wrap:wrap}.title-wrapper[data-v-8f127677]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;flex:1 0 0}.title-text[data-v-8f127677]{color:#000000b3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.content-text[data-v-8f127677]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:50px;font-style:normal;font-weight:800;line-height:normal}.title-verified-text[data-v-8f127677]{color:#fc4b3bb3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.content-verified-text[data-v-8f127677]{color:#fc4b3b;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:50px;font-style:normal;font-weight:800;line-height:normal}.leaderboard-wrapper[data-v-8f127677]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.leaderboard-text[data-v-8f127677]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.table[data-v-8f127677]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.table-title-wrapper[data-v-8f127677]{display:flex;padding:20px 62px;justify-content:center;align-items:center;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#4dc4cf}.rank-text[data-v-8f127677],.challenger-text[data-v-8f127677],.award-text[data-v-8f127677],.solved-text[data-v-8f127677]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal}.rank-text[data-v-8f127677]{display:flex;width:98px;align-items:center}.challenger-text[data-v-8f127677],.award-text[data-v-8f127677]{display:flex;align-items:center;flex:1 0 0;align-self:stretch}.solved-text[data-v-8f127677]{display:flex;width:83px;align-items:center}.table-content-wrapper[data-v-8f127677]{display:flex;padding:16px 62px;justify-content:center;align-items:center;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.table-content-wrapper[data-v-8f127677]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.challenger-content-text[data-v-8f127677],.award-content-text[data-v-8f127677],.solved-content-text[data-v-8f127677]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:400;line-height:normal}.rank-content-text[data-v-8f127677]{color:#000;font-family:Archivo;font-size:22px;font-style:normal;font-weight:700;line-height:normal;display:flex;width:98px;align-items:center}.challenger-content-text[data-v-8f127677],.award-content-text[data-v-8f127677]{display:flex;align-items:center;flex:1 0 0;align-self:stretch}.solved-content-text[data-v-8f127677]{display:flex;width:83px;align-items:center} diff --git a/assets/LeaderboardView-_cCvA8LS.js b/assets/LeaderboardView-_cCvA8LS.js new file mode 100644 index 0000000..f84a88c --- /dev/null +++ b/assets/LeaderboardView-_cCvA8LS.js @@ -0,0 +1 @@ +import{a as w,b as f}from"./gameView-BAOQfz90.js";import{_ as u,r as c,h as x,o as l,c as n,d as e,t as r,e as C,F as b,i as m,m as S,l as k}from"./index-ZXgCnnEa.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"},D={class:"content-verified-text"},I={class:"leaderboard-wrapper"},M={class:"table"},R={class:"rank-content-text"},U={class:"challenger-content-text"},j={class:"award-content-text"},q={class:"solved-content-text"},z={__name:"LeaderboardPage",setup(v){const a=c({totalChallenges:0,ongoingChallenges:0,solvedChallenges:0,verifiedChallenges:0}),d=c([]),_=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 f(10);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=>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",D,r(a.value.verifiedChallenges),1)])])])]),e("div",I,[s[6]||(s[6]=e("div",{class:"leaderboard-text"},"Leaderboard",-1)),e("div",M,[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",R,r(i+1),1),e("div",U,r(h(o.address)),1),e("div",j,r(p(o.award)),1),e("div",q,r(o.solved),1)]))),128))])])])]))}},G=u(z,[["__scopeId","data-v-e3ef3900"]]),K={__name:"LeaderboardView",setup(v){return(a,d)=>(l(),k(G))}};export{K as default}; diff --git a/assets/PortfolioView-BdxIyyLf.css b/assets/PortfolioView-BdxIyyLf.css new file mode 100644 index 0000000..6d8df23 --- /dev/null +++ b/assets/PortfolioView-BdxIyyLf.css @@ -0,0 +1 @@ +.portfolio[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:center}.portfolio-container[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-end;gap:70px}.maker[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-end;gap:50px;align-self:stretch}.maker-wrapper[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.maker-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.maker-content-wrapper[data-v-0b4dadaa]{display:flex;width:1032px;justify-content:space-between;align-items:center}.maker-nfts[data-v-0b4dadaa]{display:flex;align-items:flex-start;gap:16px}.nft-wrapper[data-v-0b4dadaa]{display:flex;padding:20px 20px 24px;width:180px;flex-direction:column;align-items:center;gap:20px;border-radius:20px;border:2px solid #000;background:#f5f3f3}.nft-status-wrapper[data-v-0b4dadaa]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.type-wrapper[data-v-0b4dadaa]{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-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:10px;font-style:normal;font-weight:400;line-height:normal}.live-wrapper[data-v-0b4dadaa]{display:flex;align-items:center;gap:4px}.live-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-wrapper img[data-v-0b4dadaa]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-title[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.nft-date-wrapper[data-v-0b4dadaa],.nft-duration-wrapper[data-v-0b4dadaa],.nft-award-wrapper[data-v-0b4dadaa]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-0b4dadaa],.nft-duration-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.nft-date-content-wrapper[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:end;gap:7px;align-self:stretch}.nft-date-content-text[data-v-0b4dadaa],.nft-duration-content-text[data-v-0b4dadaa]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.nft-award-text[data-v-0b4dadaa],.nft-award-content-text[data-v-0b4dadaa]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.detail[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.detail-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal}.detail-table[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.detail-table-top[data-v-0b4dadaa]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#53926d}.detail-title-text[data-v-0b4dadaa],.detail-title-name-text[data-v-0b4dadaa],.detail-title-date-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.detail-title-text[data-v-0b4dadaa]{display:flex;width:80px;align-items:center}.detail-title-name-text[data-v-0b4dadaa]{display:flex;width:160px;align-items:center}.detail-title-date-text[data-v-0b4dadaa]{display:flex;align-items:center;flex:1 0 0}.detail-table-content[data-v-0b4dadaa]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.detail-table-content[data-v-0b4dadaa]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.detail-content-text[data-v-0b4dadaa],.detail-content-name-text[data-v-0b4dadaa],.detail-content-date-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.detail-content-text[data-v-0b4dadaa]{display:flex;width:80px;align-items:center}.detail-content-name-text[data-v-0b4dadaa]{display:flex;width:160px;align-items:center}.detail-content-date-text[data-v-0b4dadaa]{display:flex;align-items:center;flex:1 0 0}.solver[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.solver-title-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.solver-table[data-v-0b4dadaa]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.solver-table-top[data-v-0b4dadaa]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#542234}.solver-top-text[data-v-0b4dadaa],.solver-top-name-text[data-v-0b4dadaa],.solver-top-date-text[data-v-0b4dadaa]{color:#f5f3f3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.solver-top-text[data-v-0b4dadaa]{display:flex;width:80px;align-items:center}.solver-top-name-text[data-v-0b4dadaa]{display:flex;width:160px;align-items:center}.solver-top-date-text[data-v-0b4dadaa]{display:flex;align-items:center;flex:1 0 0}.solver-table-content[data-v-0b4dadaa]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.solver-table-content[data-v-0b4dadaa]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.solver-content-text[data-v-0b4dadaa],.solver-content-name-text[data-v-0b4dadaa],.solver-content-date-text[data-v-0b4dadaa]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.solver-content-text[data-v-0b4dadaa]{display:flex;width:80px;align-items:center}.solver-content-name-text[data-v-0b4dadaa]{display:flex;width:160px;align-items:center}.solver-content-date-text[data-v-0b4dadaa]{display:flex;align-items:center;flex:1 0 0} diff --git a/assets/PortfolioView-C-oo6ANA.css b/assets/PortfolioView-C-oo6ANA.css deleted file mode 100644 index e37b762..0000000 --- a/assets/PortfolioView-C-oo6ANA.css +++ /dev/null @@ -1 +0,0 @@ -.portfolio[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:center}.portfolio-container[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-end;gap:70px}.maker[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-end;gap:50px;align-self:stretch}.maker-wrapper[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.maker-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.maker-content-wrapper[data-v-ddc29e90]{display:flex;width:1032px;justify-content:space-between;align-items:center}.maker-nfts[data-v-ddc29e90]{display:flex;align-items:flex-start;gap:16px}.nft-wrapper[data-v-ddc29e90]{display:flex;padding:20px 20px 24px;width:180px;flex-direction:column;align-items:center;gap:20px;border-radius:20px;border:2px solid #000;background:#f5f3f3}.nft-status-wrapper[data-v-ddc29e90]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.type-wrapper[data-v-ddc29e90]{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-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:10px;font-style:normal;font-weight:400;line-height:normal}.live-wrapper[data-v-ddc29e90]{display:flex;align-items:center;gap:4px}.live-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:normal}.nft-wrapper img[data-v-ddc29e90]{width:130px;height:130px;border-radius:10px;border:2px solid #000}.nft-title[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.nft-date-wrapper[data-v-ddc29e90],.nft-duration-wrapper[data-v-ddc29e90],.nft-award-wrapper[data-v-ddc29e90]{display:flex;justify-content:space-between;align-items:flex-start;align-self:stretch}.nft-date-text[data-v-ddc29e90],.nft-duration-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.nft-date-content-wrapper[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:end;gap:7px;align-self:stretch}.nft-date-content-text[data-v-ddc29e90],.nft-duration-content-text[data-v-ddc29e90]{color:#000;text-align:right;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.nft-award-text[data-v-ddc29e90],.nft-award-content-text[data-v-ddc29e90]{color:#4dc4cf;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:700;line-height:normal}.detail[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.detail-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:22px;font-style:normal;font-weight:800;line-height:normal}.detail-table[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.detail-table-top[data-v-ddc29e90]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#53926d}.detail-title-text[data-v-ddc29e90],.detail-title-name-text[data-v-ddc29e90],.detail-title-date-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.detail-title-text[data-v-ddc29e90]{display:flex;width:80px;align-items:center}.detail-title-name-text[data-v-ddc29e90]{display:flex;width:160px;align-items:center}.detail-title-date-text[data-v-ddc29e90]{display:flex;align-items:center;flex:1 0 0}.detail-table-content[data-v-ddc29e90]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.detail-table-content[data-v-ddc29e90]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.detail-content-text[data-v-ddc29e90],.detail-content-name-text[data-v-ddc29e90],.detail-content-date-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.detail-content-text[data-v-ddc29e90]{display:flex;width:80px;align-items:center}.detail-content-name-text[data-v-ddc29e90]{display:flex;width:160px;align-items:center}.detail-content-date-text[data-v-ddc29e90]{display:flex;align-items:center;flex:1 0 0}.solver[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-start;gap:22px;align-self:stretch}.solver-title-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.solver-table[data-v-ddc29e90]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}.solver-table-top[data-v-ddc29e90]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-radius:20px 20px 0 0;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#542234}.solver-top-text[data-v-ddc29e90],.solver-top-name-text[data-v-ddc29e90],.solver-top-date-text[data-v-ddc29e90]{color:#f5f3f3;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.solver-top-text[data-v-ddc29e90]{display:flex;width:80px;align-items:center}.solver-top-name-text[data-v-ddc29e90]{display:flex;width:160px;align-items:center}.solver-top-date-text[data-v-ddc29e90]{display:flex;align-items:center;flex:1 0 0}.solver-table-content[data-v-ddc29e90]{display:flex;padding:16px 64px;justify-content:center;align-items:center;gap:10px;align-self:stretch;border-top:2px solid #000;border-right:2px solid #000;border-left:2px solid #000;background:#f5f3f3}.solver-table-content[data-v-ddc29e90]:last-child{border-radius:0 0 20px 20px;border:2px solid #000;background:#f5f3f3}.solver-content-text[data-v-ddc29e90],.solver-content-name-text[data-v-ddc29e90],.solver-content-date-text[data-v-ddc29e90]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.solver-content-text[data-v-ddc29e90]{display:flex;width:80px;align-items:center}.solver-content-name-text[data-v-ddc29e90]{display:flex;width:160px;align-items:center}.solver-content-date-text[data-v-ddc29e90]{display:flex;align-items:center;flex:1 0 0} diff --git a/assets/PortfolioView-CuG2ecdf.js b/assets/PortfolioView-CuG2ecdf.js deleted file mode 100644 index 0e80aaf..0000000 --- a/assets/PortfolioView-CuG2ecdf.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n}from"./nft0-jw9de1Qy.js";import{_ as r,o as a,c as s,a as d,F as v,d as l,b as e,f as p}from"./index-Bv24iQuQ.js";const x={},w={class:"portfolio"},f={class:"portfolio-container"},m={class:"maker"},_={class:"maker-wrapper"},u={class:"maker-content-wrapper"},g={class:"maker-nfts"},S={class:"nft-wrapper"},k={class:"detail"},M={class:"detail-table"},h={class:"detail-table-content"},D={class:"solver"},b={class:"solver-table"},A={class:"solver-table-content"};function U(o,t){return a(),s("div",w,[d("div",f,[d("div",m,[d("div",_,[t[3]||(t[3]=d("div",{class:"maker-text"},"Maker",-1)),d("div",u,[t[1]||(t[1]=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[d("path",{d:"M25.75 2.56444L2.05336 22.5L25.75 42.4356V2.56444Z",fill:"#F5F3F3",stroke:"black","stroke-width":"2"})],-1)),d("div",g,[(a(),s(v,null,l(4,(i,c)=>d("div",S,t[0]||(t[0]=[e('
Secret
Live
nft
MG12 Prompt
Date
08.30 5:00 AM(UST)
~ 09.13 5:00 AM(UST)
Duration
14 days
Award
6,000 USDC
',6)]))),64))]),t[2]||(t[2]=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[d("path",{d:"M1.25 2.56444L24.9466 22.5L1.25 42.4356V2.56444Z",fill:"#53926D",stroke:"black","stroke-width":"2"})],-1))])]),d("div",k,[t[6]||(t[6]=d("div",{class:"detail-text"},"View Details",-1)),d("div",M,[t[5]||(t[5]=e('
Id
Name
Status
Type
Date
Award
',1)),(a(),s(v,null,l(4,(i,c)=>d("div",h,t[4]||(t[4]=[e('
1
MG12 Prompt
End
Slang
08.30 5:00 AM(UST) ~ 08.30 5:00 AM(UST)
60,000 USDC
',6)]))),64))])])]),d("div",D,[t[9]||(t[9]=d("div",{class:"solver-title-text"},"Solver",-1)),d("div",b,[t[8]||(t[8]=e('
Id
Name
Status
Type
Date
Award
',1)),(a(),s(v,null,l(4,(i,c)=>d("div",A,t[7]||(t[7]=[e('
1
MG12 Prompt
End
Slang
08.30 5:00 AM(UST) ~ 08.30 5:00 AM(UST)
60,000 USDC
',6)]))),64))])])])])}const T=r(x,[["render",U],["__scopeId","data-v-ddc29e90"]]),L={__name:"PortfolioView",setup(o){return(t,i)=>(a(),p(T))}};export{L as default}; diff --git a/assets/PortfolioView-uYShAl-d.js b/assets/PortfolioView-uYShAl-d.js new file mode 100644 index 0000000..f5d12d8 --- /dev/null +++ b/assets/PortfolioView-uYShAl-d.js @@ -0,0 +1 @@ +import{_ as k,r as x,h as m,o as d,c as i,d as t,F as v,i as _,e as f,b as w,t as e,m as y,l as D}from"./index-ZXgCnnEa.js";import{d as S,e as P}from"./gameView-BAOQfz90.js";const M={class:"portfolio"},B={class:"portfolio-container"},L={class:"maker"},N={class:"maker-wrapper"},V={class:"maker-content-wrapper"},A={class:"maker-nfts"},F={class:"nft-status-wrapper"},R={class:"type-wrapper"},E={class:"type-text"},I={class:"live-wrapper"},U={class:"live-text"},T=["src"],Z={class:"nft-title"},C={class:"nft-date-wrapper"},W={class:"nft-date-content-wrapper"},$={class:"nft-date-content-text"},j={class:"nft-date-content-text"},q={class:"nft-duration-wrapper"},z={class:"nft-duration-content-text"},G={class:"nft-award-wrapper"},H={class:"nft-award-content-text"},J={class:"detail"},K={class:"detail-table"},O={class:"detail-content-text"},Q={class:"detail-content-name-text"},X={class:"detail-content-text"},Y={class:"detail-content-text"},tt={class:"detail-content-date-text"},st={class:"detail-content-text"},at={class:"solver"},et={class:"solver-table"},ot={class:"solver-content-text"},dt={class:"solver-content-name-text"},it={class:"solver-content-text"},lt={class:"solver-content-text"},nt={class:"solver-content-date-text"},rt={class:"solver-content-text"},ct={__name:"PortfolioPage",setup(h){const n=o=>new Date(o*1e3).toLocaleString("en-US",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),p=o=>y(o.toString(),18),r=x({nfts:[],details:[]}),u=x({details:[]}),c=o=>o.map(s=>({id:s[0].toString(),name:s[1],description:s[2],type:s[3],image:s[4],startDate:n(Number(s[5])),endDate:n(Number(s[6])),award:p(s[7])+" USDC",status:s[8]==="0x0000000000000000000000000000000000000000"?"Live":"End"})),g=async()=>{const{address:o}=w();try{const s=await S(o.value);r.value={nfts:c(s.slice(-4)),details:c(s.slice(-4))}}catch(s){console.error("Error fetching Maker portfolio:",s)}},b=async()=>{const{address:o}=w();try{const s=await P(o.value);u.value={details:c(s)}}catch(s){console.error("Error fetching Solver portfolio:",s)}};return m(()=>{g(),b()}),(o,s)=>(d(),i("div",M,[t("div",B,[t("div",L,[t("div",N,[s[6]||(s[6]=t("div",{class:"maker-text"},"Maker",-1)),t("div",V,[s[4]||(s[4]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[t("path",{d:"M25.75 2.56444L2.05336 22.5L25.75 42.4356V2.56444Z",fill:"#F5F3F3",stroke:"black","stroke-width":"2"})],-1)),t("div",A,[(d(!0),i(v,null,_(r.value.nfts,(a,l)=>(d(),i("div",{key:l,class:"nft-wrapper"},[t("div",F,[t("div",R,[t("div",E,e(a.type),1)]),t("div",I,[s[0]||(s[0]=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"})],-1)),t("div",U,e(a.status),1)])]),t("img",{src:a.image,alt:"nft"},null,8,T),t("div",Z,e(a.title),1),t("div",C,[s[1]||(s[1]=t("div",{class:"nft-date-text"},"Date",-1)),t("div",W,[t("div",$,e(a.startDate),1),t("div",j,e(a.endDate),1)])]),t("div",q,[s[2]||(s[2]=t("div",{class:"nft-duration-text"},"Duration",-1)),t("div",z,e(a.duration),1)]),t("div",G,[s[3]||(s[3]=t("div",{class:"nft-award-text"},"Award",-1)),t("div",H,e(a.award),1)])]))),128))]),s[5]||(s[5]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"45",viewBox:"0 0 27 45",fill:"none"},[t("path",{d:"M1.25 2.56444L24.9466 22.5L1.25 42.4356V2.56444Z",fill:"#53926D",stroke:"black","stroke-width":"2"})],-1))])]),t("div",J,[s[8]||(s[8]=t("div",{class:"detail-text"},"View Details",-1)),t("div",K,[s[7]||(s[7]=f('
Id
Name
Status
Type
Date
Award
',1)),(d(!0),i(v,null,_(r.value.details,(a,l)=>(d(),i("div",{key:l,class:"detail-table-content"},[t("div",O,e(a.id),1),t("div",Q,e(a.name),1),t("div",X,e(a.status),1),t("div",Y,e(a.type),1),t("div",tt,e(a.dateRange),1),t("div",st,e(a.award),1)]))),128))])])]),t("div",at,[s[10]||(s[10]=t("div",{class:"solver-title-text"},"Solver",-1)),t("div",et,[s[9]||(s[9]=f('
Id
Name
Status
Type
Date
Award
',1)),(d(!0),i(v,null,_(u.value.details,(a,l)=>(d(),i("div",{key:l,class:"solver-table-content"},[t("div",ot,e(a.id),1),t("div",dt,e(a.name),1),t("div",it,e(a.status),1),t("div",lt,e(a.type),1),t("div",nt,e(a.dateRange),1),t("div",rt,e(a.award),1)]))),128))])])])]))}},vt=k(ct,[["__scopeId","data-v-0b4dadaa"]]),ut={__name:"PortfolioView",setup(h){return(n,p)=>(d(),D(vt))}};export{ut as default}; diff --git a/assets/background-DH44QaTR.png b/assets/background-DH44QaTR.png new file mode 100644 index 0000000..304c46e Binary files /dev/null and b/assets/background-DH44QaTR.png differ diff --git a/assets/gameView-BAOQfz90.js b/assets/gameView-BAOQfz90.js new file mode 100644 index 0000000..eb089b2 --- /dev/null +++ b/assets/gameView-BAOQfz90.js @@ -0,0 +1 @@ +import{J as n,C as t}from"./index-ZXgCnnEa.js";const i="0xcf7EC4BB7c0226FAF75cc81308D6361936b065f6",s="0x41Db4368f74A18240deDB94BCc80dbED1E238c7B",p="0x9e378EC114B2C35305A166e99feC5C47013188ec",r={Game:i,Award:s,Badge:p},c={contracts:r,rpc:"https://api.test.wemix.com"},y="hh-sol-artifact-1",u="Game",o="contracts/Game.sol",l=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",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:"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:[],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:"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:"startNumber",type:"uint256"},{internalType:"uint256",name:"endNumber",type:"uint256"}],name:"getNfts",outputs:[{components:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{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 Game.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:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{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 Game.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:"string",name:"name",type:"string"},{internalType:"string",name:"description",type:"string"},{internalType:"string",name:"gameType",type:"string"},{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 Game.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"},{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:"tokenId",type:"uint256"}],name:"metas",outputs:[{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"}],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:"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:"uint256",name:"",type:"uint256"}],name:"solverList",outputs:[{internalType:"address",name:"",type:"address"}],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"}],m="0x6080604052346200002e576200001462000033565b6200001e62000033565b6040516182cd9081620000d38239f35b600080fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460ff8160401c16620000c0576001600160401b036002600160401b0319828216016200008157505050565b6001600160401b031990911681179091556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1565b60405163f92ee8a960e01b8152600490fdfe60808060405260043610156200001457600080fd5b600090813560e01c9081627c94b614620056ec5750806301ffc9a714620055c05780630661d1dc146200555b57806306fdde03146200541e578063081812fc1462005393578063095ea7b314620051eb5780630d253d76146200509e57806311464fbe146200504b57806318160ddd1462004fee5780631cb04b781462004c6e57806323b872dd1462004c5157806324d735671462004a5c578063277ecfbb14620049535780632f745c591462004907578063415fa50a14620048a057806342842e0e1462004871578063485cc9551462003ffb5780634cd88b7614620039e15780634f6ccce7146200393e578063502c040b146200384d57806354c87af41462003803578063572edf7914620034255780635872fe4514620033dd5780636352211e146200339c578063676db98114620033305780636a627842146200329557806370a08231146200324d578063715018a6146200318b578063722fed7e146200310e57806374de69e314620030865780638ad4154d1462002c8e5780638da5cb5b1462002c1b57806395d89b411462002ac957806395ecc64214620029c95780639859387b14620029635780639dd3e2551462002919578063a22cb46514620027eb578063a4abc3f91462002474578063ac9650d81462002211578063b23e448014620021aa578063b66f7a8b14620020c5578063b88d4fde146200204c578063c516e156146200200e578063c87b56dd14620017cf578063d2da7bca146200177b578063e715de2814620008dc578063e985e9c5146200081a578063ef79266214620007dd578063f2fde38b146200078a578063f9bc3f40146200073e578063fac6350d1462000350578063fe7f43da14620002dd5763fe9eba15146200029d57600080fd5b34620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020600754604051908152f35b80fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760043590600c54821015620002da57602073ffffffffffffffffffffffffffffffffffffffff620003408462005ca3565b9190546040519260031b1c168152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576024357f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed025480821162000735575b50620003c9620003c36004358362006918565b620065b1565b9060043573ffffffffffffffffffffffffffffffffffffffff60025416905b82811062000404576040518062000400868262005b6a565b0390f35b8085526004602052604085205490818652600360205260408620916040516200042d81620058f1565b620004388462005a12565b8152620004486001850162005a12565b602082015273ffffffffffffffffffffffffffffffffffffffff6006620004726002870162005a12565b95866040850152600381015460608501526004810154608085015260058101546fffffffffffffffffffffffffffffffff811660a086015260801c60c085015201541660e0820152805191602082015191604051620004d181620059b3565b604881527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208201527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408201527f6574732f6e66742f0000000000000000000000000000000000000000000000006060820152620005c16024620005588862006d44565b9260405193816200057486935180926020808701910162005798565b82016200058b825180936020808501910162005798565b017f2e706e67000000000000000000000000000000000000000000000000000000006020820152036004810184520182620059d0565b6fffffffffffffffffffffffffffffffff60a083015116906fffffffffffffffffffffffffffffffff60c0840151169273ffffffffffffffffffffffffffffffffffffffff604051957f70a082310000000000000000000000000000000000000000000000000000000087521660048601526020856024818d5afa9485156200072a578d95620006dc575b509060019873ffffffffffffffffffffffffffffffffffffffff60e0620006d4999897969594015116956040519762000685896200593e565b8a8952602089015260408801526060870152608086015260a085015260c084015260e0830152610100820152620006bf6004358462006918565b90620006cc828962005e08565b528662005e08565b5001620003e8565b969594509291906020873d60201162000721575b81620006ff60209383620059d0565b810103126200071c5795519495939493919290919060016200064c565b600080fd5b3d9150620006f0565b6040513d8f823e3d90fd5b905038620003b0565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760206200078260065460075490620064ed565b604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620007da620007ca62005750565b620007d462006cd3565b62006b6e565b80f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760206200078262006b30565b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200085662005750565b73ffffffffffffffffffffffffffffffffffffffff620008bf6200087962005774565b9273ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b9116600052602052602060ff604060002054166040519015158152f35b5034620002da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60608136011262001777576200091962005750565b906024359067ffffffffffffffff82116200141b576101009082360301126200141757604051906200094b82620058f1565b806004013567ffffffffffffffff8111620017735762000972906004369184010162005b1d565b8252602481013567ffffffffffffffff811162001773576200099b906004369184010162005b1d565b602083015260448101359067ffffffffffffffff82116200177357620009ca60e4926004369184010162005b1d565b60408401526064810135606084015260848101356080840152620009f160a4820162005d4a565b60a084015262000a0460c4820162005d4a565b60c0840152013573ffffffffffffffffffffffffffffffffffffffff811681036200071c5760e082015273ffffffffffffffffffffffffffffffffffffffff62000a4e83620067fd565b169173ffffffffffffffffffffffffffffffffffffffff8116156200174257826000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079302908160205273ffffffffffffffffffffffffffffffffffffffff60406000205416918262001673575b62000b058273ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b6001815401905584600052602052604060002073ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558373ffffffffffffffffffffffffffffffffffffffff8216837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48162001572577f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260406000205562000bf584620067b0565b73ffffffffffffffffffffffffffffffffffffffff8116820362001464575b5062001433576044356200136f575b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101116200134257807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809201855260046020528360408620558385526005602052016040842055805190602081015190604081015160608201516080830151916fffffffffffffffffffffffffffffffff60c08160a08701511695015116946040519662000cf688620058f1565b8752602087015260408601526060850152608084015260a083015260c08201528260e0820152818352600360205260408320815180519067ffffffffffffffff8211620011ee57819062000d4b84546200589b565b601f8111620012ef575b50602090601f8311600114620012275787926200121b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161781555b602082015180519067ffffffffffffffff8211620011ee57819062000dc860018501546200589b565b601f811162001198575b50602090601f8311600114620010ca578792620010be575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161760018201555b604082015193845167ffffffffffffffff8111620010915762000e4660028401546200589b565b95601f871162001047575b602096508690601f831160011462000f6257928260069373ffffffffffffffffffffffffffffffffffffffff969360e096849262000f56575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161760028301555b606086015160038301556080860151600483015560058201906fffffffffffffffffffffffffffffffff60a0880151168254917fffffffffffffffffffffffffffffffff0000000000000000000000000000000060c08a015160801b1692161717905501920151167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b01519050388062000e8a565b9060028501845287842091845b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0851681106200102f57508373ffffffffffffffffffffffffffffffffffffffff969360e09693600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600699161062000ff7575b505050811b01600283015562000ebf565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062000fe6565b91928960018192868501518155019401920162000f6f565b60028401835260208320601f830160051c81016020841062001089575b601f890160051c820181106200107c57505062000e51565b6000815560010162001064565b508062001064565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062000dea565b9250600184018752602087209087935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841685106200117c5760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081161062001144575b505050811b01600182015562000e1f565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062001133565b81810151835560209485019460019093019290910190620010da565b90915060018401875260208720601f840160051c810160208510620011e6575b90849392915b601f830160051c82018110620011d657505062000dd2565b60008155859450600101620011be565b5080620011b8565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062000d6d565b9250838752602087209087935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168510620012d35760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08116106200129b575b505050811b01815562000d9f565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880806200128d565b8181015183556020948501946001909301929091019062001234565b90915083875260208720601f840160051c8101602085106200133a575b90849392915b601f830160051c820181106200132a57505062000d55565b6000815585945060010162001312565b50806200130c565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b82602073ffffffffffffffffffffffffffffffffffffffff600254166064604051809481937f23b872dd00000000000000000000000000000000000000000000000000000000835233600484015288602484015260443560448401525af180156200142857620013e1575b5062000c23565b6020813d6020116200141f575b81620013fd60209383620059d0565b810103126200141b575180151503620014175738620013da565b8280fd5b8380fd5b3d9150620013ee565b6040513d86823e3d90fd5b602483604051907f73c6ac6e0000000000000000000000000000000000000000000000000000000082526004820152fd5b6200146f8162006714565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810111620015435773ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92166000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed00602052604060002082820160005260205284604060002055846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01602052016040600020553862000c14565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116821462000bf5576200159b8262006714565b846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01806020526040600020549082820362001622575b50508460005260006040812055826000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed006020526040600020906000526020526000604081205562000bf5565b60008581527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0060209081526040808320868452825280832054858452818420819055835292905220553880620015d4565b620016cc856000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260406000207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b620017168373ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815401905562000abb565b602484604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b8480fd5b5080fd5b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200180e60043562006c32565b5060043581526003602052604081209073ffffffffffffffffffffffffffffffffffffffff6006604051936200184485620058f1565b6200184f8162005a12565b85526200185f6001820162005a12565b6020860152620018726002820162005a12565b6040860152600381015460608601526004810154608086015260058101546fffffffffffffffffffffffffffffffff811660a087015260801c60c086015201541660e083015281519060208301519260405193620018d085620059b3565b604885526200195f604060208701947f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f86527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f617373828901527f6574732f6e66742f000000000000000000000000000000000000000000000000606089015260043581526005602052205462006d44565b9160408101519062001975606082015162006f0e565b9162001985608083015162006f0e565b90620019a76fffffffffffffffffffffffffffffffff60a08501511662006d44565b9473ffffffffffffffffffffffffffffffffffffffff60e0620019e06fffffffffffffffffffffffffffffffff60c08801511662006d44565b9501511696879860405199620019f68b6200595c565b602a8b5260208b01996040368c378b511562001fdf5760308b538b516001101562001fdf57607860218d015360295b6001811162001f6d575062001f3557506040519b8c809c602082017f7b000000000000000000000000000000000000000000000000000000000000009052602182017f226e616d65223a2022000000000000000000000000000000000000000000000090528051602a819301916020019162001aa19262005798565b8c01937f222c2000000000000000000000000000000000000000000000000000000000009485602a820152602d81017f226465736372697074696f6e223a202200000000000000000000000000000000905281519182603d8301916020019162001b0b9262005798565b019084603d830152604082017f22696d616765223a2022000000000000000000000000000000000000000000009052519182604a830162001b4c9262005798565b0181519182604a8301916020019162001b659262005798565b0190604a82017f2e706e67000000000000000000000000000000000000000000000000000000009052604e820152605181017f2261747472696275746573223a205b00000000000000000000000000000000009052606081017f7b2274726169745f74797065223a202254797065222c202276616c7565223a209052608081017f220000000000000000000000000000000000000000000000000000000000000090528151918260818301916020019162001c209262005798565b017f227d2c000000000000000000000000000000000000000000000000000000000093846081830152608482017f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652290527f3a20220000000000000000000000000000000000000000000000000000000000918260a48201528151918260a78301916020019162001cb09262005798565b01908460a783015260aa82017f7b2274726169745f74797065223a2022536563726574222c202276616c756522905260ca8201528151918260cd8301916020019162001cfc9262005798565b01928260cd850152827f7b22646973706c61795f74797065223a202264617465222c202274726169745f918260d087015260f086017f74797065223a202253746172742064617465222c202276616c7565223a202200905261010f9581519182888301916020019162001d6f9262005798565b019485015261011284015261013283017f74797065223a2022456e642064617465222c202276616c7565223a2022000000905261014f9281519182858301916020019162001dbd9262005798565b019182015261015281017f7b2274726169745f74797065223a202257696e6e65722061646472657373222c905261017281017f202276616c7565223a2022000000000000000000000000000000000000000000905261017d9251918284830162001e279262005798565b019081017f227d000000000000000000000000000000000000000000000000000000000000905261017f81017f5d00000000000000000000000000000000000000000000000000000000000000905261018081017f7d00000000000000000000000000000000000000000000000000000000000000905203610161810182526101810162001eb69082620059d0565b62001ec1906200706b565b6040518091602082017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000905280519081603d8401916020019162001f059262005798565b810103601d81018252603d0162001f1d9082620059d0565b604051809160208252602082016200040091620057bd565b604490604051907fe22e27eb000000000000000000000000000000000000000000000000000000008252600482015260146024820152fd5b90600f8116601081101562001fdf577f3031323334353637383961626364656600000000000000000000000000000000901a62001fab838f62006efc565b5360041c90801562001543577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0162001a25565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020600654604051908152f35b5034620002da5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200208862005750565b6200209262005774565b6064359167ffffffffffffffff83116200141b57620020ba620007da93369060040162005b1d565b916044359162006971565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040602091600435815260038352206040516200211481620058f1565b6200211f8262005a12565b81526200212f6001830162005a12565b83820152620021416002830162005a12565b6040820152600382015460608201526004820154608082015260e073ffffffffffffffffffffffffffffffffffffffff600660058501546fffffffffffffffffffffffffffffffff811660a086015260801c948560c08601520154169101526040519042118152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604060209173ffffffffffffffffffffffffffffffffffffffff6200220062005750565b168152600183522054604051908152f35b5034620002da576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620017775760043567ffffffffffffffff8082116200141b57366023830112156200141b578160040135818111620017735760059160243683851b860182011162002470576040518795949291620022978262005979565b86825287820193620022a98662005d9a565b96620022b96040519889620059d0565b8688527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0620022e88862005d9a565b01895b8181106200246057505088917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd82360301925b888110620023a7578b8b8b60405191838301848452825180915260408401948060408360051b870101940192955b8287106200235a5785850386f35b90919293828062002396837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a600196030186528851620057bd565b96019201960195929190926200234c565b8481839d9c9d1b84010135848112156200245c57830190858201359188831162002458576044018d8336038213620002da578062002434928f6200241d62002410918f988e60019a60405195838794868601998a37840191858301938a85525193849162005798565b01038084520182620059d0565b5190305af46200242c62006ec7565b9030620072a1565b62002440828d62005e08565b526200244d818c62005e08565b50019a999a6200231e565b8d80fd5b8c80fd5b60608a82018d01528b01620022eb565b8680fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620024b062005750565b90620024bc8262006714565b620024c781620065b1565b91809373ffffffffffffffffffffffffffffffffffffffff60025416945b838110620024fd576040518062000400878262005b6a565b620025098183620064fb565b908184526005602052604084205460036020526040852088604051946200253086620058f1565b6200253b8362005a12565b86526200254b6001840162005a12565b602087015273ffffffffffffffffffffffffffffffffffffffff6006620025756002860162005a12565b948560408a0152600381015460608a0152600481015460808a015260058101546fffffffffffffffffffffffffffffffff811660a08b015260801c60c08a015201541660e08701528580519360208201519060405191620025d683620059b3565b604883527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208401527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408401527f6574732f6e66742f00000000000000000000000000000000000000000000000060608401526200269b60206200265d8a62006d44565b94604051958162002678889351809286808701910162005798565b82016200268e8251809386808501910162005798565b01038086520184620059d0565b602073ffffffffffffffffffffffffffffffffffffffff60246fffffffffffffffffffffffffffffffff60c08160a08a0151169801511697604051998a9384927f70a082310000000000000000000000000000000000000000000000000000000084521660048301525afa958615620027e0578c9662002790575b5073ffffffffffffffffffffffffffffffffffffffff60e060019b0151169660405198620027448a6200593e565b8952602089015260408801526060870152608086015260a085015260c084015260e08301526101008201526200277b828862005e08565b5262002788818762005e08565b5001620024e5565b99955060208a3d602011620027d7575b81620027af60209383620059d0565b810103126200071c579851949873ffffffffffffffffffffffffffffffffffffffff62002716565b3d9150620027a0565b6040513d8e823e3d90fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200282762005750565b60243590811515809203620014175773ffffffffffffffffffffffffffffffffffffffff16908115620028e8573360009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604090208260005260205260406000207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b602482604051907f5b08ba180000000000000000000000000000000000000000000000000000000082526004820152fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600483522054604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab620029a562005750565b620067fd565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600383522060405162002a1881620058f1565b62002a238262005a12565b815262002a336001830162005a12565b8382015262002a456002830162005a12565b6040820152600382015460608201526004820154608082015260058201549060e073ffffffffffffffffffffffffffffffffffffffff60066fffffffffffffffffffffffffffffffff8516948560a086015260801c958660c0860152015416910152421015908162002abd575b506040519015158152f35b90504211153862002ab2565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040517f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805482600062002b2e836200589b565b928383526020946001918660018216918260001462002bd857505060011462002b78575b505062002b6292500383620059d0565b62000400604051928284938452830190620057bd565b8592506000527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e906000915b85831062002bbf57505062002b629350820101858062002b52565b8054838901850152879450869390920191810162002ba4565b9150935062002b629592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101858062002b52565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57602073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b5034620002da5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576004359062002cce62005774565b67ffffffffffffffff906044358281116200141b579062002d157fffffffffffffffffffffffff000000000000000000000000000000000000000092369060040162005b1d565b5062002d2062006cd3565b8484526020926003845260066040862062002d66600582015462002d59426fffffffffffffffffffffffffffffffff83161115620063bb565b429060801c101562006421565b01805473ffffffffffffffffffffffffffffffffffffffff809462002d8e8284161562006487565b169485911617905560065460018101809111620030595760065582855260088452604085209586546801000000000000000097888210156200302c5762002de1828492600162002e179501815562005d31565b9091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83549160031b92831b921b1916179055565b83865260098552604086208054906001820180921162002fff5755602485848060025416931692604051928380927f70a082310000000000000000000000000000000000000000000000000000000082528660048301525afa90811562002ff457879162002fc1575b50848752600a865262002e9960408820918254620064ed565b9055803b1562002fbd57908580926024604051809581937fc4d66de80000000000000000000000000000000000000000000000000000000083528960048401525af1801562002fb25762002f9c575b5050818452600b835260ff6040852054161562002f03578380f35b600c549485101562002f6f5762002f24856001600b969701600c5562005ca3565b819291549060031b9184831b921b19161790558352526040812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055803880808380f35b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8195929511620010915760405292388062002ee8565b6040513d88823e3d90fd5b8580fd5b90508581813d831162002fec575b62002fdb8183620059d0565b810103126200247057513862002e80565b503d62002fcf565b6040513d89823e3d90fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620030c262005750565b73ffffffffffffffffffffffffffffffffffffffff16815260086020526040812080546024359290831015620002da57602062003100848462005d31565b90546040519160031b1c8152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760807f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02546200316d62006b30565b60065460075491604051938452602084015260408301526060820152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620031c662006cd3565b8073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993008054907fffffffffffffffffffffffff000000000000000000000000000000000000000082169055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620007826200328f62005750565b62006714565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620032d162005750565b5060646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f44697361626c65642e00000000000000000000000000000000000000000000006044820152fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760ff604060209273ffffffffffffffffffffffffffffffffffffffff6200338862005750565b168152600b84522054166040519015158152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab60043562006c32565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab6200341f62005750565b62006667565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6200347662005750565b1681526008602052604081209060405191826020825491828152019183526020832090835b818110620037ec5750505082620034b4910383620059d0565b8151620034c181620065b1565b91809373ffffffffffffffffffffffffffffffffffffffff60025416905b838610620034f7576040518062000400878262005b6a565b62003503868262005e08565b5195868452600560205260408420546003602052604085206040516200352981620058f1565b620035348262005a12565b8152620035446001830162005a12565b6020820152620035576002830162005a12565b91826040830152600381015460608301526004810154608083015260058101546fffffffffffffffffffffffffffffffff811660a084015260801c60c08301526006015473ffffffffffffffffffffffffffffffffffffffff1660e0820152805191602082015190604051620035cd81620059b3565b604881527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208201527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408201527f6574732f6e66742f00000000000000000000000000000000000000000000000060608201526200364e8662006d44565b90604051918183925190816020850191602001916200366d9262005798565b820181519182602083019160200191620036879262005798565b01038082526020016200369b9082620059d0565b60a08401516fffffffffffffffffffffffffffffffff169160c08501516fffffffffffffffffffffffffffffffff16936040519e8f907f70a0823100000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff166004820152808c5a92602491602094fa958615620027e0578c96620037af575b60019a9b9c9d9e9f5060e073ffffffffffffffffffffffffffffffffffffffff9101511696604051986200375e8a6200593e565b8952602089015260408801526060870152608086015260a085015260c084015260e083015261010082015262003795828962005e08565b52620037a2818862005e08565b50019493929190620034df565b955060208f813d8311620037e4575b620037ca8183620059d0565b81010312620037e0579d519c9d8e9d956200372a565b8b80fd5b503d620037be565b82548452602090930192600192830192016200349b565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600583522054604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff602081620038a162005774565b16916024604051809481937f70a082310000000000000000000000000000000000000000000000000000000083526004351660048301525afa90811562003933578291620038f7575b6020826040519015158152f35b90506020813d6020116200392a575b816200391560209383620059d0565b810103126200177757602091505138620038ea565b3d915062003906565b6040513d84823e3d90fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600435907f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254821015620039ab576020620031008362005cdb565b604491604051917fa57d13dc00000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5767ffffffffffffffff600435818111620014175762003a3790369060040162005b1d565b906024358181116200141b5762003a5390369060040162005b1d565b917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549360ff8560401c1615928286169586158062003ff3575b6001809814908162003fe8575b15908162003fde575b5062003fb45784877fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000831617875562003f7e575b5062003ae462007247565b80518381116200302c577f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300908062003b1d83546200589b565b93601f9485811162003f0c575b5060209085831160011462003e4f578b9262003e43575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828a1b9260031b1c19161790555b8151908382116200302c5781907f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793019362003bad85546200589b565b82811162003dcf575b50602091831160011462003d1257899262003d06575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82881b9260031b1c19161790555b62003c0762007247565b62003c1162007247565b60405190610c738083019182118383101762003cd957908291620076258339039085f08015620014285773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff000000000000000000000000000000000000000085541617845562003c81578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff60209354169055604051908152a138808280f35b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062003bcc565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe089941691858b527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e928b5b81811062003db65750841162003d7e575b505050811b01905562003bfd565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062003d70565b8284015185558b96909401936020938401930162003d5f565b90919250848a527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e8380860160051c8201926020871062003e39575b9186958c929594930160051c01915b82811062003e2a57505062003bb6565b8c81558695508b910162003e1a565b9250819262003e0b565b01519050388062003b41565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08b941691858d527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf81928d5b81811062003ef35750841162003ebb575b505050811b01905562003b72565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062003ead565b8284015185558d96909401936020938401930162003e9c565b909150838b527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf818580850160051c8201926020861062003f74575b918c91869594930160051c01915b82811062003f6557505062003b2a565b8d81558594508c910162003f55565b9250819262003f47565b7fffffffffffffffffffffffffffffffffffffffffffffff00000000000000000016680100000000000000011785553862003ad9565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b9050153862003aa5565b303b15915062003a9c565b508462003a8f565b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200403762005750565b6200404162005774565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff82168015908162004860575b600114908162004855575b1590816200484b575b5062003fb45760017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560ff8260401c1615620047f5575b604051620040f88162005996565b601781527f436170747572652d7468652d50726f6d70742047616d65000000000000000000602082015260405190620041318262005996565b600382527f435450000000000000000000000000000000000000000000000000000000000060208301526200416562007247565b80519067ffffffffffffffff821162003cd9578190620041a67f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300546200589b565b601f811162004729575b50602090601f831160011462004604578892620045f8575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916177f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300555b80519067ffffffffffffffff8211620011ee5781906200425b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301546200589b565b601f811162004529575b50602090601f8311600114620044295787926200441d575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916177f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301555b620042d962007247565b620042e362007247565b604051610c738082019082821067ffffffffffffffff83111762003cd957908291620076258339039085f0908115620014285760ff936200436873ffffffffffffffffffffffffffffffffffffffff92837fffffffffffffffffffffffff0000000000000000000000000000000000000000951685895416178855620007d462007247565b6200437262007247565b1690600254161760025560401c1615620043895780f35b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b0151905038806200427d565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930188527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016885b818110620045105750908460019594939210620044d8575b505050811b017f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930155620042cf565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080620044aa565b9293602060018192878601518155019501930162004492565b9091507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793018752601f830160051c7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e019060208410620045cf575b90601f8493920160051c7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e01905b818110620045c0575062004265565b888155849350600101620045b1565b7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e915062004583565b015190503880620041c8565b92507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930088527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf819088935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841685106200470d5760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610620046d5575b505050811b017f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300556200421a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080620046a7565b818101518355602094850194600190930192909101906200464e565b9091507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008852601f830160051c7f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf810160208410620047cd575b908392915b601f820160051c7f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf81018110620047be5750620041b0565b89815584935060010162004787565b507f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf8162004782565b680100000000000000017fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055620040ea565b905015386200408e565b303b15915062004085565b604084901c60ff161591506200407a565b5034620002da57620007da620048873662005838565b9060405192620048978462005979565b85845262006971565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604060209173ffffffffffffffffffffffffffffffffffffffff620048f662005750565b168152600a83522054604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620007826200494962005750565b60243590620064fb565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604062004a0a916004358152600360205220620049a28162005a12565b90620049b16001820162005a12565b620049bf6002830162005a12565b9160038101549262004a2860048301549162004a1973ffffffffffffffffffffffffffffffffffffffff600660058701549601541695604051998a99610100808c528b0190620057bd565b9089820360208b0152620057bd565b908782036040890152620057bd565b93606086015260808501526fffffffffffffffffffffffffffffffff811660a085015260801c60c084015260e08301520390f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600435602462004a9d62005774565b9162004aa862006cd3565b80845260206003815260066040862062004ae0600582015462002d59426fffffffffffffffffffffffffffffffff83161115620063bb565b01938185549373ffffffffffffffffffffffffffffffffffffffff95869162004b0c8388161562006487565b8260405195869485937f70a08231000000000000000000000000000000000000000000000000000000008552166004840152165afa90811562002fb257869162004c1e575b501562004bc057507fffffffffffffffffffffffff0000000000000000000000000000000000000000161790556007546001810180911162004b935760075580f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f48617665206e6f206261646765732e00000000000000000000000000000000006044820152fd5b90508181813d831162004c49575b62004c388183620059d0565b8101031262002fbd57513862004b51565b503d62004c2c565b5034620002da57620007da62004c673662005838565b9162005e1d565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600c5460043581811162004fe6575b9062004cbb8262005d9a565b9162004ccb6040519384620059d0565b80835262004cd98162005d9a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208501920136833762004d0f8162005db3565b9062004d1b8162005db3565b9362004d278262005db3565b90875b83811062004fc45750825b81811062004e52575050865b82811062004dc957505050604051948594606086019060608752518091526080860193915b81811062004d99575050508162004d8a918562000400959403602087015262005802565b90838203604085015262005802565b825173ffffffffffffffffffffffffffffffffffffffff1685528796506020948501949092019160010162004d66565b8073ffffffffffffffffffffffffffffffffffffffff62004dfd62004df6600194869b98999a9b62005e08565b5162005ca3565b90549060031b1c168062004e12838862005e08565b52808a52600960205260408a205462004e2c838962005e08565b528952600a602052604089205462004e45828a62005e08565b5201959493929562004d41565b88979495969783511562004f975773ffffffffffffffffffffffffffffffffffffffff62004e84602086015162005ca3565b90549060031b1c168a52600a60205260408a205460015b86811062004f08575091809160019373ffffffffffffffffffffffffffffffffffffffff62004eca8462005ca3565b90549060031b1c168d52600a60205260408d20541162004ef3575b505001969594939662004d35565b62004eff908662005e08565b52803862004ee5565b73ffffffffffffffffffffffffffffffffffffffff62004f2d62004df6838962005e08565b90549060031b1c168c52600a6020528160408d20541062004f52575b60010162004e9b565b91505073ffffffffffffffffffffffffffffffffffffffff62004f7a62004df6838762005e08565b905460039190911b1c168a52600a60205260408a20548162004f49565b60248a7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b808062004fd9600193869b98999a9b62005e08565b5201969594939662004d2a565b508062004caf565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760207f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254604051908152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620050da62005750565b90620051e26102de62002410620051d660208096604051906200510083870183620059d0565b858252828201956200734787396200517f620051ac73ffffffffffffffffffffffffffffffffffffffff809a5416928a604051917fc4d66de80000000000000000000000000000000000000000000000000000000088840152166024820152602481526200516e816200595c565b604051928391878301958662005d68565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282620059d0565b604051958693620051c6868601998a925192839162005798565b8401915180938684019062005798565b51902060243562006cb3565b60405191168152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200522762005750565b602435620052358162006c32565b3315158062005372575b8062005312575b620052e257819073ffffffffffffffffffffffffffffffffffffffff809416938491167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258680a482527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260408220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b60246040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152336004820152fd5b506200535d8173ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b33855260205260ff6040852054161562005246565b503373ffffffffffffffffffffffffffffffffffffffff821614156200523f565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6040602092600435620053ed8162006c32565b5081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793048452205416604051908152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040519080827f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930092835462005484816200589b565b938484526020956001928760018216918260001462005516575050600114620054b9575b50505062002b6292500383620059d0565b8152859250907f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf815b858310620054fd57505062002b629350820101388080620054a8565b80548389018501528794508693909201918101620054e1565b925094505062002b629592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388080620054a8565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff60066040602093600435815260038552200154161515604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036200177757807f780e9d6300000000000000000000000000000000000000000000000000000000602092149081156200565957506040519015158152f35b7f80ac58cd00000000000000000000000000000000000000000000000000000000811491508115620056c1575b811562005696575b508262002ab2565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014826200568e565b7f5b5e139f000000000000000000000000000000000000000000000000000000008114915062005686565b905034620017775760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126200177757604060209273ffffffffffffffffffffffffffffffffffffffff6200574362005750565b1681526009845220548152f35b6004359073ffffffffffffffffffffffffffffffffffffffff821682036200071c57565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036200071c57565b60005b838110620057ac5750506000910152565b81810151838201526020016200579b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093620057fb8151809281875287808801910162005798565b0116010190565b90815180825260208080930193019160005b82811062005823575050505090565b83518552938101939281019260010162005814565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60609101126200071c5773ffffffffffffffffffffffffffffffffffffffff9060043582811681036200071c579160243590811681036200071c579060443590565b90600182811c92168015620058e6575b6020831014620058b757565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691620058ab565b610100810190811067ffffffffffffffff8211176200590f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610120810190811067ffffffffffffffff8211176200590f57604052565b6060810190811067ffffffffffffffff8211176200590f57604052565b6020810190811067ffffffffffffffff8211176200590f57604052565b6040810190811067ffffffffffffffff8211176200590f57604052565b6080810190811067ffffffffffffffff8211176200590f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176200590f57604052565b9060405191826000825462005a27816200589b565b9081845260209460019160018116908160001462005a9f575060011462005a5c575b50505062005a5a92500383620059d0565b565b600090815285812095935091905b81831062005a8657505062005a5a935082010138808062005a49565b8554888401850152948501948794509183019162005a6a565b91505062005a5a9593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138808062005a49565b67ffffffffffffffff81116200590f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156200071c5780359062005b378262005ae2565b9262005b476040519485620059d0565b828452602083830101116200071c57816000926020809301838601378301015290565b6020808201908083528351809252604092604081018260408560051b8401019601946000925b85841062005ba2575050505050505090565b909192939495968580827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc085600195030187528a519062005c3b62005c2762005c1362005c026101208651865287870151908089880152860190620057bd565b8a8601518582038c870152620057bd565b6060808601519085830390860152620057bd565b6080808501519084830390850152620057bd565b9160a080820151906fffffffffffffffffffffffffffffffff8092169084015260c09081830151169083015260e0808201519083015273ffffffffffffffffffffffffffffffffffffffff610100809201511691015299019401940192959493919062005b90565b600c5481101562001fdf57600c6000527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70190600090565b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02805482101562001fdf576000527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20190600090565b805482101562001fdf5760005260206000200190600090565b35906fffffffffffffffffffffffffffffffff821682036200071c57565b60409073ffffffffffffffffffffffffffffffffffffffff62005d9794931681528160208201520190620057bd565b90565b67ffffffffffffffff81116200590f5760051b60200190565b9062005dbf8262005d9a565b62005dce6040519182620059d0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe062005dfe829462005d9a565b0190602036910137565b805182101562001fdf5760209160051b010190565b909173ffffffffffffffffffffffffffffffffffffffff8084169283156200638a576000938385527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079302946020868152604097858984205416973315158062006263575b50881590811562006194575b62005ed68373ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b600181540190558885528352898420857fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905587858a7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a415620060b3577f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02548784527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0383528984205562005f9187620067b0565b83880362005fe8575b50505050169283830362005fae5750505050565b6064945051927f64283d7b000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b62005ff39062006714565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411620060865782917f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01918a94527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed008152838320858452815287848420558783525220553880808062005f9a565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b87841462005f9157620060c68862006714565b8784527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed018084528a852054908282036200613e575b5050878452838a8120558884527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0083528984209084528252828981205562005f91565b8a86527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed008086528c872084885286528c872054908c885286528c87208388528652808d882055865284528a8520553880620060fb565b620061ed896000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260406000207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b620062378a73ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815401905562005e8c565b80620062e6575b1562006277573862005e80565b89888a620062ae5760249151907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b90517f177e802f0000000000000000000000000000000000000000000000000000000081523360048201526024810191909152604490fd5b5033891480156200632d575b806200626a57508784527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079304835233878b86205416146200626a565b50620063788973ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b338552835260ff8a85205416620062f2565b60246040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260006004820152fd5b15620063c357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4e6f74207965742e0000000000000000000000000000000000000000000000006044820152fd5b156200642957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4f757464617465642e00000000000000000000000000000000000000000000006044820152fd5b156200648f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920736f6c7665642e00000000000000000000000000000000006044820152fd5b919082018092116200154357565b620065068162006714565b821015620065605773ffffffffffffffffffffffffffffffffffffffff166000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0060205260406000209060005260205260406000205490565b6040517fa57d13dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201526024810191909152604490fd5b90620065bd8262005d9a565b604090620065cf6040519182620059d0565b8381527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0620065ff829562005d9a565b019160005b838110620066125750505050565b602090825162006622816200593e565b60008152606083908082840152808684015280808401526080830152600060a0830152600060c0830152600060e0830152600061010083015282860101520162006604565b62005d979073ffffffffffffffffffffffffffffffffffffffff80911680600052620024106200670a602060018152604060002054946102de946200517f620051ac60405193620066bb868a0186620059d0565b88855285850198620073478a396000541692604051907fc4d66de800000000000000000000000000000000000000000000000000000000878301526024820152602481526200516e816200595c565b5190209062006cb3565b73ffffffffffffffffffffffffffffffffffffffff8116156200677f576200677b9073ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b5490565b60246040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152fd5b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0290815491680100000000000000008310156200590f578262002de191600162005a5a9501905562005cdb565b620068088162006667565b803b620068fd575073ffffffffffffffffffffffffffffffffffffffff809116600090808252600160205260408220908154917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831462001342576001830190558383541690604051907fc4d66de8000000000000000000000000000000000000000000000000000000006020830152602482015260248152620068ac816200595c565b604051916102de8084019084821067ffffffffffffffff83111762003cd95791849391620068e09362007347863962005d68565b039083f5908115620068f157501690565b604051903d90823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff91501690565b919082039182116200154357565b90620069328262005ae2565b620069416040519182620059d0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe062005dfe829462005ae2565b91906200698082828562005e1d565b803b6200698e575b50505050565b620069f973ffffffffffffffffffffffffffffffffffffffff809216946040519384937f150b7a0200000000000000000000000000000000000000000000000000000000968786523360048701521660248501526044840152608060648401526084830190620057bd565b03906020816000938185885af19082908262006ac8575b505062006a64578262006a2262006ec7565b805191908262006a5d57602482604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b9050602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000160362006a9757503880808062006988565b602490604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b909192506020813d60201162006b27575b8162006ae860209383620059d0565b81010312620017775751907fffffffff0000000000000000000000000000000000000000000000000000000082168203620002da575090388062006a10565b3d915062006ad9565b62005d977f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed025462006b6760065460075490620064ed565b9062006918565b73ffffffffffffffffffffffffffffffffffffffff80911690811562006c01577f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805490837fffffffffffffffffffffffff00000000000000000000000000000000000000008316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b806000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205273ffffffffffffffffffffffffffffffffffffffff6040600020541690811562006c82575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b605591600b9160405191604083015260208201523081520160ff81532090565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330362006d1457565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008082101562006eb8575b506d04ee2d6d415b85acef81000000008083101562006ea8575b50662386f26fc100008083101562006e98575b506305f5e1008083101562006e88575b506127108083101562006e78575b50606482101562006e67575b600a8092101562006e5c575b60019081602162006de56001870162006926565b95860101905b62006df8575b5050505090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff849101917f30313233343536373839616263646566000000000000000000000000000000008282061a83530491821562006e565791908262006deb565b62006df1565b916001019162006dd1565b919060646002910491019162006dc5565b6004919392049101913862006db9565b6008919392049101913862006dab565b6010919392049101913862006d9b565b6020919392049101913862006d88565b60409350810491503862006d6e565b3d1562006ef7573d9062006edb8262005ae2565b9162006eeb6040519384620059d0565b82523d6000602084013e565b606090565b90815181101562001fdf570160200190565b806040519162006f1e83620059b3565b6042835260208301606036823783511562001fdf576030905382516001906001101562001fdf57607860218501536041905b80821162006f9b57505062006f63575090565b604490604051907fe22e27eb000000000000000000000000000000000000000000000000000000008252600482015260206024820152fd5b9091600f811660108110156200703d577f3031323334353637383961626364656600000000000000000000000000000000901a62006fda848762006efc565b5360041c9180156200700f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019062006f50565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b9081511562007230576040519162007083836200595c565b604083527f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208401527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f604084015280519260029160028501809511620015435760038095047f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681036200154357620071259060029694961b62006926565b926020840192829183518401976020890192835194600085525b8a8110620071e25750505050600393949596505251068060011462007193576002146200716a575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff603d91015390565b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81603d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81940153015390565b836004919b989b019a8b51600190603f9082828260121c16870101518453828282600c1c16870101518385015382828260061c1687010151878501531684010151858201530196996200713f565b9050604051620072408162005979565b6000815290565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156200727757565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b90620072e25750805115620072b857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b815115806200733c575b620072f5575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15620072ec56fe60806040526102de8038038061001481610194565b92833981019060408183031261018f5780516001600160a01b03811680820361018f5760208381015190936001600160401b03821161018f570184601f8201121561018f5780519061006d610068836101cf565b610194565b9582875285838301011161018f57849060005b83811061017b57505060009186010152813b15610163577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03191682179055604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28351156101455750600080848461012c96519101845af4903d1561013c573d61011c610068826101cf565b908152600081943d92013e6101ea565b505b6040516090908161024e8239f35b606092506101ea565b9250505034610154575061012e565b63b398979f60e01b8152600490fd5b60249060405190634c9c8ce360e01b82526004820152fd5b818101830151888201840152869201610080565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101b957601f01601f191660200190565b9061021157508051156101ff57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610244575b610222575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561021a56fe608060405273ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e156056573d90f35b3d90fdfea26469706673582212203409c5e3645254405cec23bd4d81aeddd5cfe35adffde4b964c788aa78461f0f64736f6c6343000818003360a0806040523461008e5733156100785760008054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a333608052610bdf90816100948239608051818181610609015261067f0152f35b631e4fbdf760e01b815260006004820152602490fd5b600080fdfe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c908163150b7a021461009e5750806347e1da2a14610099578063715018a6146100945780638da5cb5b1461008f578063b61d27f61461008a578063c45a015514610085578063c4d66de8146100805763f2fde38b0361000e576106de565b61062d565b6105be565b610538565b6104e6565b610449565b6102a0565b346101335760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610133576100d8600435610136565b6100e3602435610136565b60643567ffffffffffffffff811161012f57610103903690600401610159565b50507f150b7a020000000000000000000000000000000000000000000000000000000060805260206080f35b5080fd5b80fd5b73ffffffffffffffffffffffffffffffffffffffff81160361015457565b600080fd5b9181601f840112156101545782359167ffffffffffffffff8311610154576020838186019501011161015457565b9181601f840112156101545782359167ffffffffffffffff8311610154576020808501948460051b01011161015457565b60005b8381106101cb5750506000910152565b81810151838201526020016101bb565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610217815180928187528780880191016101b8565b0116010190565b6020808201906020835283518092526040830192602060408460051b8301019501936000915b8483106102545750505050505090565b9091929394958480610290837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a516101db565b9801930193019194939290610244565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545767ffffffffffffffff600435818111610154576102eb903690600401610187565b60243583811161015457610303903690600401610187565b9190936044359081116101545761031e903690600401610187565b9190926103296109f9565b82821480610438575b61033b90610777565b6103448361086c565b95816103c057505060005b81811061037057505050505061036c905b6040519182918261021e565b0390f35b806103a4610389610384600194868a6108fd565b610912565b61039e61039784888a61091f565b36916109b9565b90610a6f565b6103ae82896109e5565b526103b981886109e5565b500161034f565b9160009391935b8181106103de575050505050505061036c90610360565b8061041c6103f2610384600194868c6108fd565b61041661040084888c61091f565b919061040d868c8c6108fd565b359236916109b9565b91610b15565b610426828b6109e5565b52610431818a6109e5565b50016103c7565b508015806103325750808314610332565b34610154576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610133576104816109f9565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b346101545760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015457602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561056e81610136565b60443567ffffffffffffffff81116101545761036c916105a06105986105aa933690600401610159565b6103976109f9565b9060243590610b15565b6040519182916020835260208301906101db565b346101545760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015457602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101545760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561066881610136565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036106ae5761001990610b3c565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b346101545760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561071981610136565b6107216109f9565b73ffffffffffffffffffffffffffffffffffffffff8116156107465761001990610b3c565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b1561077e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77726f6e67206172726179206c656e67746800000000000000000000000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761084f57604052565b6107dc565b67ffffffffffffffff811161084f5760051b60200190565b9061087e61087983610854565b61080b565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06108ac8294610854565b019060005b8281106108bd57505050565b8060606020809385010152016108b1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561090d5760051b0190565b6108ce565b3561091c81610136565b90565b919081101561090d5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015457019081359167ffffffffffffffff8311610154576020018236038113610154579190565b67ffffffffffffffff811161084f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9291926109c86108798361097f565b938285528282011161015457816000926020928387013784010152565b805182101561090d5760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff6000541633036106ae57565b6020818303126101545780519067ffffffffffffffff8211610154570181601f82011215610154578051610a506108798261097f565b92818452602082840101116101545761091c91602080850191016101b8565b81516000939284928392916020019083905af1913d15610b0d573d90610a976108798361097f565b9182523d81602084013e5b819315610aad575050565b604482511061013357610b09610acf8360248060048301518301019101610a1a565b6040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301906101db565b0390fd5b606090610aa2565b825160009493859384936020909201915af1913d15610b0d573d90610a976108798361097f565b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a356fea2646970667358221220e7ff2dcb7dd25f0e1c02d38698786ad34fbe930f75f5d40dea3bbb0a92aa67e264736f6c63430008180033a264697066735822122002d78016f72655bd545820c08db78dd9031a8bc6c9e7576d88ab82cb4fb5834d64736f6c63430008180033",T="0x60808060405260043610156200001457600080fd5b600090813560e01c9081627c94b614620056ec5750806301ffc9a714620055c05780630661d1dc146200555b57806306fdde03146200541e578063081812fc1462005393578063095ea7b314620051eb5780630d253d76146200509e57806311464fbe146200504b57806318160ddd1462004fee5780631cb04b781462004c6e57806323b872dd1462004c5157806324d735671462004a5c578063277ecfbb14620049535780632f745c591462004907578063415fa50a14620048a057806342842e0e1462004871578063485cc9551462003ffb5780634cd88b7614620039e15780634f6ccce7146200393e578063502c040b146200384d57806354c87af41462003803578063572edf7914620034255780635872fe4514620033dd5780636352211e146200339c578063676db98114620033305780636a627842146200329557806370a08231146200324d578063715018a6146200318b578063722fed7e146200310e57806374de69e314620030865780638ad4154d1462002c8e5780638da5cb5b1462002c1b57806395d89b411462002ac957806395ecc64214620029c95780639859387b14620029635780639dd3e2551462002919578063a22cb46514620027eb578063a4abc3f91462002474578063ac9650d81462002211578063b23e448014620021aa578063b66f7a8b14620020c5578063b88d4fde146200204c578063c516e156146200200e578063c87b56dd14620017cf578063d2da7bca146200177b578063e715de2814620008dc578063e985e9c5146200081a578063ef79266214620007dd578063f2fde38b146200078a578063f9bc3f40146200073e578063fac6350d1462000350578063fe7f43da14620002dd5763fe9eba15146200029d57600080fd5b34620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020600754604051908152f35b80fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760043590600c54821015620002da57602073ffffffffffffffffffffffffffffffffffffffff620003408462005ca3565b9190546040519260031b1c168152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576024357f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed025480821162000735575b50620003c9620003c36004358362006918565b620065b1565b9060043573ffffffffffffffffffffffffffffffffffffffff60025416905b82811062000404576040518062000400868262005b6a565b0390f35b8085526004602052604085205490818652600360205260408620916040516200042d81620058f1565b620004388462005a12565b8152620004486001850162005a12565b602082015273ffffffffffffffffffffffffffffffffffffffff6006620004726002870162005a12565b95866040850152600381015460608501526004810154608085015260058101546fffffffffffffffffffffffffffffffff811660a086015260801c60c085015201541660e0820152805191602082015191604051620004d181620059b3565b604881527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208201527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408201527f6574732f6e66742f0000000000000000000000000000000000000000000000006060820152620005c16024620005588862006d44565b9260405193816200057486935180926020808701910162005798565b82016200058b825180936020808501910162005798565b017f2e706e67000000000000000000000000000000000000000000000000000000006020820152036004810184520182620059d0565b6fffffffffffffffffffffffffffffffff60a083015116906fffffffffffffffffffffffffffffffff60c0840151169273ffffffffffffffffffffffffffffffffffffffff604051957f70a082310000000000000000000000000000000000000000000000000000000087521660048601526020856024818d5afa9485156200072a578d95620006dc575b509060019873ffffffffffffffffffffffffffffffffffffffff60e0620006d4999897969594015116956040519762000685896200593e565b8a8952602089015260408801526060870152608086015260a085015260c084015260e0830152610100820152620006bf6004358462006918565b90620006cc828962005e08565b528662005e08565b5001620003e8565b969594509291906020873d60201162000721575b81620006ff60209383620059d0565b810103126200071c5795519495939493919290919060016200064c565b600080fd5b3d9150620006f0565b6040513d8f823e3d90fd5b905038620003b0565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760206200078260065460075490620064ed565b604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620007da620007ca62005750565b620007d462006cd3565b62006b6e565b80f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760206200078262006b30565b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200085662005750565b73ffffffffffffffffffffffffffffffffffffffff620008bf6200087962005774565b9273ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b9116600052602052602060ff604060002054166040519015158152f35b5034620002da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60608136011262001777576200091962005750565b906024359067ffffffffffffffff82116200141b576101009082360301126200141757604051906200094b82620058f1565b806004013567ffffffffffffffff8111620017735762000972906004369184010162005b1d565b8252602481013567ffffffffffffffff811162001773576200099b906004369184010162005b1d565b602083015260448101359067ffffffffffffffff82116200177357620009ca60e4926004369184010162005b1d565b60408401526064810135606084015260848101356080840152620009f160a4820162005d4a565b60a084015262000a0460c4820162005d4a565b60c0840152013573ffffffffffffffffffffffffffffffffffffffff811681036200071c5760e082015273ffffffffffffffffffffffffffffffffffffffff62000a4e83620067fd565b169173ffffffffffffffffffffffffffffffffffffffff8116156200174257826000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079302908160205273ffffffffffffffffffffffffffffffffffffffff60406000205416918262001673575b62000b058273ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b6001815401905584600052602052604060002073ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558373ffffffffffffffffffffffffffffffffffffffff8216837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48162001572577f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0360205260406000205562000bf584620067b0565b73ffffffffffffffffffffffffffffffffffffffff8116820362001464575b5062001433576044356200136f575b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101116200134257807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809201855260046020528360408620558385526005602052016040842055805190602081015190604081015160608201516080830151916fffffffffffffffffffffffffffffffff60c08160a08701511695015116946040519662000cf688620058f1565b8752602087015260408601526060850152608084015260a083015260c08201528260e0820152818352600360205260408320815180519067ffffffffffffffff8211620011ee57819062000d4b84546200589b565b601f8111620012ef575b50602090601f8311600114620012275787926200121b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161781555b602082015180519067ffffffffffffffff8211620011ee57819062000dc860018501546200589b565b601f811162001198575b50602090601f8311600114620010ca578792620010be575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161760018201555b604082015193845167ffffffffffffffff8111620010915762000e4660028401546200589b565b95601f871162001047575b602096508690601f831160011462000f6257928260069373ffffffffffffffffffffffffffffffffffffffff969360e096849262000f56575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161760028301555b606086015160038301556080860151600483015560058201906fffffffffffffffffffffffffffffffff60a0880151168254917fffffffffffffffffffffffffffffffff0000000000000000000000000000000060c08a015160801b1692161717905501920151167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b01519050388062000e8a565b9060028501845287842091845b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0851681106200102f57508373ffffffffffffffffffffffffffffffffffffffff969360e09693600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600699161062000ff7575b505050811b01600283015562000ebf565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062000fe6565b91928960018192868501518155019401920162000f6f565b60028401835260208320601f830160051c81016020841062001089575b601f890160051c820181106200107c57505062000e51565b6000815560010162001064565b508062001064565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062000dea565b9250600184018752602087209087935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841685106200117c5760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081161062001144575b505050811b01600182015562000e1f565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062001133565b81810151835560209485019460019093019290910190620010da565b90915060018401875260208720601f840160051c810160208510620011e6575b90849392915b601f830160051c82018110620011d657505062000dd2565b60008155859450600101620011be565b5080620011b8565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062000d6d565b9250838752602087209087935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168510620012d35760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08116106200129b575b505050811b01815562000d9f565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880806200128d565b8181015183556020948501946001909301929091019062001234565b90915083875260208720601f840160051c8101602085106200133a575b90849392915b601f830160051c820181106200132a57505062000d55565b6000815585945060010162001312565b50806200130c565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b82602073ffffffffffffffffffffffffffffffffffffffff600254166064604051809481937f23b872dd00000000000000000000000000000000000000000000000000000000835233600484015288602484015260443560448401525af180156200142857620013e1575b5062000c23565b6020813d6020116200141f575b81620013fd60209383620059d0565b810103126200141b575180151503620014175738620013da565b8280fd5b8380fd5b3d9150620013ee565b6040513d86823e3d90fd5b602483604051907f73c6ac6e0000000000000000000000000000000000000000000000000000000082526004820152fd5b6200146f8162006714565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810111620015435773ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92166000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed00602052604060002082820160005260205284604060002055846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01602052016040600020553862000c14565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116821462000bf5576200159b8262006714565b846000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01806020526040600020549082820362001622575b50508460005260006040812055826000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed006020526040600020906000526020526000604081205562000bf5565b60008581527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0060209081526040808320868452825280832054858452818420819055835292905220553880620015d4565b620016cc856000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260406000207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b620017168373ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815401905562000abb565b602484604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b8480fd5b5080fd5b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200180e60043562006c32565b5060043581526003602052604081209073ffffffffffffffffffffffffffffffffffffffff6006604051936200184485620058f1565b6200184f8162005a12565b85526200185f6001820162005a12565b6020860152620018726002820162005a12565b6040860152600381015460608601526004810154608086015260058101546fffffffffffffffffffffffffffffffff811660a087015260801c60c086015201541660e083015281519060208301519260405193620018d085620059b3565b604885526200195f604060208701947f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f86527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f617373828901527f6574732f6e66742f000000000000000000000000000000000000000000000000606089015260043581526005602052205462006d44565b9160408101519062001975606082015162006f0e565b9162001985608083015162006f0e565b90620019a76fffffffffffffffffffffffffffffffff60a08501511662006d44565b9473ffffffffffffffffffffffffffffffffffffffff60e0620019e06fffffffffffffffffffffffffffffffff60c08801511662006d44565b9501511696879860405199620019f68b6200595c565b602a8b5260208b01996040368c378b511562001fdf5760308b538b516001101562001fdf57607860218d015360295b6001811162001f6d575062001f3557506040519b8c809c602082017f7b000000000000000000000000000000000000000000000000000000000000009052602182017f226e616d65223a2022000000000000000000000000000000000000000000000090528051602a819301916020019162001aa19262005798565b8c01937f222c2000000000000000000000000000000000000000000000000000000000009485602a820152602d81017f226465736372697074696f6e223a202200000000000000000000000000000000905281519182603d8301916020019162001b0b9262005798565b019084603d830152604082017f22696d616765223a2022000000000000000000000000000000000000000000009052519182604a830162001b4c9262005798565b0181519182604a8301916020019162001b659262005798565b0190604a82017f2e706e67000000000000000000000000000000000000000000000000000000009052604e820152605181017f2261747472696275746573223a205b00000000000000000000000000000000009052606081017f7b2274726169745f74797065223a202254797065222c202276616c7565223a209052608081017f220000000000000000000000000000000000000000000000000000000000000090528151918260818301916020019162001c209262005798565b017f227d2c000000000000000000000000000000000000000000000000000000000093846081830152608482017f7b2274726169745f74797065223a202250726f6d7074222c202276616c75652290527f3a20220000000000000000000000000000000000000000000000000000000000918260a48201528151918260a78301916020019162001cb09262005798565b01908460a783015260aa82017f7b2274726169745f74797065223a2022536563726574222c202276616c756522905260ca8201528151918260cd8301916020019162001cfc9262005798565b01928260cd850152827f7b22646973706c61795f74797065223a202264617465222c202274726169745f918260d087015260f086017f74797065223a202253746172742064617465222c202276616c7565223a202200905261010f9581519182888301916020019162001d6f9262005798565b019485015261011284015261013283017f74797065223a2022456e642064617465222c202276616c7565223a2022000000905261014f9281519182858301916020019162001dbd9262005798565b019182015261015281017f7b2274726169745f74797065223a202257696e6e65722061646472657373222c905261017281017f202276616c7565223a2022000000000000000000000000000000000000000000905261017d9251918284830162001e279262005798565b019081017f227d000000000000000000000000000000000000000000000000000000000000905261017f81017f5d00000000000000000000000000000000000000000000000000000000000000905261018081017f7d00000000000000000000000000000000000000000000000000000000000000905203610161810182526101810162001eb69082620059d0565b62001ec1906200706b565b6040518091602082017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000905280519081603d8401916020019162001f059262005798565b810103601d81018252603d0162001f1d9082620059d0565b604051809160208252602082016200040091620057bd565b604490604051907fe22e27eb000000000000000000000000000000000000000000000000000000008252600482015260146024820152fd5b90600f8116601081101562001fdf577f3031323334353637383961626364656600000000000000000000000000000000901a62001fab838f62006efc565b5360041c90801562001543577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0162001a25565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020600654604051908152f35b5034620002da5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200208862005750565b6200209262005774565b6064359167ffffffffffffffff83116200141b57620020ba620007da93369060040162005b1d565b916044359162006971565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040602091600435815260038352206040516200211481620058f1565b6200211f8262005a12565b81526200212f6001830162005a12565b83820152620021416002830162005a12565b6040820152600382015460608201526004820154608082015260e073ffffffffffffffffffffffffffffffffffffffff600660058501546fffffffffffffffffffffffffffffffff811660a086015260801c948560c08601520154169101526040519042118152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604060209173ffffffffffffffffffffffffffffffffffffffff6200220062005750565b168152600183522054604051908152f35b5034620002da576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620017775760043567ffffffffffffffff8082116200141b57366023830112156200141b578160040135818111620017735760059160243683851b860182011162002470576040518795949291620022978262005979565b86825287820193620022a98662005d9a565b96620022b96040519889620059d0565b8688527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0620022e88862005d9a565b01895b8181106200246057505088917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbd82360301925b888110620023a7578b8b8b60405191838301848452825180915260408401948060408360051b870101940192955b8287106200235a5785850386f35b90919293828062002396837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08a600196030186528851620057bd565b96019201960195929190926200234c565b8481839d9c9d1b84010135848112156200245c57830190858201359188831162002458576044018d8336038213620002da578062002434928f6200241d62002410918f988e60019a60405195838794868601998a37840191858301938a85525193849162005798565b01038084520182620059d0565b5190305af46200242c62006ec7565b9030620072a1565b62002440828d62005e08565b526200244d818c62005e08565b50019a999a6200231e565b8d80fd5b8c80fd5b60608a82018d01528b01620022eb565b8680fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620024b062005750565b90620024bc8262006714565b620024c781620065b1565b91809373ffffffffffffffffffffffffffffffffffffffff60025416945b838110620024fd576040518062000400878262005b6a565b620025098183620064fb565b908184526005602052604084205460036020526040852088604051946200253086620058f1565b6200253b8362005a12565b86526200254b6001840162005a12565b602087015273ffffffffffffffffffffffffffffffffffffffff6006620025756002860162005a12565b948560408a0152600381015460608a0152600481015460808a015260058101546fffffffffffffffffffffffffffffffff811660a08b015260801c60c08a015201541660e08701528580519360208201519060405191620025d683620059b3565b604883527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208401527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408401527f6574732f6e66742f00000000000000000000000000000000000000000000000060608401526200269b60206200265d8a62006d44565b94604051958162002678889351809286808701910162005798565b82016200268e8251809386808501910162005798565b01038086520184620059d0565b602073ffffffffffffffffffffffffffffffffffffffff60246fffffffffffffffffffffffffffffffff60c08160a08a0151169801511697604051998a9384927f70a082310000000000000000000000000000000000000000000000000000000084521660048301525afa958615620027e0578c9662002790575b5073ffffffffffffffffffffffffffffffffffffffff60e060019b0151169660405198620027448a6200593e565b8952602089015260408801526060870152608086015260a085015260c084015260e08301526101008201526200277b828862005e08565b5262002788818762005e08565b5001620024e5565b99955060208a3d602011620027d7575b81620027af60209383620059d0565b810103126200071c579851949873ffffffffffffffffffffffffffffffffffffffff62002716565b3d9150620027a0565b6040513d8e823e3d90fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200282762005750565b60243590811515809203620014175773ffffffffffffffffffffffffffffffffffffffff16908115620028e8573360009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604090208260005260205260406000207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b602482604051907f5b08ba180000000000000000000000000000000000000000000000000000000082526004820152fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600483522054604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab620029a562005750565b620067fd565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600383522060405162002a1881620058f1565b62002a238262005a12565b815262002a336001830162005a12565b8382015262002a456002830162005a12565b6040820152600382015460608201526004820154608082015260058201549060e073ffffffffffffffffffffffffffffffffffffffff60066fffffffffffffffffffffffffffffffff8516948560a086015260801c958660c0860152015416910152421015908162002abd575b506040519015158152f35b90504211153862002ab2565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040517f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301805482600062002b2e836200589b565b928383526020946001918660018216918260001462002bd857505060011462002b78575b505062002b6292500383620059d0565b62000400604051928284938452830190620057bd565b8592506000527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e906000915b85831062002bbf57505062002b629350820101858062002b52565b8054838901850152879450869390920191810162002ba4565b9150935062002b629592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101858062002b52565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57602073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b5034620002da5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576004359062002cce62005774565b67ffffffffffffffff906044358281116200141b579062002d157fffffffffffffffffffffffff000000000000000000000000000000000000000092369060040162005b1d565b5062002d2062006cd3565b8484526020926003845260066040862062002d66600582015462002d59426fffffffffffffffffffffffffffffffff83161115620063bb565b429060801c101562006421565b01805473ffffffffffffffffffffffffffffffffffffffff809462002d8e8284161562006487565b169485911617905560065460018101809111620030595760065582855260088452604085209586546801000000000000000097888210156200302c5762002de1828492600162002e179501815562005d31565b9091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83549160031b92831b921b1916179055565b83865260098552604086208054906001820180921162002fff5755602485848060025416931692604051928380927f70a082310000000000000000000000000000000000000000000000000000000082528660048301525afa90811562002ff457879162002fc1575b50848752600a865262002e9960408820918254620064ed565b9055803b1562002fbd57908580926024604051809581937fc4d66de80000000000000000000000000000000000000000000000000000000083528960048401525af1801562002fb25762002f9c575b5050818452600b835260ff6040852054161562002f03578380f35b600c549485101562002f6f5762002f24856001600b969701600c5562005ca3565b819291549060031b9184831b921b19161790558352526040812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055803880808380f35b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8195929511620010915760405292388062002ee8565b6040513d88823e3d90fd5b8580fd5b90508581813d831162002fec575b62002fdb8183620059d0565b810103126200247057513862002e80565b503d62002fcf565b6040513d89823e3d90fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620030c262005750565b73ffffffffffffffffffffffffffffffffffffffff16815260086020526040812080546024359290831015620002da57602062003100848462005d31565b90546040519160031b1c8152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760807f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02546200316d62006b30565b60065460075491604051938452602084015260408301526060820152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620031c662006cd3565b8073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993008054907fffffffffffffffffffffffff000000000000000000000000000000000000000082169055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620007826200328f62005750565b62006714565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620032d162005750565b5060646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f44697361626c65642e00000000000000000000000000000000000000000000006044820152fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760ff604060209273ffffffffffffffffffffffffffffffffffffffff6200338862005750565b168152600b84522054166040519015158152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab60043562006c32565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620029ab6200341f62005750565b62006667565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6200347662005750565b1681526008602052604081209060405191826020825491828152019183526020832090835b818110620037ec5750505082620034b4910383620059d0565b8151620034c181620065b1565b91809373ffffffffffffffffffffffffffffffffffffffff60025416905b838610620034f7576040518062000400878262005b6a565b62003503868262005e08565b5195868452600560205260408420546003602052604085206040516200352981620058f1565b620035348262005a12565b8152620035446001830162005a12565b6020820152620035576002830162005a12565b91826040830152600381015460608301526004810154608083015260058101546fffffffffffffffffffffffffffffffff811660a084015260801c60c08301526006015473ffffffffffffffffffffffffffffffffffffffff1660e0820152805191602082015190604051620035cd81620059b3565b604881527f68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f60208201527f6d2f70726f6d70746f7765722f7765626170702f6d61696e2f7372632f61737360408201527f6574732f6e66742f00000000000000000000000000000000000000000000000060608201526200364e8662006d44565b90604051918183925190816020850191602001916200366d9262005798565b820181519182602083019160200191620036879262005798565b01038082526020016200369b9082620059d0565b60a08401516fffffffffffffffffffffffffffffffff169160c08501516fffffffffffffffffffffffffffffffff16936040519e8f907f70a0823100000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff166004820152808c5a92602491602094fa958615620027e0578c96620037af575b60019a9b9c9d9e9f5060e073ffffffffffffffffffffffffffffffffffffffff9101511696604051986200375e8a6200593e565b8952602089015260408801526060870152608086015260a085015260c084015260e083015261010082015262003795828962005e08565b52620037a2818862005e08565b50019493929190620034df565b955060208f813d8311620037e4575b620037ca8183620059d0565b81010312620037e0579d519c9d8e9d956200372a565b8b80fd5b503d620037be565b82548452602090930192600192830192016200349b565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760406020916004358152600583522054604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff602081620038a162005774565b16916024604051809481937f70a082310000000000000000000000000000000000000000000000000000000083526004351660048301525afa90811562003933578291620038f7575b6020826040519015158152f35b90506020813d6020116200392a575b816200391560209383620059d0565b810103126200177757602091505138620038ea565b3d915062003906565b6040513d84823e3d90fd5b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600435907f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254821015620039ab576020620031008362005cdb565b604491604051917fa57d13dc00000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5767ffffffffffffffff600435818111620014175762003a3790369060040162005b1d565b906024358181116200141b5762003a5390369060040162005b1d565b917ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549360ff8560401c1615928286169586158062003ff3575b6001809814908162003fe8575b15908162003fde575b5062003fb45784877fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000831617875562003f7e575b5062003ae462007247565b80518381116200302c577f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300908062003b1d83546200589b565b93601f9485811162003f0c575b5060209085831160011462003e4f578b9262003e43575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828a1b9260031b1c19161790555b8151908382116200302c5781907f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793019362003bad85546200589b565b82811162003dcf575b50602091831160011462003d1257899262003d06575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82881b9260031b1c19161790555b62003c0762007247565b62003c1162007247565b60405190610c738083019182118383101762003cd957908291620076258339039085f08015620014285773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff000000000000000000000000000000000000000085541617845562003c81578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff60209354169055604051908152a138808280f35b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b01519050388062003bcc565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe089941691858b527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e928b5b81811062003db65750841162003d7e575b505050811b01905562003bfd565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062003d70565b8284015185558b96909401936020938401930162003d5f565b90919250848a527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e8380860160051c8201926020871062003e39575b9186958c929594930160051c01915b82811062003e2a57505062003bb6565b8c81558695508b910162003e1a565b9250819262003e0b565b01519050388062003b41565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08b941691858d527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf81928d5b81811062003ef35750841162003ebb575b505050811b01905562003b72565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808062003ead565b8284015185558d96909401936020938401930162003e9c565b909150838b527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf818580850160051c8201926020861062003f74575b918c91869594930160051c01915b82811062003f6557505062003b2a565b8d81558594508c910162003f55565b9250819262003f47565b7fffffffffffffffffffffffffffffffffffffffffffffff00000000000000000016680100000000000000011785553862003ad9565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b9050153862003aa5565b303b15915062003a9c565b508462003a8f565b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200403762005750565b6200404162005774565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff82168015908162004860575b600114908162004855575b1590816200484b575b5062003fb45760017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005560ff8260401c1615620047f5575b604051620040f88162005996565b601781527f436170747572652d7468652d50726f6d70742047616d65000000000000000000602082015260405190620041318262005996565b600382527f435450000000000000000000000000000000000000000000000000000000000060208301526200416562007247565b80519067ffffffffffffffff821162003cd9578190620041a67f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300546200589b565b601f811162004729575b50602090601f831160011462004604578892620045f8575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916177f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300555b80519067ffffffffffffffff8211620011ee5781906200425b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301546200589b565b601f811162004529575b50602090601f8311600114620044295787926200441d575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916177f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079301555b620042d962007247565b620042e362007247565b604051610c738082019082821067ffffffffffffffff83111762003cd957908291620076258339039085f0908115620014285760ff936200436873ffffffffffffffffffffffffffffffffffffffff92837fffffffffffffffffffffffff0000000000000000000000000000000000000000951685895416178855620007d462007247565b6200437262007247565b1690600254161760025560401c1615620043895780f35b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180f35b0151905038806200427d565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930188527ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016885b818110620045105750908460019594939210620044d8575b505050811b017f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930155620042cf565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080620044aa565b9293602060018192878601518155019501930162004492565b9091507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793018752601f830160051c7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e019060208410620045cf575b90601f8493920160051c7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e01905b818110620045c0575062004265565b888155849350600101620045b1565b7ff4bad0a69248f59680a4f2b3000328cec71a413447c96781cfe5996daa8c456e915062004583565b015190503880620041c8565b92507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930088527f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf819088935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0841685106200470d5760019450837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0811610620046d5575b505050811b017f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300556200421a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080620046a7565b818101518355602094850194600190930192909101906200464e565b9091507f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008852601f830160051c7f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf810160208410620047cd575b908392915b601f820160051c7f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf81018110620047be5750620041b0565b89815584935060010162004787565b507f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf8162004782565b680100000000000000017fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0055620040ea565b905015386200408e565b303b15915062004085565b604084901c60ff161591506200407a565b5034620002da57620007da620048873662005838565b9060405192620048978462005979565b85845262006971565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604060209173ffffffffffffffffffffffffffffffffffffffff620048f662005750565b168152600a83522054604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576020620007826200494962005750565b60243590620064fb565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57604062004a0a916004358152600360205220620049a28162005a12565b90620049b16001820162005a12565b620049bf6002830162005a12565b9160038101549262004a2860048301549162004a1973ffffffffffffffffffffffffffffffffffffffff600660058701549601541695604051998a99610100808c528b0190620057bd565b9089820360208b0152620057bd565b908782036040890152620057bd565b93606086015260808501526fffffffffffffffffffffffffffffffff811660a085015260801c60c084015260e08301520390f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600435602462004a9d62005774565b9162004aa862006cd3565b80845260206003815260066040862062004ae0600582015462002d59426fffffffffffffffffffffffffffffffff83161115620063bb565b01938185549373ffffffffffffffffffffffffffffffffffffffff95869162004b0c8388161562006487565b8260405195869485937f70a08231000000000000000000000000000000000000000000000000000000008552166004840152165afa90811562002fb257869162004c1e575b501562004bc057507fffffffffffffffffffffffff0000000000000000000000000000000000000000161790556007546001810180911162004b935760075580f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600f60248201527f48617665206e6f206261646765732e00000000000000000000000000000000006044820152fd5b90508181813d831162004c49575b62004c388183620059d0565b8101031262002fbd57513862004b51565b503d62004c2c565b5034620002da57620007da62004c673662005838565b9162005e1d565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57600c5460043581811162004fe6575b9062004cbb8262005d9a565b9162004ccb6040519384620059d0565b80835262004cd98162005d9a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208501920136833762004d0f8162005db3565b9062004d1b8162005db3565b9362004d278262005db3565b90875b83811062004fc45750825b81811062004e52575050865b82811062004dc957505050604051948594606086019060608752518091526080860193915b81811062004d99575050508162004d8a918562000400959403602087015262005802565b90838203604085015262005802565b825173ffffffffffffffffffffffffffffffffffffffff1685528796506020948501949092019160010162004d66565b8073ffffffffffffffffffffffffffffffffffffffff62004dfd62004df6600194869b98999a9b62005e08565b5162005ca3565b90549060031b1c168062004e12838862005e08565b52808a52600960205260408a205462004e2c838962005e08565b528952600a602052604089205462004e45828a62005e08565b5201959493929562004d41565b88979495969783511562004f975773ffffffffffffffffffffffffffffffffffffffff62004e84602086015162005ca3565b90549060031b1c168a52600a60205260408a205460015b86811062004f08575091809160019373ffffffffffffffffffffffffffffffffffffffff62004eca8462005ca3565b90549060031b1c168d52600a60205260408d20541162004ef3575b505001969594939662004d35565b62004eff908662005e08565b52803862004ee5565b73ffffffffffffffffffffffffffffffffffffffff62004f2d62004df6838962005e08565b90549060031b1c168c52600a6020528160408d20541062004f52575b60010162004e9b565b91505073ffffffffffffffffffffffffffffffffffffffff62004f7a62004df6838762005e08565b905460039190911b1c168a52600a60205260408a20548162004f49565b60248a7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b808062004fd9600193869b98999a9b62005e08565b5201969594939662004d2a565b508062004caf565b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5760207f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0254604051908152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da57620050da62005750565b90620051e26102de62002410620051d660208096604051906200510083870183620059d0565b858252828201956200734787396200517f620051ac73ffffffffffffffffffffffffffffffffffffffff809a5416928a604051917fc4d66de80000000000000000000000000000000000000000000000000000000088840152166024820152602481526200516e816200595c565b604051928391878301958662005d68565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282620059d0565b604051958693620051c6868601998a925192839162005798565b8401915180938684019062005798565b51902060243562006cb3565b60405191168152f35b5034620002da5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576200522762005750565b602435620052358162006c32565b3315158062005372575b8062005312575b620052e257819073ffffffffffffffffffffffffffffffffffffffff809416938491167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258680a482527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260408220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b60246040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152336004820152fd5b506200535d8173ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b33855260205260ff6040852054161562005246565b503373ffffffffffffffffffffffffffffffffffffffff821614156200523f565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff6040602092600435620053ed8162006c32565b5081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793048452205416604051908152f35b5034620002da57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576040519080827f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930092835462005484816200589b565b938484526020956001928760018216918260001462005516575050600114620054b9575b50505062002b6292500383620059d0565b8152859250907f37c58c799b6609234b945e882912ee9ad34948a1dfaa20a97485e1a7752bbf815b858310620054fd57505062002b629350820101388080620054a8565b80548389018501528794508693909201918101620054e1565b925094505062002b629592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388080620054a8565b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da5773ffffffffffffffffffffffffffffffffffffffff60066040602093600435815260038552200154161515604051908152f35b5034620002da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112620002da576004357fffffffff0000000000000000000000000000000000000000000000000000000081168091036200177757807f780e9d6300000000000000000000000000000000000000000000000000000000602092149081156200565957506040519015158152f35b7f80ac58cd00000000000000000000000000000000000000000000000000000000811491508115620056c1575b811562005696575b508262002ab2565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014826200568e565b7f5b5e139f000000000000000000000000000000000000000000000000000000008114915062005686565b905034620017775760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126200177757604060209273ffffffffffffffffffffffffffffffffffffffff6200574362005750565b1681526009845220548152f35b6004359073ffffffffffffffffffffffffffffffffffffffff821682036200071c57565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036200071c57565b60005b838110620057ac5750506000910152565b81810151838201526020016200579b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093620057fb8151809281875287808801910162005798565b0116010190565b90815180825260208080930193019160005b82811062005823575050505090565b83518552938101939281019260010162005814565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60609101126200071c5773ffffffffffffffffffffffffffffffffffffffff9060043582811681036200071c579160243590811681036200071c579060443590565b90600182811c92168015620058e6575b6020831014620058b757565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691620058ab565b610100810190811067ffffffffffffffff8211176200590f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610120810190811067ffffffffffffffff8211176200590f57604052565b6060810190811067ffffffffffffffff8211176200590f57604052565b6020810190811067ffffffffffffffff8211176200590f57604052565b6040810190811067ffffffffffffffff8211176200590f57604052565b6080810190811067ffffffffffffffff8211176200590f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176200590f57604052565b9060405191826000825462005a27816200589b565b9081845260209460019160018116908160001462005a9f575060011462005a5c575b50505062005a5a92500383620059d0565b565b600090815285812095935091905b81831062005a8657505062005a5a935082010138808062005a49565b8554888401850152948501948794509183019162005a6a565b91505062005a5a9593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138808062005a49565b67ffffffffffffffff81116200590f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f820112156200071c5780359062005b378262005ae2565b9262005b476040519485620059d0565b828452602083830101116200071c57816000926020809301838601378301015290565b6020808201908083528351809252604092604081018260408560051b8401019601946000925b85841062005ba2575050505050505090565b909192939495968580827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc085600195030187528a519062005c3b62005c2762005c1362005c026101208651865287870151908089880152860190620057bd565b8a8601518582038c870152620057bd565b6060808601519085830390860152620057bd565b6080808501519084830390850152620057bd565b9160a080820151906fffffffffffffffffffffffffffffffff8092169084015260c09081830151169083015260e0808201519083015273ffffffffffffffffffffffffffffffffffffffff610100809201511691015299019401940192959493919062005b90565b600c5481101562001fdf57600c6000527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70190600090565b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02805482101562001fdf576000527fa42f15e5d656f8155fd7419d740a6073999f19cd6e061449ce4a257150545bf20190600090565b805482101562001fdf5760005260206000200190600090565b35906fffffffffffffffffffffffffffffffff821682036200071c57565b60409073ffffffffffffffffffffffffffffffffffffffff62005d9794931681528160208201520190620057bd565b90565b67ffffffffffffffff81116200590f5760051b60200190565b9062005dbf8262005d9a565b62005dce6040519182620059d0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe062005dfe829462005d9a565b0190602036910137565b805182101562001fdf5760209160051b010190565b909173ffffffffffffffffffffffffffffffffffffffff8084169283156200638a576000938385527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079302946020868152604097858984205416973315158062006263575b50881590811562006194575b62005ed68373ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b600181540190558885528352898420857fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905587858a7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a415620060b3577f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed02548784527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0383528984205562005f9187620067b0565b83880362005fe8575b50505050169283830362005fae5750505050565b6064945051927f64283d7b000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b62005ff39062006714565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411620060865782917f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed01918a94527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed008152838320858452815287848420558783525220553880808062005f9a565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b87841462005f9157620060c68862006714565b8784527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed018084528a852054908282036200613e575b5050878452838a8120558884527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0083528984209084528252828981205562005f91565b8a86527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed008086528c872084885286528c872054908c885286528c87208388528652808d882055865284528a8520553880620060fb565b620061ed896000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260406000207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b620062378a73ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff815401905562005e8c565b80620062e6575b1562006277573862005e80565b89888a620062ae5760249151907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b90517f177e802f0000000000000000000000000000000000000000000000000000000081523360048201526024810191909152604490fd5b5033891480156200632d575b806200626a57508784527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079304835233878b86205416146200626a565b50620063788973ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602052604060002090565b338552835260ff8a85205416620062f2565b60246040517f64a0ae9200000000000000000000000000000000000000000000000000000000815260006004820152fd5b15620063c357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f4e6f74207965742e0000000000000000000000000000000000000000000000006044820152fd5b156200642957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4f757464617465642e00000000000000000000000000000000000000000000006044820152fd5b156200648f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920736f6c7665642e00000000000000000000000000000000006044820152fd5b919082018092116200154357565b620065068162006714565b821015620065605773ffffffffffffffffffffffffffffffffffffffff166000527f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0060205260406000209060005260205260406000205490565b6040517fa57d13dc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201526024810191909152604490fd5b90620065bd8262005d9a565b604090620065cf6040519182620059d0565b8381527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0620065ff829562005d9a565b019160005b838110620066125750505050565b602090825162006622816200593e565b60008152606083908082840152808684015280808401526080830152600060a0830152600060c0830152600060e0830152600061010083015282860101520162006604565b62005d979073ffffffffffffffffffffffffffffffffffffffff80911680600052620024106200670a602060018152604060002054946102de946200517f620051ac60405193620066bb868a0186620059d0565b88855285850198620073478a396000541692604051907fc4d66de800000000000000000000000000000000000000000000000000000000878301526024820152602481526200516e816200595c565b5190209062006cb3565b73ffffffffffffffffffffffffffffffffffffffff8116156200677f576200677b9073ffffffffffffffffffffffffffffffffffffffff166000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079303602052604060002090565b5490565b60246040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152fd5b7f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed0290815491680100000000000000008310156200590f578262002de191600162005a5a9501905562005cdb565b620068088162006667565b803b620068fd575073ffffffffffffffffffffffffffffffffffffffff809116600090808252600160205260408220908154917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831462001342576001830190558383541690604051907fc4d66de8000000000000000000000000000000000000000000000000000000006020830152602482015260248152620068ac816200595c565b604051916102de8084019084821067ffffffffffffffff83111762003cd95791849391620068e09362007347863962005d68565b039083f5908115620068f157501690565b604051903d90823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff91501690565b919082039182116200154357565b90620069328262005ae2565b620069416040519182620059d0565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe062005dfe829462005ae2565b91906200698082828562005e1d565b803b6200698e575b50505050565b620069f973ffffffffffffffffffffffffffffffffffffffff809216946040519384937f150b7a0200000000000000000000000000000000000000000000000000000000968786523360048701521660248501526044840152608060648401526084830190620057bd565b03906020816000938185885af19082908262006ac8575b505062006a64578262006a2262006ec7565b805191908262006a5d57602482604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b9050602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000160362006a9757503880808062006988565b602490604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b909192506020813d60201162006b27575b8162006ae860209383620059d0565b81010312620017775751907fffffffff0000000000000000000000000000000000000000000000000000000082168203620002da575090388062006a10565b3d915062006ad9565b62005d977f645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed025462006b6760065460075490620064ed565b9062006918565b73ffffffffffffffffffffffffffffffffffffffff80911690811562006c01577f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805490837fffffffffffffffffffffffff00000000000000000000000000000000000000008316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b806000527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205273ffffffffffffffffffffffffffffffffffffffff6040600020541690811562006c82575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b605591600b9160405191604083015260208201523081520160ff81532090565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330362006d1457565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008082101562006eb8575b506d04ee2d6d415b85acef81000000008083101562006ea8575b50662386f26fc100008083101562006e98575b506305f5e1008083101562006e88575b506127108083101562006e78575b50606482101562006e67575b600a8092101562006e5c575b60019081602162006de56001870162006926565b95860101905b62006df8575b5050505090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff849101917f30313233343536373839616263646566000000000000000000000000000000008282061a83530491821562006e565791908262006deb565b62006df1565b916001019162006dd1565b919060646002910491019162006dc5565b6004919392049101913862006db9565b6008919392049101913862006dab565b6010919392049101913862006d9b565b6020919392049101913862006d88565b60409350810491503862006d6e565b3d1562006ef7573d9062006edb8262005ae2565b9162006eeb6040519384620059d0565b82523d6000602084013e565b606090565b90815181101562001fdf570160200190565b806040519162006f1e83620059b3565b6042835260208301606036823783511562001fdf576030905382516001906001101562001fdf57607860218501536041905b80821162006f9b57505062006f63575090565b604490604051907fe22e27eb000000000000000000000000000000000000000000000000000000008252600482015260206024820152fd5b9091600f811660108110156200703d577f3031323334353637383961626364656600000000000000000000000000000000901a62006fda848762006efc565b5360041c9180156200700f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019062006f50565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b9081511562007230576040519162007083836200595c565b604083527f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208401527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f604084015280519260029160028501809511620015435760038095047f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681036200154357620071259060029694961b62006926565b926020840192829183518401976020890192835194600085525b8a8110620071e25750505050600393949596505251068060011462007193576002146200716a575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff603d91015390565b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81603d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81940153015390565b836004919b989b019a8b51600190603f9082828260121c16870101518453828282600c1c16870101518385015382828260061c1687010151878501531684010151858201530196996200713f565b9050604051620072408162005979565b6000815290565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156200727757565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b90620072e25750805115620072b857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b815115806200733c575b620072f5575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15620072ec56fe60806040526102de8038038061001481610194565b92833981019060408183031261018f5780516001600160a01b03811680820361018f5760208381015190936001600160401b03821161018f570184601f8201121561018f5780519061006d610068836101cf565b610194565b9582875285838301011161018f57849060005b83811061017b57505060009186010152813b15610163577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03191682179055604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a28351156101455750600080848461012c96519101845af4903d1561013c573d61011c610068826101cf565b908152600081943d92013e6101ea565b505b6040516090908161024e8239f35b606092506101ea565b9250505034610154575061012e565b63b398979f60e01b8152600490fd5b60249060405190634c9c8ce360e01b82526004820152fd5b818101830151888201840152869201610080565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b957604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101b957601f01601f191660200190565b9061021157508051156101ff57805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580610244575b610222575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b1561021a56fe608060405273ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e156056573d90f35b3d90fdfea26469706673582212203409c5e3645254405cec23bd4d81aeddd5cfe35adffde4b964c788aa78461f0f64736f6c6343000818003360a0806040523461008e5733156100785760008054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a333608052610bdf90816100948239608051818181610609015261067f0152f35b631e4fbdf760e01b815260006004820152602490fd5b600080fdfe6080604052600436101561001b575b361561001957600080fd5b005b6000803560e01c908163150b7a021461009e5750806347e1da2a14610099578063715018a6146100945780638da5cb5b1461008f578063b61d27f61461008a578063c45a015514610085578063c4d66de8146100805763f2fde38b0361000e576106de565b61062d565b6105be565b610538565b6104e6565b610449565b6102a0565b346101335760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610133576100d8600435610136565b6100e3602435610136565b60643567ffffffffffffffff811161012f57610103903690600401610159565b50507f150b7a020000000000000000000000000000000000000000000000000000000060805260206080f35b5080fd5b80fd5b73ffffffffffffffffffffffffffffffffffffffff81160361015457565b600080fd5b9181601f840112156101545782359167ffffffffffffffff8311610154576020838186019501011161015457565b9181601f840112156101545782359167ffffffffffffffff8311610154576020808501948460051b01011161015457565b60005b8381106101cb5750506000910152565b81810151838201526020016101bb565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610217815180928187528780880191016101b8565b0116010190565b6020808201906020835283518092526040830192602060408460051b8301019501936000915b8483106102545750505050505090565b9091929394958480610290837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528a516101db565b9801930193019194939290610244565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545767ffffffffffffffff600435818111610154576102eb903690600401610187565b60243583811161015457610303903690600401610187565b9190936044359081116101545761031e903690600401610187565b9190926103296109f9565b82821480610438575b61033b90610777565b6103448361086c565b95816103c057505060005b81811061037057505050505061036c905b6040519182918261021e565b0390f35b806103a4610389610384600194868a6108fd565b610912565b61039e61039784888a61091f565b36916109b9565b90610a6f565b6103ae82896109e5565b526103b981886109e5565b500161034f565b9160009391935b8181106103de575050505050505061036c90610360565b8061041c6103f2610384600194868c6108fd565b61041661040084888c61091f565b919061040d868c8c6108fd565b359236916109b9565b91610b15565b610426828b6109e5565b52610431818a6109e5565b50016103c7565b508015806103325750808314610332565b34610154576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610133576104816109f9565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b346101545760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015457602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561056e81610136565b60443567ffffffffffffffff81116101545761036c916105a06105986105aa933690600401610159565b6103976109f9565b9060243590610b15565b6040519182916020835260208301906101db565b346101545760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261015457602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101545760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561066881610136565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036106ae5761001990610b3c565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b346101545760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101545760043561071981610136565b6107216109f9565b73ffffffffffffffffffffffffffffffffffffffff8116156107465761001990610b3c565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b1561077e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f77726f6e67206172726179206c656e67746800000000000000000000000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761084f57604052565b6107dc565b67ffffffffffffffff811161084f5760051b60200190565b9061087e61087983610854565b61080b565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06108ac8294610854565b019060005b8281106108bd57505050565b8060606020809385010152016108b1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561090d5760051b0190565b6108ce565b3561091c81610136565b90565b919081101561090d5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561015457019081359167ffffffffffffffff8311610154576020018236038113610154579190565b67ffffffffffffffff811161084f57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9291926109c86108798361097f565b938285528282011161015457816000926020928387013784010152565b805182101561090d5760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff6000541633036106ae57565b6020818303126101545780519067ffffffffffffffff8211610154570181601f82011215610154578051610a506108798261097f565b92818452602082840101116101545761091c91602080850191016101b8565b81516000939284928392916020019083905af1913d15610b0d573d90610a976108798361097f565b9182523d81602084013e5b819315610aad575050565b604482511061013357610b09610acf8360248060048301518301019101610a1a565b6040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301906101db565b0390fd5b606090610aa2565b825160009493859384936020909201915af1913d15610b0d573d90610a976108798361097f565b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a356fea2646970667358221220e7ff2dcb7dd25f0e1c02d38698786ad34fbe930f75f5d40dea3bbb0a92aa67e264736f6c63430008180033a264697066735822122002d78016f72655bd545820c08db78dd9031a8bc6c9e7576d88ab82cb4fb5834d64736f6c63430008180033",v={},w={},g={_format:y,contractName:u,sourceName:o,abi:l,bytecode:m,deployedBytecode:T,linkReferences:v,deployedLinkReferences:w},M="hh-sol-artifact-1",I="USDC",k="contracts/utils/USDC.sol",x=[{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"}],A="0x60803462000339576040906001600160401b03908083018281118282101762000323578352600981526020916854657374205553444360b81b838301528351928484018481108382111762000323578552600493848152635553444360e01b828201528351908382116200030e576003928354926001968785811c9516801562000303575b83861014620002ee578190601f9586811162000298575b508390868311600114620002315760009262000225575b505060001982871b1c191690871b1784555b8151948511620002105786548681811c9116801562000205575b82821014620001f057838111620001a5575b50809285116001146200013757509383949184926000956200012b575b50501b92600019911b1c19161790555b51610b2790816200033f8239f35b0151935038806200010d565b92919084601f1981168860005285600020956000905b898383106200018a57505050106200016f575b50505050811b0190556200011d565b01519060f884600019921b161c191690553880808062000160565b8587015189559097019694850194889350908101906200014d565b87600052816000208480880160051c820192848910620001e6575b0160051c019087905b828110620001d9575050620000f0565b60008155018790620001c9565b92508192620001c0565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000de565b604187634e487b7160e01b6000525260246000fd5b015190503880620000b2565b90899350601f1983169188600052856000209260005b8782821062000281575050841162000268575b505050811b018455620000c4565b015160001983891b60f8161c191690553880806200025a565b8385015186558d9790950194938401930162000247565b90915086600052836000208680850160051c820192868610620002e4575b918b91869594930160051c01915b828110620002d45750506200009b565b600081558594508b9101620002c4565b92508192620002b6565b602289634e487b7160e01b6000525260246000fd5b94607f169462000084565b604186634e487b7160e01b6000525260246000fd5b634e487b7160e01b600052604160045260246000fd5b600080fdfe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",C="0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde03146107bf57508163095ea7b3146106ba57816318160ddd1461067d57816323b872dd146104f3578163313ce567146104b957816340c10f19146103b057816370a082311461034f57816395d89b411461015757508063a9059cbb146101095763dd62ed3e1461009357600080fd5b3461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557806020926100cd610965565b6100d561098d565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461010557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010557602090610150610146610965565b60243590336109b0565b5160018152f35b83833461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101055780519082845460018160011c9060018316928315610345575b60209384841081146103195783885287959493929181156102be5750600114610242575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106102a857505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b805488850187015287945092850192810161026d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c4565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916101a0565b5050346101055760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105578060209273ffffffffffffffffffffffffffffffffffffffff6103a1610965565b16815280845220549051908152f35b919050346104b557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576103e9610965565b9073ffffffffffffffffffffffffffffffffffffffff6024359216928315610487576002549083820180921161045b575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b8560116024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8460249251917fec442f05000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020905160128152f35b9050823461067a5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067a5761052d610965565b61053561098d565b916044359373ffffffffffffffffffffffffffffffffffffffff8316808352600160205286832033845260205286832054917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830361059d575b6020886101508989896109b0565b8683106106355781156106065733156105d7575082526001602090815286832033845281529186902090859003905582906101508761058f565b602490848951917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602490848951917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b87517ffb8f41b2000000000000000000000000000000000000000000000000000000008152339181019182526020820193909352604081018790528291506060010390fd5b80fd5b50503461010557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610105576020906002549051908152f35b9050346104b557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5576106f2610965565b6024359033156107905773ffffffffffffffffffffffffffffffffffffffff1691821561076157508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b602490858551917f94280d62000000000000000000000000000000000000000000000000000000008352820152fd5b602483868651917fe602df05000000000000000000000000000000000000000000000000000000008352820152fd5b849084346104b557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104b5578260035460018160011c90600183169283156108f5575b60209384841081146103195783885287959493929181156102be57506001146108785750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff84118385101761021657508291826102129252826108ff565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106108df57505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936101c4565b80548885018701528794509285019281016108a4565b91607f1691610807565b60208082528251818301819052939260005b858110610951575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610911565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361098857565b9173ffffffffffffffffffffffffffffffffffffffff808416928315610ac05716928315610a8f5760009083825281602052604082205490838210610a37575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b6040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481019190915260448101839052606490fd5b60246040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152fd5b60246040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152fdfea264697066735822122067ce05df6d7ffb0e8f689c413f5cac896b68ec4b04d38d85186f104968cf2b0564736f6c63430008180033",R={},O={},E={_format:M,contractName:I,sourceName:k,abi:x,bytecode:A,deployedBytecode:C,linkReferences:R,deployedLinkReferences:O},B="hh-sol-artifact-1",h="Verified",N="contracts/Badge.sol",S=[{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"}],G="0x6080346200037f576001600160401b039060408181018381118382101762000369578152600e82526020916d566572696669656420426164676560901b838201528151938285018581108282111762000369578352600885526715995c9a599a595960c21b84860152815181811162000369576000948554916001948584811c941680156200035e575b838510146200034a578190601f94858111620002f7575b5083908583116001146200029357899262000287575b5050600019600383901b1c191690851b1786555b8651928311620002735783548481811c9116801562000268575b8282101462000254578281116200020c575b5080918311600114620001a557508495829394959262000199575b5050600019600383901b1c191690821b1790555b3315620001815760068054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36112919081620003858239f35b51631e4fbdf760e01b81526004810191909152602490fd5b01519050388062000111565b90601f198316968487528287209287905b898210620001f4575050838596979810620001da575b505050811b01905562000125565b015160001960f88460031b161c19169055388080620001cc565b808785968294968601518155019501930190620001b6565b8487528187208380860160051c8201928487106200024a575b0160051c019085905b8281106200023e575050620000f6565b8881550185906200022e565b9250819262000225565b634e487b7160e01b87526022600452602487fd5b90607f1690620000e4565b634e487b7160e01b86526041600452602486fd5b015190503880620000b6565b898052848a208894509190601f1984168b5b87828210620002e05750508411620002c6575b505050811b018655620000ca565b015160001960f88460031b161c19169055388080620002b8565b8385015186558b97909501949384019301620002a5565b9091508880528389208580850160051c82019286861062000340575b918991869594930160051c01915b82811062000331575050620000a0565b8b815585945089910162000321565b9250819262000313565b634e487b7160e01b88526022600452602488fd5b93607f169362000089565b634e487b7160e01b600052604160045260246000fd5b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",F="0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610eec5750806306fdde0314610e01578063081812fc14610d9d578063095ea7b314610c4d57806318160ddd14610c1057806323b872dd14610bfb57806342842e0e14610b605780636352211e14610b055780636a6278421461091f57806370a0823114610886578063715018a6146107e85780638da5cb5b1461079557806395d89b4114610623578063a22cb46514610520578063b88d4fde146102be578063c87b56dd1461024d578063e985e9c5146101d05763f2fde38b146100e957600080fd5b346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610120611038565b9061012961120a565b73ffffffffffffffffffffffffffffffffffffffff80921692831561019d575050600654827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8280fd5b50503461024957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760ff8160209361020e611038565b610216611060565b73ffffffffffffffffffffffffffffffffffffffff91821683526005875283832091168252855220549151911615158152f35b5080fd5b509190346102495760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495761028c6102ba93356111a9565b50818151610299816110e3565b528051916102a6836110e3565b825251918291602083526020830190610fda565b0390f35b50346101cc5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc576102f6611038565b916102ff611060565b906064359367ffffffffffffffff851161051c573660238601121561051c5784840135948661032d8761116f565b9161033a8551938461112e565b87835260209736602482840101116101cc578060248a93018386013783010152833b610364578680f35b856103d89173ffffffffffffffffffffffffffffffffffffffff98949596979880971696865193849283927f150b7a020000000000000000000000000000000000000000000000000000000097888552338d8601521660248401526044356044840152608060648401526084830190610fda565b038186895af18391816104c0575b5061045a5750503d15610452573d6103fd8161116f565b9061040a8451928361112e565b81528091863d92013e5b8051948561044c5750506024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b85925001fd5b506060610414565b7fffffffff00000000000000000000000000000000000000000000000000000000919296501603610492575050503880808080808680f35b6024935051917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b9091508781813d8311610515575b6104d8818361112e565b8101031261051157517fffffffff00000000000000000000000000000000000000000000000000000000811681036105115790386103e6565b8380fd5b503d6104ce565b8580fd5b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610558611038565b906024359182151580930361061f5773ffffffffffffffffffffffffffffffffffffffff169283156105f1575033845260056020528084208385526020528084207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925781519181600192600154938460011c9160018616958615610788575b602096878510811461075c578899509688969785829a5291826000146107175750506001146106bb575b5050506102ba92916106ac91038561112e565b51928284938452830190610fda565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106106ff57505050820101816106ac6102ba610699565b8054848a0186015288955087949093019281016106e6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b860190930193508492506106ac91506102ba9050610699565b60248360228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b92607f169261066f565b80fd5b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102495760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b833461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925761081f61120a565b8073ffffffffffffffffffffffffffffffffffffffff6006547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107925773ffffffffffffffffffffffffffffffffffffffff6108d4611038565b169283156108f15750806020938392526003845220549051908152f35b9060249251917f89c62b64000000000000000000000000000000000000000000000000000000008352820152fd5b50346101cc57602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261051157610959611038565b61096161120a565b600754907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838314610ad9576001830160075573ffffffffffffffffffffffffffffffffffffffff809216918215610aaa576002908489528188528289205416968715159586610a68575b50838952600381528289206001815401905584895252808720827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551947fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8780a4610a3c578280f35b916024927f73c6ac6e000000000000000000000000000000000000000000000000000000008352820152fd5b878252838a207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055888a5260038252838a20908154019055386109cd565b602486898451917f64a0ae92000000000000000000000000000000000000000000000000000000008352820152fd5b6024876011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5091346107925760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792575073ffffffffffffffffffffffffffffffffffffffff610b58602093356111a9565b915191168152f35b5090346101cc57610b7036611083565b9291908251610b7e816110e3565b868152813b610b8b578680f35b906103d896929173ffffffffffffffffffffffffffffffffffffffff809216958551927f150b7a020000000000000000000000000000000000000000000000000000000094858552338a86015216602484015260448301526080606483015281806020998a936084830190610fda565b833461079257610c0a36611083565b50505080f35b50503461024957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610249576020906007549051908152f35b5090346101cc57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57610c85611038565b91602435610c92816111a9565b33151580610d7d575b80610d48575b610d1957819073ffffffffffffffffffffffffffffffffffffffff809616958691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a484526020528220907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b83517fa9fbf51f0000000000000000000000000000000000000000000000000000000081523381850152602490fd5b5073ffffffffffffffffffffffffffffffffffffffff81168652600560205283862033875260205260ff848720541615610ca1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610c9b565b50346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57816020938273ffffffffffffffffffffffffffffffffffffffff9335610df2816111a9565b50825285522054169051908152f35b50913461079257807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610792578151918182549260018460011c9160018616958615610ee2575b602096878510811461075c578899509688969785829a529182600014610717575050600114610e87575050506102ba92916106ac91038561112e565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610eca57505050820101816106ac6102ba610699565b8054848a018601528895508794909301928101610eb1565b92607f1692610e4b565b925050346101cc5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cc57357fffffffff0000000000000000000000000000000000000000000000000000000081168091036101cc57602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610fb0575b8115610f86575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610f7f565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610f78565b919082519283825260005b8481106110245750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610fe5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361105b57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261105b5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361105b5791602435908116810361105b579060443590565b6020810190811067ffffffffffffffff8211176110ff57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176110ff57604052565b67ffffffffffffffff81116110ff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b80600052600260205273ffffffffffffffffffffffffffffffffffffffff604060002054169081156111d9575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff60065416330361122b57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea2646970667358221220083e7fa1c032fb5a4bba76690b0323350a9739b613a134d4a7afbcd7453c0bb864736f6c63430008180033",$={},D={},U={_format:B,contractName:h,sourceName:N,abi:S,bytecode:G,deployedBytecode:F,linkReferences:$,deployedLinkReferences:D};let e,f={Game:void 0,Award:void 0,Badge:void 0};async function a(){e||(e=new n(c.rpc)),f.Game||(f.Game=new t(c.contracts.Game,g.abi,e)),f.Award||(f.Award=new t(c.contracts.Award,E.abi,e)),f.Badge||(f.Badge=new t(c.contracts.Badge,U.abi,e))}async function z(b,d){return await a(),await f.Game.getNfts(b,d)}async function P(){return await a(),await f.Game.gameStatus()}async function J(b){return await a(),await f.Game.getTopSolvers(b)}async function V(b){return await a(),await f.Game.getPortfolioMaker(b)}async function W(b){return await a(),await f.Game.getPortfolioSolver(b)}export{U as B,g as G,E as U,P as a,J as b,c,V as d,W as e,z as g}; diff --git a/assets/index-Bv24iQuQ.js b/assets/index-Bv24iQuQ.js deleted file mode 100644 index e8b124b..0000000 --- a/assets/index-Bv24iQuQ.js +++ /dev/null @@ -1,22 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChallengeView-AzuLivC-.js","assets/nft0-jw9de1Qy.js","assets/ChallengeView-BujYrqIM.css","assets/LeaderboardView-BXGRWozF.js","assets/LeaderboardView-WjfyNLCZ.css","assets/PortfolioView-CuG2ecdf.js","assets/PortfolioView-C-oo6ANA.css"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** -* @vue/shared v3.5.3 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function cs(e,t){const n=new Set(e.split(","));return s=>n.has(s)}const X={},xt=[],Ne=()=>{},Wo=()=>!1,_n=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fs=e=>e.startsWith("onUpdate:"),ie=Object.assign,us=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zo=Object.prototype.hasOwnProperty,G=(e,t)=>Zo.call(e,t),F=Array.isArray,Dt=e=>bn(e)==="[object Map]",qo=e=>bn(e)==="[object Set]",$=e=>typeof e=="function",se=e=>typeof e=="string",Ot=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",Mr=e=>(ne(e)||$(e))&&$(e.then)&&$(e.catch),Go=Object.prototype.toString,bn=e=>Go.call(e),zo=e=>bn(e).slice(8,-1),Qo=e=>bn(e)==="[object Object]",as=e=>se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ft=cs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Yo=/-(\w)/g,Oe=yn(e=>e.replace(Yo,(t,n)=>n?n.toUpperCase():"")),Jo=/\B([A-Z])/g,gt=yn(e=>e.replace(Jo,"-$1").toLowerCase()),wn=yn(e=>e.charAt(0).toUpperCase()+e.slice(1)),kn=yn(e=>e?`on${wn(e)}`:""),ot=(e,t)=>!Object.is(e,t),Hn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Xo=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Hs;const Tr=()=>Hs||(Hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ds(e){if(F(e)){const t={};for(let n=0;n{if(n){const s=n.split(ti);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ct(e){let t="";if(se(e))t=e;else if(F(e))for(let n=0;n0)return;let e;for(;$t;){let t=$t;for($t=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ir(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vr(e){let t,n=e.depsTail;for(let s=n;s;s=s.prevDep)s.version===-1?(s===n&&(n=s.prevDep),gs(s),ci(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function qn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&Dr(t.dep.computed)===!1||t.dep.version!==t.version)return!0;return!!e._dirty}function Dr(e){if(e.flags&2)return!1;if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Wt))return;e.globalVersion=Wt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!qn(e)){e.flags&=-3;return}const n=Y,s=Pe;Y=e,Pe=!0;try{Ir(e);const r=e.fn(e._value);(t.version===0||ot(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Y=n,Pe=s,Vr(e),e.flags&=-3}}function gs(e){const{dep:t,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)gs(r)}}function ci(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Pe=!0;const Fr=[];function it(){Fr.push(Pe),Pe=!1}function lt(){const e=Fr.pop();Pe=e===void 0?!0:e}function Is(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Y;Y=void 0;try{t()}finally{Y=n}}}let Wt=0;class ms{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0}track(t){if(!Y||!Pe||Y===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Y)n=this.activeLink={dep:this,sub:Y,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Y.deps?(n.prevDep=Y.depsTail,Y.depsTail.nextDep=n,Y.depsTail=n):Y.deps=Y.depsTail=n,Y.flags&4&&$r(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Y.depsTail,n.nextDep=void 0,Y.depsTail.nextDep=n,Y.depsTail=n,Y.deps===n&&(Y.deps=s)}return n}trigger(t){this.version++,Wt++,this.notify(t)}notify(t){hs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{ps()}}}function $r(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)$r(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}const Gn=new WeakMap,dt=Symbol(""),zn=Symbol(""),Zt=Symbol("");function ae(e,t,n){if(Pe&&Y){let s=Gn.get(e);s||Gn.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=new ms),r.track()}}function Ze(e,t,n,s,r,o){const i=Gn.get(e);if(!i){Wt++;return}let c=[];if(t==="clear")c=[...i.values()];else{const l=F(e),h=l&&as(n);if(l&&n==="length"){const a=Number(s);i.forEach((d,p)=>{(p==="length"||p===Zt||!Ot(p)&&p>=a)&&c.push(d)})}else{const a=d=>d&&c.push(d);switch(n!==void 0&&a(i.get(n)),h&&a(i.get(Zt)),t){case"add":l?h&&a(i.get("length")):(a(i.get(dt)),Dt(e)&&a(i.get(zn)));break;case"delete":l||(a(i.get(dt)),Dt(e)&&a(i.get(zn)));break;case"set":Dt(e)&&a(i.get(dt));break}}}hs();for(const l of c)l.trigger();ps()}function bt(e){const t=K(e);return t===e?t:(ae(t,"iterate",Zt),Ae(e)?t:t.map(ce))}function xn(e){return ae(e=K(e),"iterate",Zt),e}const fi={__proto__:null,[Symbol.iterator](){return Vn(this,Symbol.iterator,ce)},concat(...e){return bt(this).concat(...e.map(t=>F(t)?bt(t):t))},entries(){return Vn(this,"entries",e=>(e[1]=ce(e[1]),e))},every(e,t){return Ue(this,"every",e,t,void 0,arguments)},filter(e,t){return Ue(this,"filter",e,t,n=>n.map(ce),arguments)},find(e,t){return Ue(this,"find",e,t,ce,arguments)},findIndex(e,t){return Ue(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ue(this,"findLast",e,t,ce,arguments)},findLastIndex(e,t){return Ue(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ue(this,"forEach",e,t,void 0,arguments)},includes(...e){return Dn(this,"includes",e)},indexOf(...e){return Dn(this,"indexOf",e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return Dn(this,"lastIndexOf",e)},map(e,t){return Ue(this,"map",e,t,void 0,arguments)},pop(){return kt(this,"pop")},push(...e){return kt(this,"push",e)},reduce(e,...t){return Vs(this,"reduce",e,t)},reduceRight(e,...t){return Vs(this,"reduceRight",e,t)},shift(){return kt(this,"shift")},some(e,t){return Ue(this,"some",e,t,void 0,arguments)},splice(...e){return kt(this,"splice",e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return kt(this,"unshift",e)},values(){return Vn(this,"values",ce)}};function Vn(e,t,n){const s=xn(e),r=s[t]();return s!==e&&!Ae(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const ui=Array.prototype;function Ue(e,t,n,s,r,o){const i=xn(e),c=i!==e&&!Ae(e),l=i[t];if(l!==ui[t]){const d=l.apply(e,o);return c?ce(d):d}let h=n;i!==e&&(c?h=function(d,p){return n.call(this,ce(d),p,e)}:n.length>2&&(h=function(d,p){return n.call(this,d,p,e)}));const a=l.call(i,h,s);return c&&r?r(a):a}function Vs(e,t,n,s){const r=xn(e);let o=n;return r!==e&&(Ae(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,ce(c),l,e)}),r[t](o,...s)}function Dn(e,t,n){const s=K(e);ae(s,"iterate",Zt);const r=s[t](...n);return(r===-1||r===!1)&&ys(n[0])?(n[0]=K(n[0]),s[t](...n)):r}function kt(e,t,n=[]){it(),hs();const s=K(e)[t].apply(e,n);return ps(),lt(),s}const ai=cs("__proto__,__v_isRef,__isVue"),Nr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ot));function di(e){Ot(e)||(e=String(e));const t=K(this);return ae(t,"has",e),t.hasOwnProperty(e)}class jr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Ri:Wr:o?Kr:Ur).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=F(t);if(!r){let l;if(i&&(l=fi[n]))return l;if(n==="hasOwnProperty")return di}const c=Reflect.get(t,n,ue(t)?t:s);return(Ot(n)?Nr.has(n):ai(n))||(r||ae(t,"get",n),o)?c:ue(c)?i&&as(n)?c:c.value:ne(c)?r?qr(c):En(c):c}}class Br extends jr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const l=ht(o);if(!Ae(s)&&!ht(s)&&(o=K(o),s=K(s)),!F(t)&&ue(o)&&!ue(s))return l?!1:(o.value=s,!0)}const i=F(t)&&as(n)?Number(n)e,Cn=e=>Reflect.getPrototypeOf(e);function tn(e,t,n=!1,s=!1){e=e.__v_raw;const r=K(e),o=K(t);n||(ot(t,o)&&ae(r,"get",t),ae(r,"get",o));const{has:i}=Cn(r),c=s?vs:n?ws:ce;if(i.call(r,t))return c(e.get(t));if(i.call(r,o))return c(e.get(o));e!==r&&e.get(t)}function nn(e,t=!1){const n=this.__v_raw,s=K(n),r=K(e);return t||(ot(e,r)&&ae(s,"has",e),ae(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function sn(e,t=!1){return e=e.__v_raw,!t&&ae(K(e),"iterate",dt),Reflect.get(e,"size",e)}function Ds(e,t=!1){!t&&!Ae(e)&&!ht(e)&&(e=K(e));const n=K(this);return Cn(n).has.call(n,e)||(n.add(e),Ze(n,"add",e,e)),this}function Fs(e,t,n=!1){!n&&!Ae(t)&&!ht(t)&&(t=K(t));const s=K(this),{has:r,get:o}=Cn(s);let i=r.call(s,e);i||(e=K(e),i=r.call(s,e));const c=o.call(s,e);return s.set(e,t),i?ot(t,c)&&Ze(s,"set",e,t):Ze(s,"add",e,t),this}function $s(e){const t=K(this),{has:n,get:s}=Cn(t);let r=n.call(t,e);r||(e=K(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&Ze(t,"delete",e,void 0),o}function Ns(){const e=K(this),t=e.size!==0,n=e.clear();return t&&Ze(e,"clear",void 0,void 0),n}function rn(e,t){return function(s,r){const o=this,i=o.__v_raw,c=K(i),l=t?vs:e?ws:ce;return!e&&ae(c,"iterate",dt),i.forEach((h,a)=>s.call(r,l(h),l(a),o))}}function on(e,t,n){return function(...s){const r=this.__v_raw,o=K(r),i=Dt(o),c=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,h=r[e](...s),a=n?vs:t?ws:ce;return!t&&ae(o,"iterate",l?zn:dt),{next(){const{value:d,done:p}=h.next();return p?{value:d,done:p}:{value:c?[a(d[0]),a(d[1])]:a(d),done:p}},[Symbol.iterator](){return this}}}}function Ye(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vi(){const e={get(o){return tn(this,o)},get size(){return sn(this)},has:nn,add:Ds,set:Fs,delete:$s,clear:Ns,forEach:rn(!1,!1)},t={get(o){return tn(this,o,!1,!0)},get size(){return sn(this)},has:nn,add(o){return Ds.call(this,o,!0)},set(o,i){return Fs.call(this,o,i,!0)},delete:$s,clear:Ns,forEach:rn(!1,!0)},n={get(o){return tn(this,o,!0)},get size(){return sn(this,!0)},has(o){return nn.call(this,o,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:rn(!0,!1)},s={get(o){return tn(this,o,!0,!0)},get size(){return sn(this,!0)},has(o){return nn.call(this,o,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:rn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=on(o,!1,!1),n[o]=on(o,!0,!1),t[o]=on(o,!1,!0),s[o]=on(o,!0,!0)}),[e,n,t,s]}const[_i,bi,yi,wi]=vi();function _s(e,t){const n=t?e?wi:yi:e?bi:_i;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(G(n,r)&&r in s?n:s,r,o)}const xi={get:_s(!1,!1)},Ci={get:_s(!1,!0)},Ei={get:_s(!0,!1)};const Ur=new WeakMap,Kr=new WeakMap,Wr=new WeakMap,Ri=new WeakMap;function Si(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Pi(e){return e.__v_skip||!Object.isExtensible(e)?0:Si(zo(e))}function En(e){return ht(e)?e:bs(e,!1,pi,xi,Ur)}function Zr(e){return bs(e,!1,mi,Ci,Kr)}function qr(e){return bs(e,!0,gi,Ei,Wr)}function bs(e,t,n,s,r){if(!ne(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=Pi(e);if(i===0)return e;const c=new Proxy(e,i===2?s:n);return r.set(e,c),c}function Et(e){return ht(e)?Et(e.__v_raw):!!(e&&e.__v_isReactive)}function ht(e){return!!(e&&e.__v_isReadonly)}function Ae(e){return!!(e&&e.__v_isShallow)}function ys(e){return e?!!e.__v_raw:!1}function K(e){const t=e&&e.__v_raw;return t?K(t):e}function Ai(e){return Object.isExtensible(e)&&Or(e,"__v_skip",!0),e}const ce=e=>ne(e)?En(e):e,ws=e=>ne(e)?qr(e):e;function ue(e){return e?e.__v_isRef===!0:!1}function Mi(e){return Gr(e,!1)}function Oi(e){return Gr(e,!0)}function Gr(e,t){return ue(e)?e:new Ti(e,t)}class Ti{constructor(t,n){this.dep=new ms,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:K(t),this._value=n?t:ce(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ae(t)||ht(t);t=s?t:K(t),ot(t,n)&&(this._rawValue=t,this._value=s?t:ce(t),this.dep.trigger())}}function st(e){return ue(e)?e.value:e}const Li={get:(e,t,n)=>t==="__v_raw"?e:st(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ue(r)&&!ue(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function zr(e){return Et(e)?e:new Proxy(e,Li)}class ki{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ms(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wt-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){Y!==this&&(this.flags|=16,this.dep.notify())}get value(){const t=this.dep.track();return Dr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Hi(e,t,n=!1){let s,r;return $(e)?s=e:(s=e.get,r=e.set),new ki(s,r,n)}const ln={},hn=new WeakMap;let at;function Ii(e,t=!1,n=at){if(n){let s=hn.get(n);s||hn.set(n,s=[]),s.push(e)}}function Vi(e,t,n=X){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:c,call:l}=n,h=O=>r?O:Ae(O)||r===!1||r===0?nt(O,1):nt(O);let a,d,p,m,A=!1,M=!1;if(ue(e)?(d=()=>e.value,A=Ae(e)):Et(e)?(d=()=>h(e),A=!0):F(e)?(M=!0,A=e.some(O=>Et(O)||Ae(O)),d=()=>e.map(O=>{if(ue(O))return O.value;if(Et(O))return h(O);if($(O))return l?l(O,2):O()})):$(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){it();try{p()}finally{lt()}}const O=at;at=a;try{return l?l(e,3,[m]):e(m)}finally{at=O}}:d=Ne,t&&r){const O=d,Q=r===!0?1/0:r;d=()=>nt(O(),Q)}const N=li(),H=()=>{a.stop(),N&&us(N.effects,a)};if(o)if(t){const O=t;t=(...Q)=>{O(...Q),H()}}else{const O=d;d=()=>{O(),H()}}let k=M?new Array(e.length).fill(ln):ln;const I=O=>{if(!(!(a.flags&1)||!a.dirty&&!O))if(t){const Q=a.run();if(r||A||(M?Q.some((oe,ee)=>ot(oe,k[ee])):ot(Q,k))){p&&p();const oe=at;at=a;try{const ee=[Q,k===ln?void 0:M&&k[0]===ln?[]:k,m];l?l(t,3,ee):t(...ee),k=Q}finally{at=oe}}}else a.run()};return c&&c(I),a=new kr(d),a.scheduler=i?()=>i(I,!1):I,m=O=>Ii(O,!1,a),p=a.onStop=()=>{const O=hn.get(a);if(O){if(l)l(O,4);else for(const Q of O)Q();hn.delete(a)}},t?s?I(!0):k=a.run():i?i(I.bind(null,!0),!0):a.run(),H.pause=a.pause.bind(a),H.resume=a.resume.bind(a),H.stop=H,H}function nt(e,t=1/0,n){if(t<=0||!ne(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,ue(e))nt(e.value,t,n);else if(F(e))for(let s=0;s{nt(s,t,n)});else if(Qo(e)){for(const s in e)nt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&nt(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.3 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Jt(e,t,n,s){try{return s?e(...s):e()}catch(r){Rn(r,t,n)}}function je(e,t,n,s){if($(e)){const r=Jt(e,t,n,s);return r&&Mr(r)&&r.catch(o=>{Rn(o,t,n)}),r}if(F(e)){const r=[];for(let o=0;o>>1,r=he[s],o=Gt(r);o=Gt(n)?he.push(e):he.splice(Fi(t),0,e),e.flags|=1,Jr()}}function Jr(){!qt&&!Qn&&(Qn=!0,xs=Qr.then(eo))}function $i(e){F(e)?Rt.push(...e):Xe&&e.id===-1?Xe.splice(yt+1,0,e):e.flags&1||(Rt.push(e),e.flags|=1),Jr()}function js(e,t,n=qt?Fe+1:0){for(;nGt(n)-Gt(s));if(Rt.length=0,Xe){Xe.push(...t);return}for(Xe=t,yt=0;yte.id==null?e.flags&2?-1:1/0:e.id;function eo(e){Qn=!1,qt=!0;try{for(Fe=0;Fe{s._d&&Qs(-1);const o=pn(t);let i;try{i=e(...r)}finally{pn(o),s._d&&Qs(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function ft(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;ie.__isTeleport;function Es(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Es(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function no(e,t){return $(e)?ie({name:e.name},t,{setup:e}):e}function so(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Yn(e,t,n,s,r=!1){if(F(e)){e.forEach((A,M)=>Yn(A,t&&(F(t)?t[M]:t),n,s,r));return}if(Nt(s)&&!r)return;const o=s.shapeFlag&4?As(s.component):s.el,i=r?null:o,{i:c,r:l}=e,h=t&&t.r,a=c.refs===X?c.refs={}:c.refs,d=c.setupState,p=K(d),m=d===X?()=>!1:A=>G(p,A);if(h!=null&&h!==l&&(se(h)?(a[h]=null,m(h)&&(d[h]=null)):ue(h)&&(h.value=null)),$(l))Jt(l,c,12,[i,a]);else{const A=se(l),M=ue(l);if(A||M){const N=()=>{if(e.f){const H=A?m(l)?d[l]:a[l]:l.value;r?F(H)&&us(H,o):F(H)?H.includes(o)||H.push(o):A?(a[l]=[o],m(l)&&(d[l]=a[l])):(l.value=[o],e.k&&(a[e.k]=l.value))}else A?(a[l]=i,m(l)&&(d[l]=i)):M&&(l.value=i,e.k&&(a[e.k]=i))};i?(N.id=-1,be(N,n)):N()}}}const Nt=e=>!!e.type.__asyncLoader,ro=e=>e.type.__isKeepAlive;function Ui(e,t){oo(e,"a",t)}function Ki(e,t){oo(e,"da",t)}function oo(e,t,n=fe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Sn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)ro(r.parent.vnode)&&Wi(s,t,n,r),r=r.parent}}function Wi(e,t,n,s){const r=Sn(t,e,s,!0);io(()=>{us(s[t],r)},n)}function Sn(e,t,n=fe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{it();const c=Xt(n),l=je(t,n,e,i);return c(),lt(),l});return s?r.unshift(o):r.push(o),o}}const qe=e=>(t,n=fe)=>{(!On||e==="sp")&&Sn(e,(...s)=>t(...s),n)},Zi=qe("bm"),qi=qe("m"),Gi=qe("bu"),zi=qe("u"),Qi=qe("bum"),io=qe("um"),Yi=qe("sp"),Ji=qe("rtg"),Xi=qe("rtc");function el(e,t=fe){Sn("ec",e,t)}const tl="components";function nl(e,t){return rl(tl,e,!0,t)||e}const sl=Symbol.for("v-ndc");function rl(e,t,n=!0,s=!1){const r=Se||fe;if(r){const o=r.type;{const c=Wl(o,!1);if(c&&(c===t||c===Oe(t)||c===wn(Oe(t))))return o}const i=Bs(r[e]||o[e],t)||Bs(r.appContext[e],t);return!i&&s?o:i}}function Bs(e,t){return e&&(e[t]||e[Oe(t)]||e[wn(Oe(t))])}function Xf(e,t,n,s){let r;const o=n,i=F(e);if(i||se(e)){const c=i&&Et(e);c&&(e=xn(e)),r=new Array(e.length);for(let l=0,h=e.length;lt(c,l,void 0,o));else{const c=Object.keys(e);r=new Array(c.length);for(let l=0,h=c.length;le?Po(e)?As(e):Jn(e.parent):null,jt=ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Jn(e.parent),$root:e=>Jn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Rs(e),$forceUpdate:e=>e.f||(e.f=()=>{Cs(e.update)}),$nextTick:e=>e.n||(e.n=Yr.bind(e.proxy)),$watch:e=>Rl.bind(e)}),Fn=(e,t)=>e!==X&&!e.__isScriptSetup&&G(e,t),ol={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:c,appContext:l}=e;let h;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Fn(s,t))return i[t]=1,s[t];if(r!==X&&G(r,t))return i[t]=2,r[t];if((h=e.propsOptions[0])&&G(h,t))return i[t]=3,o[t];if(n!==X&&G(n,t))return i[t]=4,n[t];Xn&&(i[t]=0)}}const a=jt[t];let d,p;if(a)return t==="$attrs"&&ae(e.attrs,"get",""),a(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==X&&G(n,t))return i[t]=4,n[t];if(p=l.config.globalProperties,G(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Fn(r,t)?(r[t]=n,!0):s!==X&&G(s,t)?(s[t]=n,!0):G(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let c;return!!n[i]||e!==X&&G(e,i)||Fn(t,i)||(c=o[0])&&G(c,i)||G(s,i)||G(jt,i)||G(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:G(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Us(e){return F(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Xn=!0;function il(e){const t=Rs(e),n=e.proxy,s=e.ctx;Xn=!1,t.beforeCreate&&Ks(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:c,provide:l,inject:h,created:a,beforeMount:d,mounted:p,beforeUpdate:m,updated:A,activated:M,deactivated:N,beforeDestroy:H,beforeUnmount:k,destroyed:I,unmounted:O,render:Q,renderTracked:oe,renderTriggered:ee,errorCaptured:Le,serverPrefetch:Ge,expose:ke,inheritAttrs:ze,components:ct,directives:He,filters:Tt}=t;if(h&&ll(h,s,null),i)for(const z in i){const B=i[z];$(B)&&(s[z]=B.bind(n))}if(r){const z=r.call(n,n);ne(z)&&(e.data=En(z))}if(Xn=!0,o)for(const z in o){const B=o[z],Be=$(B)?B.bind(n,n):$(B.get)?B.get.bind(n,n):Ne,Qe=!$(B)&&$(B.set)?B.set.bind(n):Ne,Ie=Re({get:Be,set:Qe});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:ge=>Ie.value=ge})}if(c)for(const z in c)lo(c[z],s,n,z);if(l){const z=$(l)?l.call(n):l;Reflect.ownKeys(z).forEach(B=>{cn(B,z[B])})}a&&Ks(a,e,"c");function re(z,B){F(B)?B.forEach(Be=>z(Be.bind(n))):B&&z(B.bind(n))}if(re(Zi,d),re(qi,p),re(Gi,m),re(zi,A),re(Ui,M),re(Ki,N),re(el,Le),re(Xi,oe),re(Ji,ee),re(Qi,k),re(io,O),re(Yi,Ge),F(ke))if(ke.length){const z=e.exposed||(e.exposed={});ke.forEach(B=>{Object.defineProperty(z,B,{get:()=>n[B],set:Be=>n[B]=Be})})}else e.exposed||(e.exposed={});Q&&e.render===Ne&&(e.render=Q),ze!=null&&(e.inheritAttrs=ze),ct&&(e.components=ct),He&&(e.directives=He),Ge&&so(e)}function ll(e,t,n=Ne){F(e)&&(e=es(e));for(const s in e){const r=e[s];let o;ne(r)?"default"in r?o=Me(r.from||s,r.default,!0):o=Me(r.from||s):o=Me(r),ue(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Ks(e,t,n){je(F(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function lo(e,t,n,s){let r=s.includes(".")?xo(n,s):()=>n[s];if(se(e)){const o=t[e];$(o)&&fn(r,o)}else if($(e))fn(r,e.bind(n));else if(ne(e))if(F(e))e.forEach(o=>lo(o,t,n,s));else{const o=$(e.handler)?e.handler.bind(n):t[e.handler];$(o)&&fn(r,o,e)}}function Rs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,c=o.get(t);let l;return c?l=c:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(h=>gn(l,h,i,!0)),gn(l,t,i)),ne(t)&&o.set(t,l),l}function gn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&gn(e,o,n,!0),r&&r.forEach(i=>gn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const c=cl[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const cl={data:Ws,props:Zs,emits:Zs,methods:Vt,computed:Vt,beforeCreate:de,created:de,beforeMount:de,mounted:de,beforeUpdate:de,updated:de,beforeDestroy:de,beforeUnmount:de,destroyed:de,unmounted:de,activated:de,deactivated:de,errorCaptured:de,serverPrefetch:de,components:Vt,directives:Vt,watch:ul,provide:Ws,inject:fl};function Ws(e,t){return t?e?function(){return ie($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function fl(e,t){return Vt(es(e),es(t))}function es(e){if(F(e)){const t={};for(let n=0;n1)return n&&$(t)?t.call(s&&s.proxy):t}}const fo={},uo=()=>Object.create(fo),ao=e=>Object.getPrototypeOf(e)===fo;function hl(e,t,n,s=!1){const r={},o=uo();e.propsDefaults=Object.create(null),ho(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Zr(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function pl(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,c=K(r),[l]=e.propsOptions;let h=!1;if((s||i>0)&&!(i&16)){if(i&8){const a=e.vnode.dynamicProps;for(let d=0;d{l=!0;const[p,m]=po(d,t,!0);ie(i,p),m&&c.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!o&&!l)return ne(e)&&s.set(e,xt),xt;if(F(o))for(let a=0;ae[0]==="_"||e==="$stable",Ss=e=>F(e)?e.map($e):[$e(e)],ml=(e,t,n)=>{if(t._n)return t;const s=Ni((...r)=>Ss(t(...r)),n);return s._c=!1,s},mo=(e,t,n)=>{const s=e._ctx;for(const r in e){if(go(r))continue;const o=e[r];if($(o))t[r]=ml(r,o,s);else if(o!=null){const i=Ss(o);t[r]=()=>i}}},vo=(e,t)=>{const n=Ss(t);e.slots.default=()=>n},_o=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},vl=(e,t,n)=>{const s=e.slots=uo();if(e.vnode.shapeFlag&32){const r=t._;r?(_o(s,t,n),n&&Or(s,"_",r,!0)):mo(t,s)}else t&&vo(e,t)},_l=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=X;if(s.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:_o(r,t,n):(o=!t.$stable,mo(t,r)),i=t}else t&&(vo(e,t),i={default:1});if(o)for(const c in r)!go(c)&&i[c]==null&&delete r[c]},be=Ll;function bl(e){return yl(e)}function yl(e,t){const n=Tr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:c,createComment:l,setText:h,setElementText:a,parentNode:d,nextSibling:p,setScopeId:m=Ne,insertStaticContent:A}=e,M=(f,u,g,b=null,v=null,y=null,E=void 0,C=null,x=!!u.dynamicChildren)=>{if(f===u)return;f&&!Ht(f,u)&&(b=_(f),ge(f,v,y,!0),f=null),u.patchFlag===-2&&(x=!1,u.dynamicChildren=null);const{type:w,ref:V,shapeFlag:S}=u;switch(w){case An:N(f,u,g,b);break;case pt:H(f,u,g,b);break;case un:f==null&&k(u,g,b,E);break;case Ee:ct(f,u,g,b,v,y,E,C,x);break;default:S&1?Q(f,u,g,b,v,y,E,C,x):S&6?He(f,u,g,b,v,y,E,C,x):(S&64||S&128)&&w.process(f,u,g,b,v,y,E,C,x,T)}V!=null&&v&&Yn(V,f&&f.ref,y,u||f,!u)},N=(f,u,g,b)=>{if(f==null)s(u.el=c(u.children),g,b);else{const v=u.el=f.el;u.children!==f.children&&h(v,u.children)}},H=(f,u,g,b)=>{f==null?s(u.el=l(u.children||""),g,b):u.el=f.el},k=(f,u,g,b)=>{[f.el,f.anchor]=A(f.children,u,g,b,f.el,f.anchor)},I=({el:f,anchor:u},g,b)=>{let v;for(;f&&f!==u;)v=p(f),s(f,g,b),f=v;s(u,g,b)},O=({el:f,anchor:u})=>{let g;for(;f&&f!==u;)g=p(f),r(f),f=g;r(u)},Q=(f,u,g,b,v,y,E,C,x)=>{u.type==="svg"?E="svg":u.type==="math"&&(E="mathml"),f==null?oe(u,g,b,v,y,E,C,x):Ge(f,u,v,y,E,C,x)},oe=(f,u,g,b,v,y,E,C)=>{let x,w;const{props:V,shapeFlag:S,transition:L,dirs:D}=f;if(x=f.el=i(f.type,y,V&&V.is,V),S&8?a(x,f.children):S&16&&Le(f.children,x,null,b,v,$n(f,y),E,C),D&&ft(f,null,b,"created"),ee(x,f,f.scopeId,E,b),V){for(const J in V)J!=="value"&&!Ft(J)&&o(x,J,null,V[J],y,b);"value"in V&&o(x,"value",null,V.value,y),(w=V.onVnodeBeforeMount)&&De(w,b,f)}D&&ft(f,null,b,"beforeMount");const j=wl(v,L);j&&L.beforeEnter(x),s(x,u,g),((w=V&&V.onVnodeMounted)||j||D)&&be(()=>{w&&De(w,b,f),j&&L.enter(x),D&&ft(f,null,b,"mounted")},v)},ee=(f,u,g,b,v)=>{if(g&&m(f,g),b)for(let y=0;y{for(let w=x;w{const C=u.el=f.el;let{patchFlag:x,dynamicChildren:w,dirs:V}=u;x|=f.patchFlag&16;const S=f.props||X,L=u.props||X;let D;if(g&&ut(g,!1),(D=L.onVnodeBeforeUpdate)&&De(D,g,u,f),V&&ft(u,f,g,"beforeUpdate"),g&&ut(g,!0),(S.innerHTML&&L.innerHTML==null||S.textContent&&L.textContent==null)&&a(C,""),w?ke(f.dynamicChildren,w,C,g,b,$n(u,v),y):E||B(f,u,C,null,g,b,$n(u,v),y,!1),x>0){if(x&16)ze(C,S,L,g,v);else if(x&2&&S.class!==L.class&&o(C,"class",null,L.class,v),x&4&&o(C,"style",S.style,L.style,v),x&8){const j=u.dynamicProps;for(let J=0;J{D&&De(D,g,u,f),V&&ft(u,f,g,"updated")},b)},ke=(f,u,g,b,v,y,E)=>{for(let C=0;C{if(u!==g){if(u!==X)for(const y in u)!Ft(y)&&!(y in g)&&o(f,y,u[y],null,v,b);for(const y in g){if(Ft(y))continue;const E=g[y],C=u[y];E!==C&&y!=="value"&&o(f,y,C,E,v,b)}"value"in g&&o(f,"value",u.value,g.value,v)}},ct=(f,u,g,b,v,y,E,C,x)=>{const w=u.el=f?f.el:c(""),V=u.anchor=f?f.anchor:c("");let{patchFlag:S,dynamicChildren:L,slotScopeIds:D}=u;D&&(C=C?C.concat(D):D),f==null?(s(w,g,b),s(V,g,b),Le(u.children||[],g,V,v,y,E,C,x)):S>0&&S&64&&L&&f.dynamicChildren?(ke(f.dynamicChildren,L,g,v,y,E,C),(u.key!=null||v&&u===v.subTree)&&bo(f,u,!0)):B(f,u,g,V,v,y,E,C,x)},He=(f,u,g,b,v,y,E,C,x)=>{u.slotScopeIds=C,f==null?u.shapeFlag&512?v.ctx.activate(u,g,b,E,x):Tt(u,g,b,v,y,E,x):mt(f,u,x)},Tt=(f,u,g,b,v,y,E)=>{const C=f.component=Nl(f,b,v);if(ro(f)&&(C.ctx.renderer=T),jl(C,!1,E),C.asyncDep){if(v&&v.registerDep(C,re,E),!f.el){const x=C.subTree=pe(pt);H(null,x,u,g)}}else re(C,f,u,g,v,y,E)},mt=(f,u,g)=>{const b=u.component=f.component;if(Ol(f,u,g))if(b.asyncDep&&!b.asyncResolved){z(b,u,g);return}else b.next=u,b.update();else u.el=f.el,b.vnode=u},re=(f,u,g,b,v,y,E)=>{const C=()=>{if(f.isMounted){let{next:S,bu:L,u:D,parent:j,vnode:J}=f;{const ve=yo(f);if(ve){S&&(S.el=J.el,z(f,S,E)),ve.asyncDep.then(()=>{f.isUnmounted||C()});return}}let Z=S,me;ut(f,!1),S?(S.el=J.el,z(f,S,E)):S=J,L&&Hn(L),(me=S.props&&S.props.onVnodeBeforeUpdate)&&De(me,j,S,J),ut(f,!0);const le=Nn(f),Ce=f.subTree;f.subTree=le,M(Ce,le,d(Ce.el),_(Ce),f,v,y),S.el=le.el,Z===null&&Tl(f,le.el),D&&be(D,v),(me=S.props&&S.props.onVnodeUpdated)&&be(()=>De(me,j,S,J),v)}else{let S;const{el:L,props:D}=u,{bm:j,m:J,parent:Z,root:me,type:le}=f,Ce=Nt(u);if(ut(f,!1),j&&Hn(j),!Ce&&(S=D&&D.onVnodeBeforeMount)&&De(S,Z,u),ut(f,!0),L&&te){const ve=()=>{f.subTree=Nn(f),te(L,f.subTree,f,v,null)};Ce&&le.__asyncHydrate?le.__asyncHydrate(L,f,ve):ve()}else{me.ce&&me.ce._injectChildStyle(le);const ve=f.subTree=Nn(f);M(null,ve,g,b,f,v,y),u.el=ve.el}if(J&&be(J,v),!Ce&&(S=D&&D.onVnodeMounted)){const ve=u;be(()=>De(S,Z,ve),v)}(u.shapeFlag&256||Z&&Nt(Z.vnode)&&Z.vnode.shapeFlag&256)&&f.a&&be(f.a,v),f.isMounted=!0,u=g=b=null}};f.scope.on();const x=f.effect=new kr(C);f.scope.off();const w=f.update=x.run.bind(x),V=f.job=x.runIfDirty.bind(x);V.i=f,V.id=f.uid,x.scheduler=()=>Cs(V),ut(f,!0),w()},z=(f,u,g)=>{u.component=f;const b=f.vnode.props;f.vnode=u,f.next=null,pl(f,u.props,b,g),_l(f,u.children,g),it(),js(f),lt()},B=(f,u,g,b,v,y,E,C,x=!1)=>{const w=f&&f.children,V=f?f.shapeFlag:0,S=u.children,{patchFlag:L,shapeFlag:D}=u;if(L>0){if(L&128){Qe(w,S,g,b,v,y,E,C,x);return}else if(L&256){Be(w,S,g,b,v,y,E,C,x);return}}D&8?(V&16&&xe(w,v,y),S!==w&&a(g,S)):V&16?D&16?Qe(w,S,g,b,v,y,E,C,x):xe(w,v,y,!0):(V&8&&a(g,""),D&16&&Le(S,g,b,v,y,E,C,x))},Be=(f,u,g,b,v,y,E,C,x)=>{f=f||xt,u=u||xt;const w=f.length,V=u.length,S=Math.min(w,V);let L;for(L=0;LV?xe(f,v,y,!0,!1,S):Le(u,g,b,v,y,E,C,x,S)},Qe=(f,u,g,b,v,y,E,C,x)=>{let w=0;const V=u.length;let S=f.length-1,L=V-1;for(;w<=S&&w<=L;){const D=f[w],j=u[w]=x?et(u[w]):$e(u[w]);if(Ht(D,j))M(D,j,g,null,v,y,E,C,x);else break;w++}for(;w<=S&&w<=L;){const D=f[S],j=u[L]=x?et(u[L]):$e(u[L]);if(Ht(D,j))M(D,j,g,null,v,y,E,C,x);else break;S--,L--}if(w>S){if(w<=L){const D=L+1,j=DL)for(;w<=S;)ge(f[w],v,y,!0),w++;else{const D=w,j=w,J=new Map;for(w=j;w<=L;w++){const _e=u[w]=x?et(u[w]):$e(u[w]);_e.key!=null&&J.set(_e.key,w)}let Z,me=0;const le=L-j+1;let Ce=!1,ve=0;const Lt=new Array(le);for(w=0;w=le){ge(_e,v,y,!0);continue}let Ve;if(_e.key!=null)Ve=J.get(_e.key);else for(Z=j;Z<=L;Z++)if(Lt[Z-j]===0&&Ht(_e,u[Z])){Ve=Z;break}Ve===void 0?ge(_e,v,y,!0):(Lt[Ve-j]=w+1,Ve>=ve?ve=Ve:Ce=!0,M(_e,u[Ve],g,null,v,y,E,C,x),me++)}const Ls=Ce?xl(Lt):xt;for(Z=Ls.length-1,w=le-1;w>=0;w--){const _e=j+w,Ve=u[_e],ks=_e+1{const{el:y,type:E,transition:C,children:x,shapeFlag:w}=f;if(w&6){Ie(f.component.subTree,u,g,b);return}if(w&128){f.suspense.move(u,g,b);return}if(w&64){E.move(f,u,g,T);return}if(E===Ee){s(y,u,g);for(let S=0;SC.enter(y),v);else{const{leave:S,delayLeave:L,afterLeave:D}=C,j=()=>s(y,u,g),J=()=>{S(y,()=>{j(),D&&D()})};L?L(y,j,J):J()}else s(y,u,g)},ge=(f,u,g,b=!1,v=!1)=>{const{type:y,props:E,ref:C,children:x,dynamicChildren:w,shapeFlag:V,patchFlag:S,dirs:L,cacheIndex:D}=f;if(S===-2&&(v=!1),C!=null&&Yn(C,null,g,f,!0),D!=null&&(u.renderCache[D]=void 0),V&256){u.ctx.deactivate(f);return}const j=V&1&&L,J=!Nt(f);let Z;if(J&&(Z=E&&E.onVnodeBeforeUnmount)&&De(Z,u,f),V&6)en(f.component,g,b);else{if(V&128){f.suspense.unmount(g,b);return}j&&ft(f,null,u,"beforeUnmount"),V&64?f.type.remove(f,u,g,T,b):w&&!w.hasOnce&&(y!==Ee||S>0&&S&64)?xe(w,u,g,!1,!0):(y===Ee&&S&384||!v&&V&16)&&xe(x,u,g),b&&vt(f)}(J&&(Z=E&&E.onVnodeUnmounted)||j)&&be(()=>{Z&&De(Z,u,f),j&&ft(f,null,u,"unmounted")},g)},vt=f=>{const{type:u,el:g,anchor:b,transition:v}=f;if(u===Ee){_t(g,b);return}if(u===un){O(f);return}const y=()=>{r(g),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(f.shapeFlag&1&&v&&!v.persisted){const{leave:E,delayLeave:C}=v,x=()=>E(g,y);C?C(f.el,y,x):x()}else y()},_t=(f,u)=>{let g;for(;f!==u;)g=p(f),r(f),f=g;r(u)},en=(f,u,g)=>{const{bum:b,scope:v,job:y,subTree:E,um:C,m:x,a:w}=f;Gs(x),Gs(w),b&&Hn(b),v.stop(),y&&(y.flags|=8,ge(E,f,u,g)),C&&be(C,u),be(()=>{f.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},xe=(f,u,g,b=!1,v=!1,y=0)=>{for(let E=y;E{if(f.shapeFlag&6)return _(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const u=p(f.anchor||f.el),g=u&&u[ji];return g?p(g):u};let P=!1;const R=(f,u,g)=>{f==null?u._vnode&&ge(u._vnode,null,null,!0):M(u._vnode||null,f,u,null,null,null,g),u._vnode=f,P||(P=!0,js(),Xr(),P=!1)},T={p:M,um:ge,m:Ie,r:vt,mt:Tt,mc:Le,pc:B,pbc:ke,n:_,o:e};let W,te;return{render:R,hydrate:W,createApp:dl(R,W)}}function $n({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ut({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function bo(e,t,n=!1){const s=e.children,r=t.children;if(F(s)&&F(r))for(let o=0;o>1,e[n[c]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function yo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:yo(t)}function Gs(e){if(e)for(let t=0;tMe(Cl);function fn(e,t,n){return wo(e,t,n)}function wo(e,t,n=X){const{immediate:s,deep:r,flush:o,once:i}=n,c=ie({},n);let l;if(On)if(o==="sync"){const p=El();l=p.__watcherHandles||(p.__watcherHandles=[])}else if(!t||s)c.once=!0;else return{stop:Ne,resume:Ne,pause:Ne};const h=fe;c.call=(p,m,A)=>je(p,h,m,A);let a=!1;o==="post"?c.scheduler=p=>{be(p,h&&h.suspense)}:o!=="sync"&&(a=!0,c.scheduler=(p,m)=>{m?p():Cs(p)}),c.augmentJob=p=>{t&&(p.flags|=4),a&&(p.flags|=2,h&&(p.id=h.uid,p.i=h))};const d=Vi(e,t,c);return l&&l.push(d),d}function Rl(e,t,n){const s=this.proxy,r=se(e)?e.includes(".")?xo(s,e):()=>s[e]:e.bind(s,s);let o;$(t)?o=t:(o=t.handler,n=t);const i=Xt(this),c=wo(r,o.bind(s),n);return i(),c}function xo(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Oe(t)}Modifiers`]||e[`${gt(t)}Modifiers`];function Pl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||X;let r=n;const o=t.startsWith("update:"),i=o&&Sl(s,t.slice(7));i&&(i.trim&&(r=n.map(a=>se(a)?a.trim():a)),i.number&&(r=n.map(Xo)));let c,l=s[c=kn(t)]||s[c=kn(Oe(t))];!l&&o&&(l=s[c=kn(gt(t))]),l&&je(l,e,6,r);const h=s[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,je(h,e,6,r)}}function Co(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},c=!1;if(!$(e)){const l=h=>{const a=Co(h,t,!0);a&&(c=!0,ie(i,a))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!c?(ne(e)&&s.set(e,null),null):(F(o)?o.forEach(l=>i[l]=null):ie(i,o),ne(e)&&s.set(e,i),i)}function Pn(e,t){return!e||!_n(t)?!1:(t=t.slice(2).replace(/Once$/,""),G(e,t[0].toLowerCase()+t.slice(1))||G(e,gt(t))||G(e,t))}function Nn(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:c,emit:l,render:h,renderCache:a,props:d,data:p,setupState:m,ctx:A,inheritAttrs:M}=e,N=pn(e);let H,k;try{if(n.shapeFlag&4){const O=r||s,Q=O;H=$e(h.call(Q,O,a,d,m,p,A)),k=c}else{const O=t;H=$e(O.length>1?O(d,{attrs:c,slots:i,emit:l}):O(d,null)),k=t.props?c:Al(c)}}catch(O){Bt.length=0,Rn(O,e,1),H=pe(pt)}let I=H;if(k&&M!==!1){const O=Object.keys(k),{shapeFlag:Q}=I;O.length&&Q&7&&(o&&O.some(fs)&&(k=Ml(k,o)),I=Pt(I,k,!1,!0))}return n.dirs&&(I=Pt(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&Es(I,n.transition),H=I,pn(N),H}const Al=e=>{let t;for(const n in e)(n==="class"||n==="style"||_n(n))&&((t||(t={}))[n]=e[n]);return t},Ml=(e,t)=>{const n={};for(const s in e)(!fs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ol(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:c,patchFlag:l}=t,h=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?zs(s,i,h):!!i;if(l&8){const a=t.dynamicProps;for(let d=0;de.__isSuspense;function Ll(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):$i(e)}const Ee=Symbol.for("v-fgt"),An=Symbol.for("v-txt"),pt=Symbol.for("v-cmt"),un=Symbol.for("v-stc"),Bt=[];let we=null;function rt(e=!1){Bt.push(we=e?null:[])}function kl(){Bt.pop(),we=Bt[Bt.length-1]||null}let zt=1;function Qs(e){zt+=e,e<0&&we&&(we.hasOnce=!0)}function Ro(e){return e.dynamicChildren=zt>0?we||xt:null,kl(),zt>0&&we&&we.push(e),e}function Mn(e,t,n,s,r,o){return Ro(U(e,t,n,s,r,o,!0))}function mn(e,t,n,s,r){return Ro(pe(e,t,n,s,r,!0))}function ns(e){return e?e.__v_isVNode===!0:!1}function Ht(e,t){return e.type===t.type&&e.key===t.key}const So=({key:e})=>e??null,an=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?se(e)||ue(e)||$(e)?{i:Se,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,s=0,r=null,o=e===Ee?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&So(t),ref:t&&an(t),scopeId:to,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Se};return c?(Ps(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=se(n)?8:16),zt>0&&!i&&we&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&we.push(l),l}const pe=Hl;function Hl(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===sl)&&(e=pt),ns(e)){const c=Pt(e,t,!0);return n&&Ps(c,n),zt>0&&!o&&we&&(c.shapeFlag&6?we[we.indexOf(e)]=c:we.push(c)),c.patchFlag=-2,c}if(Zl(e)&&(e=e.__vccOpts),t){t=Il(t);let{class:c,style:l}=t;c&&!se(c)&&(t.class=Ct(c)),ne(l)&&(ys(l)&&!F(l)&&(l=ie({},l)),t.style=ds(l))}const i=se(e)?1:Eo(e)?128:Bi(e)?64:ne(e)?4:$(e)?2:0;return U(e,t,n,s,r,i,o,!0)}function Il(e){return e?ys(e)||ao(e)?ie({},e):e:null}function Pt(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,h=t?Dl(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&So(h),ref:t&&t.ref?n&&o?F(o)?o.concat(an(t)):[o,an(t)]:an(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ee?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pt(e.ssContent),ssFallback:e.ssFallback&&Pt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Es(a,l.clone(a)),a}function Vl(e=" ",t=0){return pe(An,null,e,t)}function eu(e,t){const n=pe(un,null,e);return n.staticCount=t,n}function Ys(e="",t=!1){return t?(rt(),mn(pt,null,e)):pe(pt,null,e)}function $e(e){return e==null||typeof e=="boolean"?pe(pt):F(e)?pe(Ee,null,e.slice()):typeof e=="object"?et(e):pe(An,null,String(e))}function et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pt(e)}function Ps(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(F(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ps(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ao(t)?t._ctx=Se:r===3&&Se&&(Se.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:Se},n=32):(t=String(t),s&64?(n=16,t=[Vl(t)]):n=8);e.children=t,e.shapeFlag|=n}function Dl(...e){const t={};for(let n=0;n{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};vn=t("__VUE_INSTANCE_SETTERS__",n=>fe=n),ss=t("__VUE_SSR_SETTERS__",n=>On=n)}const Xt=e=>{const t=fe;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},Js=()=>{fe&&fe.scope.off(),vn(null)};function Po(e){return e.vnode.shapeFlag&4}let On=!1;function jl(e,t=!1,n=!1){t&&ss(t);const{props:s,children:r}=e.vnode,o=Po(e);hl(e,s,o,t),vl(e,r,n);const i=o?Bl(e,t):void 0;return t&&ss(!1),i}function Bl(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ol);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?Kl(e):null,o=Xt(e);it();const i=Jt(s,e,0,[e.props,r]);if(lt(),o(),Mr(i)){if(Nt(e)||so(e),i.then(Js,Js),t)return i.then(c=>{Xs(e,c,t)}).catch(c=>{Rn(c,e,0)});e.asyncDep=i}else Xs(e,i,t)}else Ao(e,t)}function Xs(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ne(t)&&(e.setupState=zr(t)),Ao(e,n)}let er;function Ao(e,t,n){const s=e.type;if(!e.render){if(!t&&er&&!s.render){const r=s.template||Rs(e).template;if(r){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:c,compilerOptions:l}=s,h=ie(ie({isCustomElement:o,delimiters:c},i),l);s.render=er(r,h)}}e.render=s.render||Ne}{const r=Xt(e);it();try{il(e)}finally{lt(),r()}}}const Ul={get(e,t){return ae(e,"get",""),e[t]}};function Kl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ul),slots:e.slots,emit:e.emit,expose:t}}function As(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(zr(Ai(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in jt)return jt[n](e)},has(t,n){return n in t||n in jt}})):e.proxy}function Wl(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function Zl(e){return $(e)&&"__vccOpts"in e}const Re=(e,t)=>Hi(e,t,On);function Mo(e,t,n){const s=arguments.length;return s===2?ne(t)&&!F(t)?ns(t)?pe(e,null,[t]):pe(e,t):pe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ns(n)&&(n=[n]),pe(e,t,n))}const ql="3.5.3";/** -* @vue/runtime-dom v3.5.3 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let rs;const tr=typeof window<"u"&&window.trustedTypes;if(tr)try{rs=tr.createPolicy("vue",{createHTML:e=>e})}catch{}const Oo=rs?e=>rs.createHTML(e):e=>e,Gl="http://www.w3.org/2000/svg",zl="http://www.w3.org/1998/Math/MathML",We=typeof document<"u"?document:null,nr=We&&We.createElement("template"),Ql={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?We.createElementNS(Gl,e):t==="mathml"?We.createElementNS(zl,e):n?We.createElement(e,{is:n}):We.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>We.createTextNode(e),createComment:e=>We.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>We.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{nr.innerHTML=Oo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const c=nr.content;if(s==="svg"||s==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Yl=Symbol("_vtc");function Jl(e,t,n){const s=e[Yl];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const sr=Symbol("_vod"),Xl=Symbol("_vsh"),ec=Symbol(""),tc=/(^|;)\s*display\s*:/;function nc(e,t,n){const s=e.style,r=se(n);let o=!1;if(n&&!r){if(t)if(se(t))for(const i of t.split(";")){const c=i.slice(0,i.indexOf(":")).trim();n[c]==null&&dn(s,c,"")}else for(const i in t)n[i]==null&&dn(s,i,"");for(const i in n)i==="display"&&(o=!0),dn(s,i,n[i])}else if(r){if(t!==n){const i=s[ec];i&&(n+=";"+i),s.cssText=n,o=tc.test(n)}}else t&&e.removeAttribute("style");sr in e&&(e[sr]=o?s.display:"",e[Xl]&&(s.display="none"))}const rr=/\s*!important$/;function dn(e,t,n){if(F(n))n.forEach(s=>dn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=sc(e,t);rr.test(n)?e.setProperty(gt(s),n.replace(rr,""),"important"):e[s]=n}}const or=["Webkit","Moz","ms"],jn={};function sc(e,t){const n=jn[t];if(n)return n;let s=Oe(t);if(s!=="filter"&&s in e)return jn[t]=s;s=wn(s);for(let r=0;rBn||(fc.then(()=>Bn=0),Bn=Date.now());function ac(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;je(dc(s,n.value),t,5,[s])};return n.value=e,n.attached=uc(),n}function dc(e,t){if(F(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const ur=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,hc=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Jl(e,s,i):t==="style"?nc(e,n,s):_n(t)?fs(t)||lc(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pc(e,t,s,i))?(rc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&lr(e,t,s,i,o,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),lr(e,t,s,i))};function pc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ur(t)&&$(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ur(t)&&se(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!se(n)))}const gc=ie({patchProp:hc},Ql);let ar;function mc(){return ar||(ar=bl(gc))}const vc=(...e)=>{const t=mc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=bc(s);if(!r)return;const o=t._component;!$(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,_c(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function _c(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bc(e){return se(e)?document.querySelector(e):e}const yc="/webapp/assets/logo-BzMutN9x.svg";/*! - * vue-router v4.4.3 - * (c) 2024 Eduardo San Martin Morote - * @license MIT - */const wt=typeof document<"u";function wc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const q=Object.assign;function Un(e,t){const n={};for(const s in t){const r=t[s];n[s]=Te(r)?r.map(e):e(r)}return n}const Ut=()=>{},Te=Array.isArray,To=/#/g,xc=/&/g,Cc=/\//g,Ec=/=/g,Rc=/\?/g,Lo=/\+/g,Sc=/%5B/g,Pc=/%5D/g,ko=/%5E/g,Ac=/%60/g,Ho=/%7B/g,Mc=/%7C/g,Io=/%7D/g,Oc=/%20/g;function Ms(e){return encodeURI(""+e).replace(Mc,"|").replace(Sc,"[").replace(Pc,"]")}function Tc(e){return Ms(e).replace(Ho,"{").replace(Io,"}").replace(ko,"^")}function os(e){return Ms(e).replace(Lo,"%2B").replace(Oc,"+").replace(To,"%23").replace(xc,"%26").replace(Ac,"`").replace(Ho,"{").replace(Io,"}").replace(ko,"^")}function Lc(e){return os(e).replace(Ec,"%3D")}function kc(e){return Ms(e).replace(To,"%23").replace(Rc,"%3F")}function Hc(e){return e==null?"":kc(e).replace(Cc,"%2F")}function Qt(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Ic=/\/$/,Vc=e=>e.replace(Ic,"");function Kn(e,t,n="/"){let s,r={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),r=e(o)),c>-1&&(s=s||t.slice(0,c),i=t.slice(c,t.length)),s=Nc(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:Qt(i)}}function Dc(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function dr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Fc(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&At(t.matched[s],n.matched[r])&&Vo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function At(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$c(e[n],t[n]))return!1;return!0}function $c(e,t){return Te(e)?hr(e,t):Te(t)?hr(t,e):e===t}function hr(e,t){return Te(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Nc(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const Je={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Yt;(function(e){e.pop="pop",e.push="push"})(Yt||(Yt={}));var Kt;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Kt||(Kt={}));function jc(e){if(!e)if(wt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Vc(e)}const Bc=/^[^#]+#/;function Uc(e,t){return e.replace(Bc,"#")+t}function Kc(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Tn=()=>({left:window.scrollX,top:window.scrollY});function Wc(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Kc(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function pr(e,t){return(history.state?history.state.position-t:-1)+e}const is=new Map;function Zc(e,t){is.set(e,t)}function qc(e){const t=is.get(e);return is.delete(e),t}let Gc=()=>location.protocol+"//"+location.host;function Do(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let c=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(c);return l[0]!=="/"&&(l="/"+l),dr(l,"")}return dr(n,e)+s+r}function zc(e,t,n,s){let r=[],o=[],i=null;const c=({state:p})=>{const m=Do(e,location),A=n.value,M=t.value;let N=0;if(p){if(n.value=m,t.value=p,i&&i===A){i=null;return}N=M?p.position-M.position:0}else s(m);r.forEach(H=>{H(n.value,A,{delta:N,type:Yt.pop,direction:N?N>0?Kt.forward:Kt.back:Kt.unknown})})};function l(){i=n.value}function h(p){r.push(p);const m=()=>{const A=r.indexOf(p);A>-1&&r.splice(A,1)};return o.push(m),m}function a(){const{history:p}=window;p.state&&p.replaceState(q({},p.state,{scroll:Tn()}),"")}function d(){for(const p of o)p();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:l,listen:h,destroy:d}}function gr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Tn():null}}function Qc(e){const{history:t,location:n}=window,s={value:Do(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,h,a){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:Gc()+e+l;try{t[a?"replaceState":"pushState"](h,"",p),r.value=h}catch(m){console.error(m),n[a?"replace":"assign"](p)}}function i(l,h){const a=q({},t.state,gr(r.value.back,l,r.value.forward,!0),h,{position:r.value.position});o(l,a,!0),s.value=l}function c(l,h){const a=q({},r.value,t.state,{forward:l,scroll:Tn()});o(a.current,a,!0);const d=q({},gr(s.value,l,null),{position:a.position+1},h);o(l,d,!1),s.value=l}return{location:s,state:r,push:c,replace:i}}function Yc(e){e=jc(e);const t=Qc(e),n=zc(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=q({location:"",base:e,go:s,createHref:Uc.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Jc(e){return typeof e=="string"||e&&typeof e=="object"}function Fo(e){return typeof e=="string"||typeof e=="symbol"}const $o=Symbol("");var mr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(mr||(mr={}));function Mt(e,t){return q(new Error,{type:e,[$o]:!0},t)}function Ke(e,t){return e instanceof Error&&$o in e&&(t==null||!!(e.type&t))}const vr="[^/]+?",Xc={sensitive:!1,strict:!1,start:!0,end:!0},ef=/[.+*?^${}()[\]/\\]/g;function tf(e,t){const n=q({},Xc,t),s=[];let r=n.start?"^":"";const o=[];for(const h of e){const a=h.length?[]:[90];n.strict&&!h.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function No(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const sf={type:0,value:""},rf=/[a-zA-Z0-9_]/;function of(e){if(!e)return[[]];if(e==="/")return[[sf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${h}": ${m}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let c=0,l,h="",a="";function d(){h&&(n===0?o.push({type:0,value:h}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:h,regexp:a,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),h="")}function p(){h+=l}for(;c{i(I)}:Ut}function i(d){if(Fo(d)){const p=s.get(d);p&&(s.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&s.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function c(){return n}function l(d){const p=df(d,n);n.splice(p,0,d),d.record.name&&!yr(d)&&s.set(d.record.name,d)}function h(d,p){let m,A={},M,N;if("name"in d&&d.name){if(m=s.get(d.name),!m)throw Mt(1,{location:d});N=m.record.name,A=q(br(p.params,m.keys.filter(I=>!I.optional).concat(m.parent?m.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),d.params&&br(d.params,m.keys.map(I=>I.name))),M=m.stringify(A)}else if(d.path!=null)M=d.path,m=n.find(I=>I.re.test(M)),m&&(A=m.parse(M),N=m.record.name);else{if(m=p.name?s.get(p.name):n.find(I=>I.re.test(p.path)),!m)throw Mt(1,{location:d,currentLocation:p});N=m.record.name,A=q({},p.params,d.params),M=m.stringify(A)}const H=[];let k=m;for(;k;)H.unshift(k.record),k=k.parent;return{name:N,path:M,params:A,matched:H,meta:af(H)}}e.forEach(d=>o(d));function a(){n.length=0,s.clear()}return{addRoute:o,resolve:h,removeRoute:i,clearRoutes:a,getRoutes:c,getRecordMatcher:r}}function br(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function ff(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:uf(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function uf(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function yr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function af(e){return e.reduce((t,n)=>q(t,n.meta),{})}function wr(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function df(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;No(e,t[o])<0?s=o:n=o+1}const r=hf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function hf(e){let t=e;for(;t=t.parent;)if(jo(t)&&No(e,t)===0)return t}function jo({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function pf(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&os(o)):[s&&os(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function gf(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Te(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const mf=Symbol(""),Cr=Symbol(""),Ln=Symbol(""),Os=Symbol(""),ls=Symbol("");function It(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function tt(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((c,l)=>{const h=p=>{p===!1?l(Mt(4,{from:n,to:t})):p instanceof Error?l(p):Jc(p)?l(Mt(2,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),c())},a=o(()=>e.call(s&&s.instances[r],t,n,h));let d=Promise.resolve(a);e.length<3&&(d=d.then(h)),d.catch(p=>l(p))})}function Wn(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const c in i.components){let l=i.components[c];if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(vf(l)){const a=(l.__vccOpts||l)[t];a&&o.push(tt(a,n,s,i,c,r))}else{let h=l();o.push(()=>h.then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${i.path}"`));const d=wc(a)?a.default:a;i.components[c]=d;const m=(d.__vccOpts||d)[t];return m&&tt(m,n,s,i,c,r)()}))}}return o}function vf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Er(e){const t=Me(Ln),n=Me(Os),s=Re(()=>{const l=st(e.to);return t.resolve(l)}),r=Re(()=>{const{matched:l}=s.value,{length:h}=l,a=l[h-1],d=n.matched;if(!a||!d.length)return-1;const p=d.findIndex(At.bind(null,a));if(p>-1)return p;const m=Rr(l[h-2]);return h>1&&Rr(a)===m&&d[d.length-1].path!==m?d.findIndex(At.bind(null,l[h-2])):p}),o=Re(()=>r.value>-1&&wf(n.params,s.value.params)),i=Re(()=>r.value>-1&&r.value===n.matched.length-1&&Vo(n.params,s.value.params));function c(l={}){return yf(l)?t[st(e.replace)?"replace":"push"](st(e.to)).catch(Ut):Promise.resolve()}return{route:s,href:Re(()=>s.value.href),isActive:o,isExactActive:i,navigate:c}}const _f=no({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Er,setup(e,{slots:t}){const n=En(Er(e)),{options:s}=Me(Ln),r=Re(()=>({[Sr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Sr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:Mo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),bf=_f;function yf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function wf(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Te(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function Rr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Sr=(e,t,n)=>e??t??n,xf=no({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Me(ls),r=Re(()=>e.route||s.value),o=Me(Cr,0),i=Re(()=>{let h=st(o);const{matched:a}=r.value;let d;for(;(d=a[h])&&!d.components;)h++;return h}),c=Re(()=>r.value.matched[i.value]);cn(Cr,Re(()=>i.value+1)),cn(mf,c),cn(ls,r);const l=Mi();return fn(()=>[l.value,c.value,e.name],([h,a,d],[p,m,A])=>{a&&(a.instances[d]=h,m&&m!==a&&h&&h===p&&(a.leaveGuards.size||(a.leaveGuards=m.leaveGuards),a.updateGuards.size||(a.updateGuards=m.updateGuards))),h&&a&&(!m||!At(a,m)||!p)&&(a.enterCallbacks[d]||[]).forEach(M=>M(h))},{flush:"post"}),()=>{const h=r.value,a=e.name,d=c.value,p=d&&d.components[a];if(!p)return Pr(n.default,{Component:p,route:h});const m=d.props[a],A=m?m===!0?h.params:typeof m=="function"?m(h):m:null,N=Mo(p,q({},A,t,{onVnodeUnmounted:H=>{H.component.isUnmounted&&(d.instances[a]=null)},ref:l}));return Pr(n.default,{Component:N,route:h})||N}}});function Pr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Cf=xf;function Ef(e){const t=cf(e.routes,e),n=e.parseQuery||pf,s=e.stringifyQuery||xr,r=e.history,o=It(),i=It(),c=It(),l=Oi(Je);let h=Je;wt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Un.bind(null,_=>""+_),d=Un.bind(null,Hc),p=Un.bind(null,Qt);function m(_,P){let R,T;return Fo(_)?(R=t.getRecordMatcher(_),T=P):T=_,t.addRoute(T,R)}function A(_){const P=t.getRecordMatcher(_);P&&t.removeRoute(P)}function M(){return t.getRoutes().map(_=>_.record)}function N(_){return!!t.getRecordMatcher(_)}function H(_,P){if(P=q({},P||l.value),typeof _=="string"){const u=Kn(n,_,P.path),g=t.resolve({path:u.path},P),b=r.createHref(u.fullPath);return q(u,g,{params:p(g.params),hash:Qt(u.hash),redirectedFrom:void 0,href:b})}let R;if(_.path!=null)R=q({},_,{path:Kn(n,_.path,P.path).path});else{const u=q({},_.params);for(const g in u)u[g]==null&&delete u[g];R=q({},_,{params:d(u)}),P.params=d(P.params)}const T=t.resolve(R,P),W=_.hash||"";T.params=a(p(T.params));const te=Dc(s,q({},_,{hash:Tc(W),path:T.path})),f=r.createHref(te);return q({fullPath:te,hash:W,query:s===xr?gf(_.query):_.query||{}},T,{redirectedFrom:void 0,href:f})}function k(_){return typeof _=="string"?Kn(n,_,l.value.path):q({},_)}function I(_,P){if(h!==_)return Mt(8,{from:P,to:_})}function O(_){return ee(_)}function Q(_){return O(q(k(_),{replace:!0}))}function oe(_){const P=_.matched[_.matched.length-1];if(P&&P.redirect){const{redirect:R}=P;let T=typeof R=="function"?R(_):R;return typeof T=="string"&&(T=T.includes("?")||T.includes("#")?T=k(T):{path:T},T.params={}),q({query:_.query,hash:_.hash,params:T.path!=null?{}:_.params},T)}}function ee(_,P){const R=h=H(_),T=l.value,W=_.state,te=_.force,f=_.replace===!0,u=oe(R);if(u)return ee(q(k(u),{state:typeof u=="object"?q({},W,u.state):W,force:te,replace:f}),P||R);const g=R;g.redirectedFrom=P;let b;return!te&&Fc(s,T,R)&&(b=Mt(16,{to:g,from:T}),Ie(T,T,!0,!1)),(b?Promise.resolve(b):ke(g,T)).catch(v=>Ke(v)?Ke(v,2)?v:Qe(v):B(v,g,T)).then(v=>{if(v){if(Ke(v,2))return ee(q({replace:f},k(v.to),{state:typeof v.to=="object"?q({},W,v.to.state):W,force:te}),P||g)}else v=ct(g,T,!0,f,W);return ze(g,T,v),v})}function Le(_,P){const R=I(_,P);return R?Promise.reject(R):Promise.resolve()}function Ge(_){const P=_t.values().next().value;return P&&typeof P.runWithContext=="function"?P.runWithContext(_):_()}function ke(_,P){let R;const[T,W,te]=Rf(_,P);R=Wn(T.reverse(),"beforeRouteLeave",_,P);for(const u of T)u.leaveGuards.forEach(g=>{R.push(tt(g,_,P))});const f=Le.bind(null,_,P);return R.push(f),xe(R).then(()=>{R=[];for(const u of o.list())R.push(tt(u,_,P));return R.push(f),xe(R)}).then(()=>{R=Wn(W,"beforeRouteUpdate",_,P);for(const u of W)u.updateGuards.forEach(g=>{R.push(tt(g,_,P))});return R.push(f),xe(R)}).then(()=>{R=[];for(const u of te)if(u.beforeEnter)if(Te(u.beforeEnter))for(const g of u.beforeEnter)R.push(tt(g,_,P));else R.push(tt(u.beforeEnter,_,P));return R.push(f),xe(R)}).then(()=>(_.matched.forEach(u=>u.enterCallbacks={}),R=Wn(te,"beforeRouteEnter",_,P,Ge),R.push(f),xe(R))).then(()=>{R=[];for(const u of i.list())R.push(tt(u,_,P));return R.push(f),xe(R)}).catch(u=>Ke(u,8)?u:Promise.reject(u))}function ze(_,P,R){c.list().forEach(T=>Ge(()=>T(_,P,R)))}function ct(_,P,R,T,W){const te=I(_,P);if(te)return te;const f=P===Je,u=wt?history.state:{};R&&(T||f?r.replace(_.fullPath,q({scroll:f&&u&&u.scroll},W)):r.push(_.fullPath,W)),l.value=_,Ie(_,P,R,f),Qe()}let He;function Tt(){He||(He=r.listen((_,P,R)=>{if(!en.listening)return;const T=H(_),W=oe(T);if(W){ee(q(W,{replace:!0}),T).catch(Ut);return}h=T;const te=l.value;wt&&Zc(pr(te.fullPath,R.delta),Tn()),ke(T,te).catch(f=>Ke(f,12)?f:Ke(f,2)?(ee(f.to,T).then(u=>{Ke(u,20)&&!R.delta&&R.type===Yt.pop&&r.go(-1,!1)}).catch(Ut),Promise.reject()):(R.delta&&r.go(-R.delta,!1),B(f,T,te))).then(f=>{f=f||ct(T,te,!1),f&&(R.delta&&!Ke(f,8)?r.go(-R.delta,!1):R.type===Yt.pop&&Ke(f,20)&&r.go(-1,!1)),ze(T,te,f)}).catch(Ut)}))}let mt=It(),re=It(),z;function B(_,P,R){Qe(_);const T=re.list();return T.length?T.forEach(W=>W(_,P,R)):console.error(_),Promise.reject(_)}function Be(){return z&&l.value!==Je?Promise.resolve():new Promise((_,P)=>{mt.add([_,P])})}function Qe(_){return z||(z=!_,Tt(),mt.list().forEach(([P,R])=>_?R(_):P()),mt.reset()),_}function Ie(_,P,R,T){const{scrollBehavior:W}=e;if(!wt||!W)return Promise.resolve();const te=!R&&qc(pr(_.fullPath,0))||(T||!R)&&history.state&&history.state.scroll||null;return Yr().then(()=>W(_,P,te)).then(f=>f&&Wc(f)).catch(f=>B(f,_,P))}const ge=_=>r.go(_);let vt;const _t=new Set,en={currentRoute:l,listening:!0,addRoute:m,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:M,resolve:H,options:e,push:O,replace:Q,go:ge,back:()=>ge(-1),forward:()=>ge(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:re.add,isReady:Be,install(_){const P=this;_.component("RouterLink",bf),_.component("RouterView",Cf),_.config.globalProperties.$router=P,Object.defineProperty(_.config.globalProperties,"$route",{enumerable:!0,get:()=>st(l)}),wt&&!vt&&l.value===Je&&(vt=!0,O(r.location).catch(W=>{}));const R={};for(const W in Je)Object.defineProperty(R,W,{get:()=>l.value[W],enumerable:!0});_.provide(Ln,P),_.provide(Os,Zr(R)),_.provide(ls,l);const T=_.unmount;_t.add(_),_.unmount=function(){_t.delete(_),_t.size<1&&(h=Je,He&&He(),He=null,l.value=Je,vt=!1,z=!1),T()}}};function xe(_){return _.reduce((P,R)=>P.then(()=>Ge(R)),Promise.resolve())}return en}function Rf(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iAt(h,c))?s.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(h=>At(h,l))||r.push(l))}return[n,s,r]}function Bo(){return Me(Ln)}function Uo(e){return Me(Os)}const Ts=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Sf={class:"topbar"},Pf={class:"topbar-wrapper"},Af={class:"menu-wrapper"},Mf={__name:"TopBar",setup(e){const t=Bo(),n=o=>{t.push(o),window.scrollTo(0,0)},s=Uo(),r=o=>o.includes(s.path);return(o,i)=>(rt(),Mn("div",Sf,[U("div",Pf,[U("div",{class:"logo-wrapper",onClick:i[0]||(i[0]=c=>n("/"))},i[4]||(i[4]=[U("img",{src:yc,alt:"Logo"},null,-1),U("div",{class:"logo-text"},"CTP",-1)])),U("div",Af,[U("div",{class:Ct(["menu-text",{"menu-text-active":r(["/challenge"])}]),onClick:i[1]||(i[1]=c=>n("/challenge"))}," Challenge ",2),U("div",{class:Ct(["menu-text",{"menu-text-active":r(["/leaderboard"])}]),onClick:i[2]||(i[2]=c=>n("/leaderboard"))}," Leaderboard ",2),U("div",{class:Ct(["menu-text",{"menu-text-active":r(["/portfolio"])}]),onClick:i[3]||(i[3]=c=>n("/portfolio"))}," Portfolio ",2)]),i[5]||(i[5]=U("div",{class:"wallet-btn"},[U("div",{class:"wallet-text"},"Connect Wallet")],-1))])]))}},Of=Ts(Mf,[["__scopeId","data-v-8299186a"]]),Tf="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",Lf={},kf={class:"footer"};function Hf(e,t){return rt(),Mn("div",kf,t[0]||(t[0]=[U("div",{class:"footer-content-wrapper"},[U("div",{class:"community-wrapper"},[U("img",{src:Tf,alt:"github"})]),U("div",{class:"copyright"},"ⓒ CTP. All Rights Reserved.")],-1)]))}const If=Ts(Lf,[["render",Hf],["__scopeId","data-v-1574b52b"]]),Vf={__name:"App",setup(e){const t=Uo();return(n,s)=>{const r=nl("router-view");return rt(),Mn(Ee,null,[st(t).path!="/"?(rt(),mn(Of,{key:0})):Ys("",!0),pe(r),st(t).path!="/"?(rt(),mn(If,{key:1})):Ys("",!0)],64)}}},Df="modulepreload",Ff=function(e){return"/webapp/"+e},Ar={},Zn=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),i=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.all(n.map(c=>{if(c=Ff(c),c in Ar)return;Ar[c]=!0;const l=c.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const a=document.createElement("link");if(a.rel=l?"stylesheet":Df,l||(a.as="script"),a.crossOrigin="",a.href=c,i&&a.setAttribute("nonce",i),document.head.appendChild(a),l)return new Promise((d,p)=>{a.addEventListener("load",d),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}return r.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},$f="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",Nf="/webapp/assets/logo-DrIcDvRq.svg",jf="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",Bf="/webapp/assets/flower-COLkTZsA.svg",Uf="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",Kf={class:"notebook"},Wf={class:"notebook-screen"},Zf={class:"notebook-screen-wrapper"},qf={class:"notebook-screen-title-wrapper"},Gf={__name:"LandingPage",setup(e){const t=Bo(),n=s=>{t.push(s),window.scrollTo(0,0)};return(s,r)=>(rt(),Mn(Ee,null,[U("div",Kf,[r[5]||(r[5]=U("img",{class:"fixed-notebook",src:$f,alt:"Notebook"},null,-1)),U("div",Wf,[U("div",Zf,[r[4]||(r[4]=U("img",{class:"fixed-logo",src:Nf,alt:"Logo"},null,-1)),U("div",qf,[r[2]||(r[2]=U("div",{class:"notebook-screen-title-text"},"Capture the Prompt",-1)),r[3]||(r[3]=U("div",{class:"notebook-screen-content-text"}," Blockchain-Based AI Prompt Market via Capture-the-Flag ",-1)),U("div",{class:"join-app-btn",onClick:r[0]||(r[0]=o=>n("/challenge"))},r[1]||(r[1]=[U("div",{class:"join-app-text"},"Let’s Play",-1),U("img",{src:jf,alt:"Join-Arrow"},null,-1)]))])])])]),r[6]||(r[6]=U("img",{class:"fixed-flower",src:Bf,alt:"Flower"},null,-1)),r[7]||(r[7]=U("img",{class:"fixed-pencil",src:Uf,alt:"Pencil"},null,-1)),r[8]||(r[8]=U("div",{class:"background-fixed"},null,-1))],64))}},zf=Ts(Gf,[["__scopeId","data-v-050d2aaf"]]),Qf={__name:"LandingView",setup(e){return(t,n)=>(rt(),mn(zf))}},Yf=[{path:"/",name:"Root",component:Qf},{path:"/challenge",name:"Challenge",component:()=>Zn(()=>import("./ChallengeView-AzuLivC-.js"),__vite__mapDeps([0,1,2]))},{path:"/leaderboard",name:"Leaderboard",component:()=>Zn(()=>import("./LeaderboardView-BXGRWozF.js"),__vite__mapDeps([3,4]))},{path:"/portfolio",name:"Portfolio",component:()=>Zn(()=>import("./PortfolioView-CuG2ecdf.js"),__vite__mapDeps([5,1,6]))}],Jf=Ef({history:Yc("/webapp/"),routes:Yf,scrollBehavior(e,t,n){return n||{left:0,top:0}}}),Ko=vc(Vf);Ko.use(Jf);Ko.mount("#app");export{Ee as F,Ts as _,U as a,eu as b,Mn as c,Xf as d,Ys as e,mn as f,Ct as n,rt as o,Mi as r}; diff --git a/assets/index-C8FfjQ5T.js b/assets/index-C8FfjQ5T.js new file mode 100644 index 0000000..731a2a2 --- /dev/null +++ b/assets/index-C8FfjQ5T.js @@ -0,0 +1,41 @@ +import{I as a}from"./index-ZXgCnnEa.js";import{K as e,V as n,U as L,a6 as o,a7 as W,a8 as l,aQ as r,aV as M,aW as Z,a9 as V,X as d,ab as p,aa as H,ac as c,aT as m,aU as k,ad as _,ae as h,af as I,ag as g,ah as T,ai as b,aj as B,b4 as v,b5 as w,Y as S,ak as f,b0 as x,al as A,$ as N,aZ as P,am as U,an as D,ao as E,ap as G,aL as z,a$ as O,b1 as Q,aM as F,aY as K,aq as X,aN as Y,b2 as $,aX as j,at as q,aO as y,a0 as J,a1 as R,a2 as a1,av as i1,au as s1,aw as C1,ax as u1,aK as t1,ay as e1,a_ as n1,aR as L1,aS as o1,aP as W1,az as l1,aA as r1,b3 as M1,b6 as Z1,a3 as V1,aB as d1,aC as p1,aE as H1,a4 as c1,aD as m1,aG as k1,aF as _1,ar as h1,as as I1,aH as g1,a5 as T1,aI as b1,aJ as B1,z as v1,P as w1,Q as S1,T as f1}from"./index-ZXgCnnEa.js";const s=a` + + + + + +`,C=a` + + + + + +`;export{e as MathUtil,n as TransactionUtil,L as UiHelperUtil,o as WuiAccountButton,W as WuiAllWalletsImage,l as WuiAvatar,r as WuiBalance,M as WuiBanner,Z as WuiBannerImg,V as WuiButton,d as WuiCard,p as WuiCardSelect,H as WuiCardSelectLoader,c as WuiChip,m as WuiChipButton,k as WuiCompatibleNetwork,_ as WuiConnectButton,h as WuiCtaButton,I as WuiDetailsGroup,g as WuiDetailsGroupItem,T as WuiDropdownMenu,b as WuiEmailInput,B as WuiEnsInput,v as WuiFlex,w as WuiGrid,S as WuiIcon,f as WuiIconBox,x as WuiIconButton,A as WuiIconLink,N as WuiImage,P as WuiInputAmount,U as WuiInputElement,D as WuiInputNumeric,E as WuiInputText,G as WuiLink,z as WuiListAccordion,O as WuiListAccount,Q as WuiListButton,F as WuiListContent,K as WuiListDescription,X as WuiListItem,Y as WuiListNetwork,$ as WuiListSocial,j as WuiListToken,q as WuiListWallet,y as WuiListWalletTransaction,J as WuiLoadingHexagon,R as WuiLoadingSpinner,a1 as WuiLoadingThumbnail,i1 as WuiLogo,s1 as WuiLogoSelect,C1 as WuiNetworkButton,u1 as WuiNetworkImage,t1 as WuiNoticeCard,e1 as WuiOtp,n1 as WuiPreviewItem,L1 as WuiProfileButton,o1 as WuiProfileButtonV2,W1 as WuiPromo,l1 as WuiQrCode,r1 as WuiSearchBar,M1 as WuiSelect,Z1 as WuiSeparator,V1 as WuiShimmer,d1 as WuiSnackbar,p1 as WuiTabs,H1 as WuiTag,c1 as WuiText,m1 as WuiTokenButton,k1 as WuiTokenListItem,_1 as WuiTooltip,h1 as WuiTransactionListItem,I1 as WuiTransactionListItemLoader,g1 as WuiTransactionVisual,T1 as WuiVisual,b1 as WuiVisualThumbnail,B1 as WuiWalletImage,v1 as customElement,w1 as initializeTheming,S1 as setColorTheme,f1 as setThemeVariables,s as swapInputMaskBottomSvg,C as swapInputMaskTopSvg}; diff --git a/assets/index-CVeTJdZw.css b/assets/index-CVeTJdZw.css new file mode 100644 index 0000000..acedd13 --- /dev/null +++ b/assets/index-CVeTJdZw.css @@ -0,0 +1 @@ +.topbar[data-v-8ddb9fc8]{display:flex;padding:30px 168px 26px;flex-direction:column;justify-content:center;align-items:center;align-self:stretch}.topbar-wrapper[data-v-8ddb9fc8]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.logo-wrapper[data-v-8ddb9fc8]{display:flex;justify-content:center;align-items:center;gap:10px;cursor:pointer}.logo-text[data-v-8ddb9fc8]{color:#000;font-family:Archivo;font-size:26px;font-style:normal;font-weight:700;line-height:normal}.menu-wrapper[data-v-8ddb9fc8]{display:flex;align-items:center;gap:20px}.menu-text[data-v-8ddb9fc8]{color:#000;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal;cursor:pointer}.menu-text-active[data-v-8ddb9fc8]{text-decoration-line:underline}.wallet-btn[data-v-8ddb9fc8]{display:flex;padding:12px 30px;height:16px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#4dc4cf;cursor:pointer}.wallet-text[data-v-8ddb9fc8]{color:#000;text-align:right;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.wallet-connected-btn[data-v-8ddb9fc8]{display:flex;padding:12px 20px;height:16px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#cacaca;cursor:pointer}.wallet-connected-btn img[data-v-8ddb9fc8]{width:24px;height:24px}.wallet-connected-text[data-v-8ddb9fc8]{color:#000;text-align:right;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.footer[data-v-1574b52b]{display:flex;margin-top:70px;padding:40px 170px 50px;justify-content:space-between;align-items:flex-end;border-top:2px solid #000;background:#fff}.footer-content-wrapper[data-v-1574b52b]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.community-wrapper[data-v-1574b52b]{display:flex;align-items:flex-start;gap:12px}.copyright[data-v-1574b52b]{color:#000;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:19px;letter-spacing:-.4px}body{background:url(/webapp/assets/background-DH44QaTR.png);background-size:cover;margin:0}.router{margin-top:30px;min-height:calc(100vh - 351px)}.notebook[data-v-050d2aaf]{position:fixed;top:57%;left:50%;transform:translate(-50%,-50%);z-index:10}.fixed-notebook[data-v-050d2aaf]{width:100%;width:640px}.notebook-screen[data-v-050d2aaf]{position:absolute;top:20px;left:50%;transform:translate(-50%);width:410px;height:272px;padding:30px 46px;flex-direction:column;justify-content:space-between;text-align:center;align-items:center;flex-shrink:0;border-radius:10px;border:2px solid #000;background:#fff;z-index:11}.notebook-screen-wrapper[data-v-050d2aaf]{position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}.notebook-screen img[data-v-050d2aaf]{margin-bottom:20px}.notebook-screen-title-wrapper[data-v-050d2aaf]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px}.notebook-screen-title-text[data-v-050d2aaf]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.notebook-screen-content-text[data-v-050d2aaf]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.join-app-btn[data-v-050d2aaf]{display:flex;width:100px;height:20px;padding:10px 20px;align-items:flex-start;gap:12px;flex-shrink:0;border-radius:20px;border:2px solid #000;background:#4dc4cf;cursor:pointer}.join-app-text[data-v-050d2aaf]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.fixed-flower[data-v-050d2aaf]{position:fixed;bottom:20%;right:0;width:360px;height:auto;z-index:10}.fixed-pencil[data-v-050d2aaf]{position:fixed;bottom:20%;left:0;width:280px;height:auto;z-index:10}.background-fixed[data-v-050d2aaf]{position:fixed;bottom:0;left:0;width:100%;height:30vh;background-color:#53926d;z-index:0;pointer-events:none;border:2px solid #000} diff --git a/assets/index-CZ6iaunK.js b/assets/index-CZ6iaunK.js new file mode 100644 index 0000000..cd22523 --- /dev/null +++ b/assets/index-CZ6iaunK.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CZIm8gY2.js","assets/index-ZXgCnnEa.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); +import{q as u,x as h,bf as R,bb as V}from"./index-ZXgCnnEa.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-CZIm8gY2.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-CZIm8gY2.js b/assets/index-CZIm8gY2.js new file mode 100644 index 0000000..15096e5 --- /dev/null +++ b/assets/index-CZIm8gY2.js @@ -0,0 +1,47 @@ +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-CZ6iaunK.js";import{bg as Ur}from"./index-ZXgCnnEa.js";/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Qe=window,jt=Qe.ShadowRoot&&(Qe.ShadyCSS===void 0||Qe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ht=Symbol(),Vt=new WeakMap;let br=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Ht)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(jt&&e===void 0){const i=r!==void 0&&r.length===1;i&&(e=Vt.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Vt.set(r,e))}return e}toString(){return this.cssText}};const jr=t=>new br(typeof t=="string"?t:t+"",void 0,Ht),C=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((i,o,n)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[n+1],t[0]);return new br(r,t,Ht)},Hr=(t,e)=>{jt?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const i=document.createElement("style"),o=Qe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,t.appendChild(i)})},Ft=jt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const i of e.cssRules)r+=i.cssText;return jr(r)})(t):t;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var rt;const Ye=window,qt=Ye.trustedTypes,Br=qt?qt.emptyScript:"",Kt=Ye.reactiveElementPolyfillSupport,Lt={toAttribute(t,e){switch(e){case Boolean:t=t?Br:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},yr=(t,e)=>e!==t&&(e==e||t==t),ot={attribute:!0,type:String,converter:Lt,reflect:!1,hasChanged:yr},Pt="finalized";let ue=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,i)=>{const o=this._$Ep(i,r);o!==void 0&&(this._$Ev.set(o,i),e.push(o))}),e}static createProperty(e,r=ot){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,i,r);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(o){const n=this[e];this[r]=o,this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||ot}static finalize(){if(this.hasOwnProperty(Pt))return!1;this[Pt]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const o of i)this.createProperty(o,r[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)r.unshift(Ft(o))}else e!==void 0&&r.push(Ft(e));return r}static _$Ep(e,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Hr(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=ot){var o;const n=this.constructor._$Ep(e,i);if(n!==void 0&&i.reflect===!0){const a=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:Lt).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$El=null}}_$AK(e,r){var i;const o=this.constructor,n=o._$Ev.get(e);if(n!==void 0&&this._$El!==n){const a=o.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:Lt;this._$El=n,this[n]=s.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let o=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||yr)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,n)=>this[n]=o),this._$Ei=void 0);let r=!1;const i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(o=>{var n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.call(o)}),this.update(i)):this._$Ek()}catch(o){throw r=!1,this._$Ek(),o}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ue[Pt]=!0,ue.elementProperties=new Map,ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},Kt==null||Kt({ReactiveElement:ue}),((rt=Ye.reactiveElementVersions)!==null&&rt!==void 0?rt:Ye.reactiveElementVersions=[]).push("1.6.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var it;const Ge=window,be=Ge.trustedTypes,Qt=be?be.createPolicy("lit-html",{createHTML:t=>t}):void 0,Wt="$lit$",Q=`lit$${(Math.random()+"").slice(9)}$`,xr="?"+Q,Zr=`<${xr}>`,se=document,Se=()=>se.createComment(""),Le=t=>t===null||typeof t!="object"&&typeof t!="function",$r=Array.isArray,zr=t=>$r(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",nt=`[ +\f\r]`,Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,Gt=/>/g,ee=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Xt=/'/g,Jt=/"/g,Cr=/^(?:script|style|textarea|title)$/i,Ar=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),l=Ar(1),E=Ar(2),le=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),er=new WeakMap,ie=se.createTreeWalker(se,129,null,!1);function _r(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Qt!==void 0?Qt.createHTML(e):e}const Vr=(t,e)=>{const r=t.length-1,i=[];let o,n=e===2?"":"",a=Ce;for(let s=0;s"?(a=o??Ce,$=-1):x[1]===void 0?$=-2:($=a.lastIndex-x[2].length,d=x[1],a=x[3]===void 0?ee:x[3]==='"'?Jt:Xt):a===Jt||a===Xt?a=ee:a===Yt||a===Gt?a=Ce:(a=ee,o=void 0);const _=a===ee&&t[s+1].startsWith("/>")?" ":"";n+=a===Ce?c+Zr:$>=0?(i.push(d),c.slice(0,$)+Wt+c.slice($)+Q+_):c+Q+($===-2?(i.push(void 0),s):_)}return[_r(t,n+(t[r]||"")+(e===2?"":"")),i]};class Pe{constructor({strings:e,_$litType$:r},i){let o;this.parts=[];let n=0,a=0;const s=e.length-1,c=this.parts,[d,x]=Vr(e,r);if(this.el=Pe.createElement(d,i),ie.currentNode=this.el.content,r===2){const $=this.el.content,m=$.firstChild;m.remove(),$.append(...m.childNodes)}for(;(o=ie.nextNode())!==null&&c.length0){o.textContent=be?be.emptyScript:"";for(let _=0;_2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,o){const n=this.strings;let a=!1;if(n===void 0)e=ye(this,e,r,0),a=!Le(e)||e!==this._$AH&&e!==le,a&&(this._$AH=e);else{const s=e;let c,d;for(e=n[0],c=0;c{var i,o;const n=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:e;let a=n._$litPart$;if(a===void 0){const s=(o=r==null?void 0:r.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=a=new Ne(e.insertBefore(Se(),s),s,void 0,r??{})}return a._$AI(t),a};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var at,st;class w extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Xr(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return le}}w.finalized=!0,w._$litElement$=!0,(at=globalThis.litElementHydrateSupport)===null||at===void 0||at.call(globalThis,{LitElement:w});const rr=globalThis.litElementPolyfillSupport;rr==null||rr({LitElement:w});((st=globalThis.litElementVersions)!==null&&st!==void 0?st:globalThis.litElementVersions=[]).push("3.3.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const y=t=>e=>typeof e=="function"?((r,i)=>(customElements.define(r,i),i))(t,e):((r,i)=>{const{kind:o,elements:n}=i;return{kind:o,elements:n,finisher(a){customElements.define(r,a)}}})(t,e);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Jr=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}},eo=(t,e,r)=>{e.constructor.createProperty(r,t)};function p(t){return(e,r)=>r!==void 0?eo(t,e,r):Jr(t,e)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function W(t){return p({...t,state:!0})}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var lt;((lt=window.HTMLSlotElement)===null||lt===void 0?void 0:lt.prototype.assignedElements)!=null;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const to={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ro=t=>(...e)=>({_$litDirective$:t,values:e});class oo{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Z=ro(class extends oo{constructor(t){var e;if(super(t),t.type!==to.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,i;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!(!((r=this.nt)===null||r===void 0)&&r.has(n))&&this.it.add(n);return this.render(e)}const o=t.element.classList;this.it.forEach(n=>{n in e||(o.remove(n),this.it.delete(n))});for(const n in e){const a=!!e[n];a===this.it.has(n)||!((i=this.nt)===null||i===void 0)&&i.has(n)||(a?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return le}});function io(t,e){t.indexOf(e)===-1&&t.push(e)}const Er=(t,e,r)=>Math.min(Math.max(r,t),e),D={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Xe=t=>typeof t=="number",we=t=>Array.isArray(t)&&!Xe(t[0]),no=(t,e,r)=>{const i=e-t;return((r-t)%i+i)%i+t};function ao(t,e){return we(t)?t[no(0,t.length,e)]:t}const kr=(t,e,r)=>-r*t+r*e+t,Or=()=>{},G=t=>t,Bt=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function Ir(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const o=Bt(0,e,i);t.push(kr(r,1,o))}}function so(t){const e=[0];return Ir(e,t-1),e}function lo(t,e=so(t.length),r=G){const i=t.length,o=i-e.length;return o>0&&Ir(e,o),n=>{let a=0;for(;aArray.isArray(t)&&Xe(t[0]),Nt=t=>typeof t=="object"&&!!t.createAnimation,xe=t=>typeof t=="function",co=t=>typeof t=="string",Re={ms:t=>t*1e3,s:t=>t/1e3},Mr=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,ho=1e-7,mo=12;function po(t,e,r,i,o){let n,a,s=0;do a=e+(r-e)/2,n=Mr(a,i,o)-t,n>0?r=a:e=a;while(Math.abs(n)>ho&&++spo(n,0,1,t,r);return n=>n===0||n===1?n:Mr(o(n),e,i)}const uo=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const i=r*t,o=e==="end"?Math.floor(i):Math.ceil(i);return Er(0,1,o/t)},go={ease:Me(.25,.1,.25,1),"ease-in":Me(.42,0,1,1),"ease-in-out":Me(.42,0,.58,1),"ease-out":Me(0,0,.58,1)},wo=/\((.*?)\)/;function or(t){if(xe(t))return t;if(Tr(t))return Me(...t);const e=go[t];if(e)return e;if(t.startsWith("steps")){const r=wo.exec(t);if(r){const i=r[1].split(",");return uo(parseFloat(i[0]),i[1].trim())}}return G}class Rr{constructor(e,r=[0,1],{easing:i,duration:o=D.duration,delay:n=D.delay,endDelay:a=D.endDelay,repeat:s=D.repeat,offset:c,direction:d="normal",autoplay:x=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=G,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((m,_)=>{this.resolve=m,this.reject=_}),i=i||D.easing,Nt(i)){const m=i.createAnimation(r);i=m.easing,r=m.keyframes||r,o=m.duration||o}this.repeat=s,this.easing=we(i)?G:or(i),this.updateDuration(o);const $=lo(r,c,we(i)?i.map(or):G);this.tick=m=>{var _;n=n;let f=0;this.pauseTime!==void 0?f=this.pauseTime:f=(m-this.startTime)*this.rate,this.t=f,f/=1e3,f=Math.max(f-n,0),this.playState==="finished"&&this.pauseTime===void 0&&(f=this.totalDuration);const u=f/this.duration;let I=Math.floor(u),b=u%1;!b&&u>=1&&(b=1),b===1&&I--;const R=I%2;(d==="reverse"||d==="alternate"&&R||d==="alternate-reverse"&&!R)&&(b=1-b);const S=f>=this.totalDuration?1:Math.min(b,1),N=$(this.easing(S));e(N),this.pauseTime===void 0&&(this.playState==="finished"||f>=this.totalDuration+a)?(this.playState="finished",(_=this.resolve)===null||_===void 0||_.call(this,N)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},x&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class vo{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const ct=new WeakMap;function Sr(t){return ct.has(t)||ct.set(t,{transforms:[],values:new Map}),ct.get(t)}function fo(t,e){return t.has(e)||t.set(e,new vo),t.get(e)}const bo=["","X","Y","Z"],yo=["translate","scale","rotate","skew"],Je={x:"translateX",y:"translateY",z:"translateZ"},ir={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},xo={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:ir,scale:{syntax:"",initialValue:1,toDefaultUnit:G},skew:ir},We=new Map,Zt=t=>`--motion-${t}`,et=["x","y","z"];yo.forEach(t=>{bo.forEach(e=>{et.push(t+e),We.set(Zt(t+e),xo[t])})});const $o=(t,e)=>et.indexOf(t)-et.indexOf(e),Co=new Set(et),Lr=t=>Co.has(t),Ao=(t,e)=>{Je[e]&&(e=Je[e]);const{transforms:r}=Sr(t);io(r,e),t.style.transform=_o(r)},_o=t=>t.sort($o).reduce(Eo,"").trim(),Eo=(t,e)=>`${t} ${e}(var(${Zt(e)}))`,Dt=t=>t.startsWith("--"),nr=new Set;function ko(t){if(!nr.has(t)){nr.add(t);try{const{syntax:e,initialValue:r}=We.has(t)?We.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}const dt=(t,e)=>document.createElement("div").animate(t,e),ar={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{dt({opacity:[1]})}catch{return!1}return!0},finished:()=>!!dt({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{dt({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},ht={},ge={};for(const t in ar)ge[t]=()=>(ht[t]===void 0&&(ht[t]=ar[t]()),ht[t]);const Oo=.015,Io=(t,e)=>{let r="";const i=Math.round(e/Oo);for(let o=0;oxe(t)?ge.linearEasing()?`linear(${Io(t,e)})`:D.easing:Tr(t)?To(t):t,To=([t,e,r,i])=>`cubic-bezier(${t}, ${e}, ${r}, ${i})`;function Mo(t,e){for(let r=0;rArray.isArray(t)?t:[t];function Ut(t){return Je[t]&&(t=Je[t]),Lr(t)?Zt(t):t}const je={get:(t,e)=>{e=Ut(e);let r=Dt(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){const i=We.get(e);i&&(r=i.initialValue)}return r},set:(t,e,r)=>{e=Ut(e),Dt(e)?t.style.setProperty(e,r):t.style[e]=r}};function Pr(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function So(t,e){var r;let i=(e==null?void 0:e.toDefaultUnit)||G;const o=t[t.length-1];if(co(o)){const n=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";n&&(i=a=>a+n)}return i}function Lo(){return window.__MOTION_DEV_TOOLS_RECORD}function Po(t,e,r,i={},o){const n=Lo(),a=i.record!==!1&&n;let s,{duration:c=D.duration,delay:d=D.delay,endDelay:x=D.endDelay,repeat:$=D.repeat,easing:m=D.easing,persist:_=!1,direction:f,offset:u,allowWebkitAcceleration:I=!1,autoplay:b=!0}=i;const R=Sr(t),S=Lr(e);let N=ge.waapi();S&&Ao(t,e);const U=Ut(e),De=fo(R.values,U),z=We.get(U);return Pr(De.animation,!(Nt(m)&&De.generator)&&i.record!==!1),()=>{const Ue=()=>{var O,$e;return($e=(O=je.get(t,U))!==null&&O!==void 0?O:z==null?void 0:z.initialValue)!==null&&$e!==void 0?$e:0};let T=Mo(Ro(r),Ue);const zt=So(T,z);if(Nt(m)){const O=m.createAnimation(T,e!=="opacity",Ue,U,De);m=O.easing,T=O.keyframes||T,c=O.duration||c}if(Dt(U)&&(ge.cssRegisterProperty()?ko(U):N=!1),S&&!ge.linearEasing()&&(xe(m)||we(m)&&m.some(xe))&&(N=!1),N){z&&(T=T.map(J=>Xe(J)?z.toDefaultUnit(J):J)),T.length===1&&(!ge.partialKeyframes()||a)&&T.unshift(Ue());const O={delay:Re.ms(d),duration:Re.ms(c),endDelay:Re.ms(x),easing:we(m)?void 0:sr(m,c),direction:f,iterations:$+1,fill:"both"};s=t.animate({[U]:T,offset:u,easing:we(m)?m.map(J=>sr(J,c)):void 0},O),s.finished||(s.finished=new Promise((J,Nr)=>{s.onfinish=J,s.oncancel=Nr}));const $e=T[T.length-1];s.finished.then(()=>{_||(je.set(t,U,$e),s.cancel())}).catch(Or),I||(s.playbackRate=1.000001)}else if(o&&S)T=T.map(O=>typeof O=="string"?parseFloat(O):O),T.length===1&&T.unshift(parseFloat(Ue())),s=new o(O=>{je.set(t,U,zt?zt(O):O)},T,Object.assign(Object.assign({},i),{duration:c,easing:m}));else{const O=T[T.length-1];je.set(t,U,z&&Xe(O)?z.toDefaultUnit(O):O)}return a&&n(t,e,T,{duration:c,delay:d,easing:m,repeat:$,offset:u},"motion-one"),De.setAnimation(s),s&&!b&&s.pause(),s}}const Wo=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function No(t,e){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Do=t=>t(),Wr=(t,e,r=D.duration)=>new Proxy({animations:t.map(Do).filter(Boolean),duration:r,options:e},jo),Uo=t=>t.animations[0],jo={get:(t,e)=>{const r=Uo(t);switch(e){case"duration":return t.duration;case"currentTime":return Re.s((r==null?void 0:r[e])||0);case"playbackRate":case"playState":return r==null?void 0:r[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Ho)).catch(Or)),t.finished;case"stop":return()=>{t.animations.forEach(i=>Pr(i))};case"forEachNative":return i=>{t.animations.forEach(o=>i(o,t))};default:return typeof(r==null?void 0:r[e])>"u"?void 0:()=>t.animations.forEach(i=>i[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=Re.ms(r);case"playbackRate":for(let i=0;it.finished;function Bo(t,e,r){return xe(t)?t(e,r):t}function Zo(t){return function(r,i,o={}){r=No(r);const n=r.length,a=[];for(let s=0;s{const r=new Rr(t,[0,1],e);return r.finished.catch(()=>{}),r}],e,e.duration)}function ne(t,e,r){return(xe(t)?Vo:zo)(t,e,r)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const L=t=>t??M;var Fo=Object.defineProperty,lr=Object.getOwnPropertySymbols,qo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable,cr=(t,e,r)=>e in t?Fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mt=(t,e)=>{for(var r in e||(e={}))qo.call(e,r)&&cr(t,r,e[r]);if(lr)for(var r of lr(e))Ko.call(e,r)&&cr(t,r,e[r]);return t};function Qo(){var t;const e=(t=fe.state.themeMode)!=null?t:"dark",r={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--wcm-color-fg-1":r.foreground[1],"--wcm-color-fg-2":r.foreground[2],"--wcm-color-fg-3":r.foreground[3],"--wcm-color-bg-1":r.background[1],"--wcm-color-bg-2":r.background[2],"--wcm-color-bg-3":r.background[3],"--wcm-color-overlay":r.overlay}}function dr(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const v={getPreset(t){return dr()[t]},setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=fe.state;if(t){const r=mt(mt(mt({},Qo()),dr()),e);Object.entries(r).forEach(([i,o])=>t.style.setProperty(i,o))}},globalCss:C`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Yo=C`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Go=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,ce=(t,e,r,i)=>{for(var o=i>1?void 0:i?Xo(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Go(e,r,o),o};let V=class extends w{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const t={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),l``}};V.styles=[v.globalCss,Yo],ce([p({type:Boolean})],V.prototype,"disabled",2),ce([p()],V.prototype,"iconLeft",2),ce([p()],V.prototype,"iconRight",2),ce([p()],V.prototype,"onClick",2),ce([p()],V.prototype,"variant",2),V=ce([y("wcm-button")],V);const Jo=C`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,pt=(t,e,r,i)=>{for(var o=i>1?void 0:i?ti(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&ei(e,r,o),o};let Ae=class extends w{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"wcm-secondary":this.variant==="secondary"};return l``}};Ae.styles=[v.globalCss,Jo],pt([p({type:Boolean})],Ae.prototype,"disabled",2),pt([p()],Ae.prototype,"variant",2),Ae=pt([y("wcm-button-big")],Ae);const ri=C`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var oi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let ut=class extends w{render(){return l`
`}};ut.styles=[v.globalCss,ri],ut=oi([y("wcm-info-footer")],ut);const A={CROSS_ICON:E``,WALLET_CONNECT_LOGO:E``,WALLET_CONNECT_ICON:E``,WALLET_CONNECT_ICON_COLORED:E``,BACK_ICON:E``,COPY_ICON:E``,RETRY_ICON:E``,DESKTOP_ICON:E``,MOBILE_ICON:E``,ARROW_DOWN_ICON:E``,ARROW_UP_RIGHT_ICON:E``,ARROW_RIGHT_ICON:E``,QRCODE_ICON:E``,SCAN_ICON:E``,CHECKMARK_ICON:E``,SEARCH_ICON:E``,WALLET_PLACEHOLDER:E``,GLOBE_ICON:E``},ii=C`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var ni=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let gt=class extends w{render(){return l`
${A.WALLET_CONNECT_LOGO}
`}};gt.styles=[v.globalCss,ii],gt=ni([y("wcm-modal-backcard")],gt);const ai=C`main{padding:20px;padding-top:0;width:100%}`;var si=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let wt=class extends w{render(){return l`
`}};wt.styles=[v.globalCss,ai],wt=si([y("wcm-modal-content")],wt);const li=C`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var ci=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let vt=class extends w{render(){return l`
`}};vt.styles=[v.globalCss,li],vt=ci([y("wcm-modal-footer")],vt);const di=C`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var hi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,_e=(t,e,r,i)=>{for(var o=i>1?void 0:i?mi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&hi(e,r,o),o};let te=class extends w{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return l``}actionBtnTemplate(){return l``}render(){const t={"wcm-border":this.border},e=k.state.history.length>1,r=this.title?l`${this.title}`:l``;return l`
${e?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
`}};te.styles=[v.globalCss,di],_e([p()],te.prototype,"title",2),_e([p()],te.prototype,"onAction",2),_e([p()],te.prototype,"actionIcon",2),_e([p({type:Boolean})],te.prototype,"border",2),te=_e([y("wcm-modal-header")],te);const h={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(t,e){const r=t.renderRoot.querySelector(e);if(!r)throw new Error(`${e} not found`);return r},getWalletIcon({id:t,image_id:e}){const{walletImages:r}=ae.state;return r!=null&&r[t]?r[t]:e?P.getWalletImageUrl(e):""},getWalletName(t,e=!1){return e&&t.length>8?`${t.substring(0,8)}..`:t},isMobileAnimation(){return window.innerWidth<=h.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((r,i)=>{const o=new Image;o.onload=r,o.onerror=i,o.crossOrigin="anonymous",o.src=t});return Promise.race([e,g.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let r;return(...i)=>{function o(){t(...i)}r&&clearTimeout(r),r=setTimeout(o,e)}},handleMobileLinking(t){const{walletConnectUri:e}=H.state,{mobile:r,name:i}=t,o=r==null?void 0:r.native,n=r==null?void 0:r.universal;h.setRecentWallet(t);function a(s){let c="";o?c=g.formatUniversalUrl(o,s,i):n&&(c=g.formatNativeUrl(n,s,i)),g.openHref(c,"_self")}e&&a(e)},handleAndroidLinking(){const{walletConnectUri:t}=H.state;t&&(g.setWalletConnectAndroidDeepLink(t),g.openHref(t,"_self"))},async handleUriCopy(){const{walletConnectUri:t}=H.state;if(t)try{await navigator.clipboard.writeText(t),Y.openToast("Link copied","success")}catch{Y.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:t}=ae.state,e=Object.values(t??{});return Object.values(e)},truncate(t,e=8){return t.length<=e?t:`${t.substring(0,4)}...${t.substring(t.length-4)}`},setRecentWallet(t){try{localStorage.setItem(h.WCM_RECENT_WALLET_DATA,JSON.stringify(t))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const t=localStorage.getItem(h.WCM_RECENT_WALLET_DATA);return t?JSON.parse(t):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){g.openHref(h.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:t,mobile:e}=g.getWalletRouterData(),r=!!(t!=null&&t.native),i=!!(t!=null&&t.universal),o=!!(e!=null&&e.native)||!!(e!=null&&e.universal);return{isDesktop:r,isMobile:o,isWeb:i}},goToConnectingView(t){k.setData({Wallet:t});const e=g.isMobile(),{isDesktop:r,isWeb:i,isMobile:o}=h.getCachedRouterWalletPlatforms();e?o?k.push("MobileConnecting"):i?k.push("WebConnecting"):k.push("InstallWallet"):r?k.push("DesktopConnecting"):i?k.push("WebConnecting"):o?k.push("MobileQrcodeConnecting"):k.push("InstallWallet")}},pi=C`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var ui=Object.defineProperty,gi=Object.getOwnPropertyDescriptor,ft=(t,e,r,i)=>{for(var o=i>1?void 0:i?gi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&ui(e,r,o),o};let Ee=class extends w{constructor(){super(),this.view=k.state.view,this.prevView=k.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=k.subscribe(t=>{this.view!==t.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([t])=>{const e=`${t.contentRect.height}px`;this.oldHeight!=="0px"&&ne(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;(t=this.unsubscribe)==null||t.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return h.getShadowRootElement(this,".wcm-router")}get contentEl(){return h.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return l``;case"DesktopConnecting":return l``;case"MobileConnecting":return l``;case"WebConnecting":return l``;case"MobileQrcodeConnecting":return l``;case"WalletExplorer":return l``;case"Qrcode":return l``;case"InstallWallet":return l``;default:return l`
Not Found
`}}async onChangeRoute(){await ne(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=k.state.view,ne(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return l`
${this.viewTemplate()}
`}};Ee.styles=[v.globalCss,pi],ft([W()],Ee.prototype,"view",2),ft([W()],Ee.prototype,"prevView",2),Ee=ft([y("wcm-modal-router")],Ee);const wi=C`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var vi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,hr=(t,e,r,i)=>{for(var o=i>1?void 0:i?fi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&vi(e,r,o),o};let He=class extends w{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=Y.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>Y.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),Y.closeToast()}render(){const{message:t,variant:e}=Y.state,r={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?l`
${e==="success"?A.CHECKMARK_ICON:null} ${e==="error"?A.CROSS_ICON:null}${t}
`:null}};He.styles=[v.globalCss,wi],hr([W()],He.prototype,"open",2),He=hr([y("wcm-modal-toast")],He);const bi=.1,mr=2.5,B=7;function bt(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+bi}function yi(t,e){const r=Array.prototype.slice.call(Ur.create(t,{errorCorrectionLevel:e}).modules.data,0),i=Math.sqrt(r.length);return r.reduce((o,n,a)=>(a%i===0?o.push([n]):o[o.length-1].push(n))&&o,[])}const xi={generate(t,e,r){const i="#141414",o="#ffffff",n=[],a=yi(t,"Q"),s=e/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach(({x:f,y:u})=>{const I=(a.length-B)*s*f,b=(a.length-B)*s*u,R=.45;for(let S=0;S`)}});const d=Math.floor((r+25)/s),x=a.length/2-d/2,$=a.length/2+d/2-1,m=[];a.forEach((f,u)=>{f.forEach((I,b)=>{if(a[u][b]&&!(ua.length-(B+1)&&ba.length-(B+1))&&!(u>x&&u<$&&b>x&&b<$)){const R=u*s+s/2,S=b*s+s/2;m.push([R,S])}})});const _={};return m.forEach(([f,u])=>{_[f]?_[f].push(u):_[f]=[u]}),Object.entries(_).map(([f,u])=>{const I=u.filter(b=>u.every(R=>!bt(b,R,s)));return[Number(f),I]}).forEach(([f,u])=>{u.forEach(I=>{n.push(E``)})}),Object.entries(_).filter(([f,u])=>u.length>1).map(([f,u])=>{const I=u.filter(b=>u.some(R=>bt(b,R,s)));return[Number(f),I]}).map(([f,u])=>{u.sort((b,R)=>bS.some(N=>bt(b,N,s)));R?R.push(b):I.push([b])}return[f,I.map(b=>[b[0],b[b.length-1]])]}).forEach(([f,u])=>{u.forEach(([I,b])=>{n.push(E``)})}),n}},$i=C`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Ci=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,de=(t,e,r,i)=>{for(var o=i>1?void 0:i?Ai(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ci(e,r,o),o};let F=class extends w{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const t=fe.state.themeMode==="light"?this.size:this.size-36;return E`${xi.generate(this.uri,t,t/4)}`}render(){const t={"wcm-dark":fe.state.themeMode==="dark"};return l`
${this.walletId||this.imageUrl?l``:A.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};F.styles=[v.globalCss,$i],de([p()],F.prototype,"uri",2),de([p({type:Number})],F.prototype,"size",2),de([p()],F.prototype,"imageId",2),de([p()],F.prototype,"walletId",2),de([p()],F.prototype,"imageUrl",2),F=de([y("wcm-qrcode")],F);const _i=C`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ei=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,pr=(t,e,r,i)=>{for(var o=i>1?void 0:i?ki(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ei(e,r,o),o};let Be=class extends w{constructor(){super(...arguments),this.onChange=()=>null}render(){return l` ${A.SEARCH_ICON}`}};Be.styles=[v.globalCss,_i],pr([p()],Be.prototype,"onChange",2),Be=pr([y("wcm-search-input")],Be);const Oi=C`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Ii=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let yt=class extends w{render(){return l``}};yt.styles=[v.globalCss,Oi],yt=Ii([y("wcm-spinner")],yt);const Ti=C`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Mi=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,xt=(t,e,r,i)=>{for(var o=i>1?void 0:i?Ri(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Mi(e,r,o),o};let ke=class extends w{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return l``}};ke.styles=[v.globalCss,Ti],xt([p()],ke.prototype,"variant",2),xt([p()],ke.prototype,"color",2),ke=xt([y("wcm-text")],ke);const Si=C`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Li=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,q=(t,e,r,i)=>{for(var o=i>1?void 0:i?Pi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Li(e,r,o),o};let j=class extends w{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?l`RECENT`:this.installed?l`INSTALLED`:null}handleClick(){Dr.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var t;return l``}};j.styles=[v.globalCss,Si],q([p()],j.prototype,"onClick",2),q([p()],j.prototype,"name",2),q([p()],j.prototype,"walletId",2),q([p()],j.prototype,"label",2),q([p()],j.prototype,"imageId",2),q([p({type:Boolean})],j.prototype,"installed",2),q([p({type:Boolean})],j.prototype,"recent",2),j=q([y("wcm-wallet-button")],j);const Wi=C`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ni=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Ze=(t,e,r,i)=>{for(var o=i>1?void 0:i?Di(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ni(e,r,o),o};let he=class extends w{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var t;const e=(t=this.imageUrl)!=null&&t.length?this.imageUrl:h.getWalletIcon({id:this.walletId,image_id:this.imageId});return l`${e.length?l`
${this.id}
`:A.WALLET_PLACEHOLDER}`}};he.styles=[v.globalCss,Wi],Ze([p()],he.prototype,"walletId",2),Ze([p()],he.prototype,"imageId",2),Ze([p()],he.prototype,"imageUrl",2),he=Ze([y("wcm-wallet-image")],he);var Ui=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,ur=(t,e,r,i)=>{for(var o=i>1?void 0:i?ji(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ui(e,r,o),o};let $t=class extends w{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>h.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){if(ae.state.enableExplorer){await P.getRecomendedWallets(),H.setIsDataLoaded(!0);const{recomendedWallets:t}=P.state,e=t.map(r=>h.getWalletIcon(r));await this.loadImages(e)}else H.setIsDataLoaded(!0)}async preloadCustomImages(){const t=h.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),Y.openToast("Failed preloading","error")}}};ur([W()],$t.prototype,"preload",2),$t=ur([y("wcm-explorer-context")],$t);var Hi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let gr=class extends w{constructor(){super(),this.unsubscribeTheme=void 0,v.setTheme(),this.unsubscribeTheme=fe.subscribe(v.setTheme)}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}};gr=Hi([y("wcm-theme-context")],gr);const Bi=C`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Zi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Ct=class extends w{onGoToQrcode(){k.push("Qrcode")}render(){const{recomendedWallets:t}=P.state,e=[...t,...t],r=g.RECOMMENDED_WALLET_AMOUNT*2;return l`
${A.MOBILE_ICON}WalletConnect
${[...Array(r)].map((i,o)=>{const n=e[o%e.length];return n?l``:A.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Ct.styles=[v.globalCss,Bi],Ct=Zi([y("wcm-android-wallet-selection")],Ct);const zi=C`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Vi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,me=(t,e,r,i)=>{for(var o=i>1?void 0:i?Fi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Vi(e,r,o),o};let K=class extends w{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var t,e;const r=(e=(t=fe.state.themeVariables)==null?void 0:t["--wcm-wallet-icon-large-border-radius"])!=null?e:v.getPreset("--wcm-wallet-icon-large-border-radius");let i=0;r.includes("%")?i=88/100*parseInt(r,10):i=parseInt(r,10),i*=1.17;const o=317-i*1.57,n=425-i*1.8;return l``}render(){const t={"wcm-error":this.isError,"wcm-stale":this.isStale};return l`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};K.styles=[v.globalCss,zi],me([p()],K.prototype,"walletId",2),me([p()],K.prototype,"imageId",2),me([p({type:Boolean})],K.prototype,"isError",2),me([p({type:Boolean})],K.prototype,"isStale",2),me([p()],K.prototype,"label",2),K=me([y("wcm-connector-waiting")],K);const ve={manualWallets(){var t,e;const{mobileWallets:r,desktopWallets:i}=ae.state,o=(t=ve.recentWallet())==null?void 0:t.id,n=g.isMobile()?r:i,a=n==null?void 0:n.filter(s=>o!==s.id);return(e=g.isMobile()?a==null?void 0:a.map(({id:s,name:c,links:d})=>({id:s,name:c,mobile:d,links:d})):a==null?void 0:a.map(({id:s,name:c,links:d})=>({id:s,name:c,desktop:d,links:d})))!=null?e:[]},recentWallet(){return h.getRecentWallet()},recomendedWallets(t=!1){var e;const r=t||(e=ve.recentWallet())==null?void 0:e.id,{recomendedWallets:i}=P.state;return i.filter(o=>r!==o.id)}},X={onConnecting(t){h.goToConnectingView(t)},manualWalletsTemplate(){return ve.manualWallets().map(t=>l``)},recomendedWalletsTemplate(t=!1){return ve.recomendedWallets(t).map(e=>l``)},recentWalletTemplate(){const t=ve.recentWallet();if(t)return l``}},qi=C`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var Ki=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let At=class extends w{render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=ae.state,r=t!=="ALL"&&e,i=X.manualWalletsTemplate(),o=X.recomendedWalletsTemplate();let n=[X.recentWalletTemplate(),...i,...o];n=n.filter(Boolean);const a=n.length>4||r;let s=[];a?s=n.slice(0,3):s=n;const c=!!s.length;return l`
${A.MOBILE_ICON}Mobile
${A.SCAN_ICON}Scan with your wallet
${c?l`
${A.DESKTOP_ICON}Desktop
${s} ${a?l``:null}
`:null}`}};At.styles=[v.globalCss,qi],At=Ki([y("wcm-desktop-wallet-selection")],At);const Qi=C`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Yi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let _t=class extends w{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=ae.state;return t??e?l`
By connecting your wallet to this app, you agree to the app's ${t?l`Terms of Service`:null} ${t&&e?"and":null} ${e?l`Privacy Policy`:null}
`:null}};_t.styles=[v.globalCss,Qi],_t=Yi([y("wcm-legal-notice")],_t);const Gi=C`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var Xi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Et=class extends w{onQrcode(){k.push("Qrcode")}render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=ae.state,r=t!=="ALL"&&e,i=X.manualWalletsTemplate(),o=X.recomendedWalletsTemplate();let n=[X.recentWalletTemplate(),...i,...o];n=n.filter(Boolean);const a=n.length>8||r;let s=[];a?s=n.slice(0,7):s=n;const c=!!s.length;return l`${c?l`
${s} ${a?l``:null}
`:null}`}};Et.styles=[v.globalCss,Gi],Et=Xi([y("wcm-mobile-wallet-selection")],Et);const Ji=C`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var en=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,kt=(t,e,r,i)=>{for(var o=i>1?void 0:i?tn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&en(e,r,o),o};let Oe=class extends w{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=Ke.subscribe(t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var t;(t=this.unsubscribeModal)==null||t.call(this)}get overlayEl(){return h.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return h.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(t){if(document.querySelector("body"))if(t){const e=document.getElementById("wcm-styles");e==null||e.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(t){t.target===t.currentTarget&&Ke.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const t=h.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,r=.2;await Promise.all([ne(this.overlayEl,{opacity:[0,1]},{delay:e,duration:r}).finished,ne(this.containerEl,t,{delay:e,duration:r}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const t=h.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([ne(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,ne(this.containerEl,t,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",t=>{var e;t.key==="Escape"?Ke.close():t.key==="Tab"&&((e=t.target)!=null&&e.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;(t=this.abortController)==null||t.abort(),this.abortController=void 0}render(){const t={"wcm-overlay":!0,"wcm-active":this.active};return l`
${this.open?l`
`:null}
`}};Oe.styles=[v.globalCss,Ji],kt([W()],Oe.prototype,"open",2),kt([W()],Oe.prototype,"active",2),Oe=kt([y("wcm-modal")],Oe);const rn=C`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var on=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,Ie=(t,e,r,i)=>{for(var o=i>1?void 0:i?nn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&on(e,r,o),o};let re=class extends w{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){g.isMobile()?k.replace("MobileConnecting"):k.replace("MobileQrcodeConnecting")}onDesktop(){k.replace("DesktopConnecting")}onWeb(){k.replace("WebConnecting")}render(){return l`
${this.isRetry?l``:null} ${this.isMobile?l`Mobile`:null} ${this.isDesktop?l`Desktop`:null} ${this.isWeb?l`Web`:null}
`}};re.styles=[v.globalCss,rn],Ie([p({type:Boolean})],re.prototype,"isMobile",2),Ie([p({type:Boolean})],re.prototype,"isDesktop",2),Ie([p({type:Boolean})],re.prototype,"isWeb",2),Ie([p({type:Boolean})],re.prototype,"isRetry",2),re=Ie([y("wcm-platform-selection")],re);const an=C`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var sn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Ot=class extends w{onClick(){k.push("WalletExplorer")}render(){const{recomendedWallets:t}=P.state,e=ve.manualWallets(),r=[...t,...e].reverse().slice(0,4);return l``}};Ot.styles=[v.globalCss,an],Ot=sn([y("wcm-view-all-wallets-button")],Ot);const ln=C`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,ze=(t,e,r,i)=>{for(var o=i>1?void 0:i?dn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&cn(e,r,o),o};let pe=class extends w{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:t}=H.state;this.uri=t},0)}get overlayEl(){return h.getShadowRootElement(this,".wcm-qr-container")}render(){return l`
${this.uri?l``:l``}
`}};pe.styles=[v.globalCss,ln],ze([p()],pe.prototype,"walletId",2),ze([p()],pe.prototype,"imageId",2),ze([W()],pe.prototype,"uri",2),pe=ze([y("wcm-walletconnect-qr")],pe);var hn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let It=class extends w{viewTemplate(){return g.isAndroid()?l``:g.isMobile()?l``:l``}render(){return l`${this.viewTemplate()}`}};It.styles=[v.globalCss],It=hn([y("wcm-connect-wallet-view")],It);const mn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,wr=(t,e,r,i)=>{for(var o=i>1?void 0:i?un(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&pn(e,r,o),o};let Ve=class extends w{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(t){const{desktop:e,name:r}=g.getWalletRouterData(),i=e==null?void 0:e.native;if(i){const o=g.formatNativeUrl(i,t,r);g.openHref(o,"_self")}}openDesktopApp(){const{walletConnectUri:t}=H.state,e=g.getWalletRouterData();h.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isMobile:i,isWeb:o}=h.getCachedRouterWalletPlatforms();return l`${`Connection can continue loading if ${t} is not installed on your device`}Retry`}};Ve.styles=[v.globalCss,mn],wr([W()],Ve.prototype,"isError",2),Ve=wr([y("wcm-desktop-connecting-view")],Ve);const gn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var wn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Tt=class extends w{onInstall(t){t&&g.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,homepage:i}=g.getWalletRouterData();return l`${`Download ${t} to continue. If multiple browser extensions are installed, disable non ${t} ones and try again`}Download`}};Tt.styles=[v.globalCss,gn],Tt=wn([y("wcm-install-wallet-view")],Tt);const vn=C`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var fn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,vr=(t,e,r,i)=>{for(var o=i>1?void 0:i?bn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&fn(e,r,o),o};let Fe=class extends w{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(t,e=!1){const{mobile:r,name:i}=g.getWalletRouterData(),o=r==null?void 0:r.native,n=r==null?void 0:r.universal;if(o&&!e){const a=g.formatNativeUrl(o,t,i);g.openHref(a,"_self")}else if(n){const a=g.formatUniversalUrl(n,t,i);g.openHref(a,"_self")}}openMobileApp(t=!1){const{walletConnectUri:e}=H.state,r=g.getWalletRouterData();h.setRecentWallet(r),e&&this.onFormatAndRedirect(e,t)}onGoToAppStore(t){t&&g.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,app:i,mobile:o}=g.getWalletRouterData(),{isWeb:n}=h.getCachedRouterWalletPlatforms(),a=i==null?void 0:i.ios,s=o==null?void 0:o.universal;return l`Retry${s?l`Still doesn't work? Try this alternate link`:null}
${`Get ${t}`}
App Store
`}};Fe.styles=[v.globalCss,vn],vr([W()],Fe.prototype,"isError",2),Fe=vr([y("wcm-mobile-connecting-view")],Fe);const yn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var xn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Mt=class extends w{render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isDesktop:i,isWeb:o}=h.getCachedRouterWalletPlatforms();return l`${`Scan this QR Code with your phone's camera or inside ${t} app`}`}};Mt.styles=[v.globalCss,yn],Mt=xn([y("wcm-mobile-qr-connecting-view")],Mt);var $n=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Rt=class extends w{render(){return l``}};Rt.styles=[v.globalCss],Rt=$n([y("wcm-qrcode-view")],Rt);const Cn=C`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var An=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,Te=(t,e,r,i)=>{for(var o=i>1?void 0:i?_n(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&An(e,r,o),o};const St=40;let oe=class extends w{constructor(){super(...arguments),this.loading=!P.state.wallets.listings.length,this.firstFetch=!P.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=h.debounce(t=>{t.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=t,P.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),P.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect()}get placeholderEl(){return h.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=P.state,{listings:r,total:i}=this.search?e:t;return i<=St||r.length>=i}async fetchWallets(){var t;const{wallets:e,search:r}=P.state,{listings:i,total:o,page:n}=this.search?r:e;if(!this.endReached&&(this.firstFetch||o>St&&i.lengthh.getWalletIcon(d));await Promise.all([...c.map(async d=>h.preloadImage(d)),g.wait(300)]),this.endReached=this.isLastPage()}catch(a){console.error(a),Y.openToast(h.getErrorMessage(a),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(t){g.isAndroid()?h.handleMobileLinking(t):h.goToConnectingView(t)}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=P.state,{listings:r}=this.search?e:t,i=this.loading&&!r.length,o=this.search.length>=3;let n=X.manualWalletsTemplate(),a=X.recomendedWalletsTemplate(!0);o&&(n=n.filter(({values:d})=>h.caseSafeIncludes(d[0],this.search)),a=a.filter(({values:d})=>h.caseSafeIncludes(d[0],this.search)));const s=!this.loading&&!r.length&&!a.length,c={"wcm-loading":i,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":s};return l`
${i?null:n} ${i?null:a} ${i?null:r.map(d=>l`${d?l``:null}`)}
${s?l`No results found`:null} ${!s&&this.loading?l``:null}
`}};oe.styles=[v.globalCss,Cn],Te([W()],oe.prototype,"loading",2),Te([W()],oe.prototype,"firstFetch",2),Te([W()],oe.prototype,"search",2),Te([W()],oe.prototype,"endReached",2),oe=Te([y("wcm-wallet-explorer-view")],oe);const En=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var kn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,fr=(t,e,r,i)=>{for(var o=i>1?void 0:i?On(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&kn(e,r,o),o};let qe=class extends w{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(t){const{desktop:e,name:r}=g.getWalletRouterData(),i=e==null?void 0:e.universal;if(i){const o=g.formatUniversalUrl(i,t,r);g.openHref(o,"_blank")}}openWebWallet(){const{walletConnectUri:t}=H.state,e=g.getWalletRouterData();h.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isMobile:i,isDesktop:o}=h.getCachedRouterWalletPlatforms(),n=g.isMobile();return l`${`${t} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};qe.styles=[v.globalCss,En],fr([W()],qe.prototype,"isError",2),qe=fr([y("wcm-web-connecting-view")],qe);export{Oe as WcmModal,F as WcmQrCode}; diff --git a/assets/index-DD2SZmnn.css b/assets/index-DD2SZmnn.css deleted file mode 100644 index a391169..0000000 --- a/assets/index-DD2SZmnn.css +++ /dev/null @@ -1 +0,0 @@ -.topbar[data-v-8299186a]{display:flex;padding:30px 168px 26px;flex-direction:column;justify-content:center;align-items:center;align-self:stretch}.topbar-wrapper[data-v-8299186a]{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.logo-wrapper[data-v-8299186a]{display:flex;justify-content:center;align-items:center;gap:10px;cursor:pointer}.logo-text[data-v-8299186a]{color:#000;font-family:Archivo;font-size:26px;font-style:normal;font-weight:700;line-height:normal}.menu-wrapper[data-v-8299186a]{display:flex;align-items:center;gap:20px}.menu-text[data-v-8299186a]{color:#000;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal;cursor:pointer}.menu-text-active[data-v-8299186a]{text-decoration-line:underline}.wallet-btn[data-v-8299186a]{display:flex;padding:12px 30px;justify-content:center;align-items:center;gap:10px;border-radius:20px;border:2px solid #000;background:#4dc4cf;cursor:pointer}.wallet-text[data-v-8299186a]{color:#000;text-align:right;font-family:Archivo;font-size:14px;font-style:normal;font-weight:700;line-height:normal}.footer[data-v-1574b52b]{display:flex;margin-top:70px;padding:40px 170px 50px;justify-content:space-between;align-items:flex-end;border-top:2px solid #000;background:#fff}.footer-content-wrapper[data-v-1574b52b]{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:20px;flex:1 0 0}.community-wrapper[data-v-1574b52b]{display:flex;align-items:flex-start;gap:12px}.copyright[data-v-1574b52b]{color:#000;font-family:Archivo;font-size:14px;font-style:normal;font-weight:400;line-height:19px;letter-spacing:-.4px}.notebook[data-v-050d2aaf]{position:fixed;top:57%;left:50%;transform:translate(-50%,-50%);z-index:10}.fixed-notebook[data-v-050d2aaf]{width:100%;width:640px}.notebook-screen[data-v-050d2aaf]{position:absolute;top:20px;left:50%;transform:translate(-50%);width:410px;height:272px;padding:30px 46px;flex-direction:column;justify-content:space-between;text-align:center;align-items:center;flex-shrink:0;border-radius:10px;border:2px solid #000;background:#fff;z-index:11}.notebook-screen-wrapper[data-v-050d2aaf]{position:relative;top:50%;left:50%;transform:translate(-50%,-50%)}.notebook-screen img[data-v-050d2aaf]{margin-bottom:20px}.notebook-screen-title-wrapper[data-v-050d2aaf]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px}.notebook-screen-title-text[data-v-050d2aaf]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:30px;font-style:normal;font-weight:800;line-height:normal}.notebook-screen-content-text[data-v-050d2aaf]{color:#000;text-align:center;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:400;line-height:normal}.join-app-btn[data-v-050d2aaf]{display:flex;width:100px;height:20px;padding:10px 20px;align-items:flex-start;gap:12px;flex-shrink:0;border-radius:20px;border:2px solid #000;background:#4dc4cf;cursor:pointer}.join-app-text[data-v-050d2aaf]{color:#000;font-feature-settings:"liga" off,"clig" off;font-family:Archivo;font-size:16px;font-style:normal;font-weight:700;line-height:normal}.fixed-flower[data-v-050d2aaf]{position:fixed;bottom:20%;right:0;width:360px;height:auto;z-index:10}.fixed-pencil[data-v-050d2aaf]{position:fixed;bottom:20%;left:0;width:280px;height:auto;z-index:10}.background-fixed[data-v-050d2aaf]{position:fixed;bottom:0;left:0;width:100%;height:30vh;background-color:#53926d;z-index:0;pointer-events:none;border:2px solid #000} diff --git a/assets/index-DvOqXmJq.js b/assets/index-DvOqXmJq.js new file mode 100644 index 0000000..92488ae --- /dev/null +++ b/assets/index-DvOqXmJq.js @@ -0,0 +1,90 @@ +import{q as St,s as wt,x as vt,y as Ct,O as F,z as pt,A as S,M as tt,E as H,N as I,W as k,S as et,D as bt,R as Et}from"./index-ZXgCnnEa.js";import{G as ne,L as re,H as oe}from"./index-ZXgCnnEa.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 + */const j=globalThis,G=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol(),st=new WeakMap;let ft=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Z)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(G&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=st.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&st.set(e,t))}return t}toString(){return this.cssText}};const xt=n=>new ft(typeof n=="string"?n:n+"",void 0,Z),Ut=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new ft(e,n,Z)},Pt=(n,t)=>{if(G)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=j.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)}},it=G?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return xt(e)})(n):n;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:Tt,defineProperty:Ot,getOwnPropertyDescriptor:Nt,getOwnPropertyNames:Rt,getOwnPropertySymbols:Mt,getPrototypeOf:Ht}=Object,_=globalThis,nt=_.trustedTypes,It=nt?nt.emptyScript:"",B=_.reactiveElementPolyfillSupport,U=(n,t)=>n,W={toAttribute(n,t){switch(t){case Boolean:n=n?It:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},J=(n,t)=>!Tt(n,t),rt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:J};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=rt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ot(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=Nt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const c=i==null?void 0:i.call(this);r.call(this,o),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??rt}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=Ht(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const e=this.properties,s=[...Rt(e),...Mt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(it(i))}else t!==void 0&&e.push(it(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var r;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:W).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var r;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)==null?void 0:r.fromAttribute)!==void 0?o.converter:W;this._$Em=i,this[i]=c.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??J)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,o]of this._$Ep)this[r]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,o]of i)o.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[U("elementProperties")]=new Map,w[U("finalized")]=new Map,B==null||B({ReactiveElement:w}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.4");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const P=globalThis,z=P.trustedTypes,ot=z?z.createPolicy("lit-html",{createHTML:n=>n}):void 0,gt="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+$,kt=`<${$t}>`,y=document,T=()=>y.createComment(""),O=n=>n===null||typeof n!="object"&&typeof n!="function",Q=Array.isArray,jt=n=>Q(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",V=`[ +\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,ct=/>/g,m=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),lt=/'/g,ht=/"/g,_t=/^(?:script|style|textarea|title)$/i,Wt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),mt=Wt(1),C=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),dt=new WeakMap,A=y.createTreeWalker(y,129);function At(n,t){if(!Q(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ot!==void 0?ot.createHTML(t):t}const zt=(n,t)=>{const e=n.length-1,s=[];let i,r=t===2?"":t===3?"":"",o=x;for(let c=0;c"?(o=i??x,l=-1):u[1]===void 0?l=-2:(l=o.lastIndex-u[2].length,h=u[1],o=u[3]===void 0?m:u[3]==='"'?ht:lt):o===ht||o===lt?o=m:o===at||o===ct?o=x:(o=m,i=void 0);const g=o===m&&n[c+1].startsWith("/>")?" ":"";r+=o===x?a+kt:l>=0?(s.push(h),a.slice(0,l)+gt+a.slice(l)+$+g):a+$+(l===-2?c:g)}return[At(n,r+(n[e]||"")+(t===2?"":t===3?"":"")),s]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const c=t.length-1,a=this.parts,[h,u]=zt(t,e);if(this.el=N.createElement(h,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=A.nextNode())!==null&&a.length0){i.textContent=z?z.emptyScript:"";for(let g=0;g2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(r===void 0)t=b(this,t,e,0),o=!O(t)||t!==this._$AH&&t!==C,o&&(this._$AH=t);else{const c=t;let a,h;for(t=r[0],a=0;a{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new R(t.insertBefore(T(),r),r,void 0,e??{})}return i._$AI(n),i};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class v extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Kt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return C}}var ut;v._$litElement$=!0,v.finalized=!0,(ut=globalThis.litElementHydrateSupport)==null||ut.call(globalThis,{LitElement:v});const K=globalThis.litElementPolyfillSupport;K==null||K({LitElement:v});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");const Yt=Ut` + :host { + display: flex; + justify-content: center; + gap: var(--wui-spacing-2xl); + } + + wui-visual-thumbnail:nth-child(1) { + z-index: 1; + } +`;var Ft=function(n,t,e,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,t,e,s);else for(var c=n.length-1;c>=0;c--)(o=n[c])&&(r=(i<3?o(r):i>3?o(t,e,r):o(t,e))||r);return i>3&&r&&Object.defineProperty(t,e,r),r};let Y=class extends v{constructor(){var t,e;super(...arguments),this.dappImageUrl=(t=F.state.metadata)==null?void 0:t.icons,this.walletImageUrl=(e=S.state.connectedWalletInfo)==null?void 0:e.icon}firstUpdated(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelectorAll("wui-visual-thumbnail");t!=null&&t[0]&&this.createAnimation(t[0],"translate(18px)"),t!=null&&t[1]&&this.createAnimation(t[1],"translate(-18px)")}render(){var t;return mt` + + + `}createAnimation(t,e){t.animate([{transform:"translateX(0px)"},{transform:e}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};Y.styles=Yt;Y=Ft([pt("w3m-connecting-siwe")],Y);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Gt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:J},Zt=(n=Gt,t,e)=>{const{kind:s,metadata:i}=e;let r=globalThis.litPropertyMetadata.get(i);if(r===void 0&&globalThis.litPropertyMetadata.set(i,r=new Map),r.set(e.name,n),s==="accessor"){const{name:o}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,n)},init(c){return c!==void 0&&this.P(o,void 0,n),c}}}if(s==="setter"){const{name:o}=e;return function(c){const a=this[o];t.call(this,c),this.requestUpdate(o,a,n)}}throw Error("Unsupported decorator location: "+s)};function Jt(n){return(t,e)=>typeof e=="object"?Zt(n,t,e):((s,i,r)=>{const o=i.hasOwnProperty(r);return i.constructor.createProperty(r,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,r):void 0})(n,t,e)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function yt(n){return Jt({...n,state:!0,attribute:!1})}var X=function(n,t,e,s){var i=arguments.length,r=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,t,e,s);else for(var c=n.length-1;c>=0;c--)(o=n[c])&&(r=(i<3?o(r):i>3?o(t,e,r):o(t,e))||r);return i>3&&r&&Object.defineProperty(t,e,r),r};let L=class extends v{constructor(){var t;super(...arguments),this.dappName=(t=F.state.metadata)==null?void 0:t.name,this.isSigning=!1,this.isCancelling=!1}render(){return this.onRender(),mt` + + + + + ${this.dappName??"Dapp"} needs to connect to your wallet + + + Sign this message to prove you own this wallet and proceed. Canceling will disconnect + you. + + + + Cancel + + + ${this.isSigning?"Signing...":"Sign"} + + + `}onRender(){E.state.session&&tt.close()}async onSign(){var t,e,s;this.isSigning=!0,H.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track",properties:{network:((t=I.state.caipNetwork)==null?void 0:t.id)||"",isSmartAccount:S.state.preferredAccountType===k.ACCOUNT_TYPES.SMART_ACCOUNT}});try{E.setStatus("loading");const i=await E.signIn();return E.setStatus("success"),H.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track",properties:{network:((e=I.state.caipNetwork)==null?void 0:e.id)||"",isSmartAccount:S.state.preferredAccountType===k.ACCOUNT_TYPES.SMART_ACCOUNT}}),i}catch{const o=S.state.preferredAccountType===k.ACCOUNT_TYPES.SMART_ACCOUNT;return o?et.showError("This application might not support Smart Accounts"):et.showError("Signature declined"),E.setStatus("error"),H.sendEvent({event:"SIWE_AUTH_ERROR",type:"track",properties:{network:((s=I.state.caipNetwork)==null?void 0:s.id)||"",isSmartAccount:o}})}finally{this.isSigning=!1}}async onCancel(){var e;this.isCancelling=!0,S.state.isConnected?(await bt.disconnect(),tt.close()):Et.push("Connect"),this.isCancelling=!1,H.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track",properties:{network:((e=I.state.caipNetwork)==null?void 0:e.id)||"",isSmartAccount:S.state.preferredAccountType===k.ACCOUNT_TYPES.SMART_ACCOUNT}})}};X([yt()],L.prototype,"isSigning",void 0);X([yt()],L.prototype,"isCancelling",void 0);L=X([pt("w3m-connecting-siwe-view")],L);export{E as SIWEController,Y as W3mConnectingSiwe,L as W3mConnectingSiweView,ne as formatMessage,re as getDidAddress,oe as getDidChainId}; diff --git a/assets/index-ZXgCnnEa.js b/assets/index-ZXgCnnEa.js new file mode 100644 index 0000000..fc886a8 --- /dev/null +++ b/assets/index-ZXgCnnEa.js @@ -0,0 +1,11006 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChallengeView-Cm0XRX0k.js","assets/gameView-BAOQfz90.js","assets/ChallengeView-CzpuoxQi.css","assets/LeaderboardView-_cCvA8LS.js","assets/LeaderboardView-CkHSfi_X.css","assets/PortfolioView-uYShAl-d.js","assets/PortfolioView-BdxIyyLf.css"])))=>i.map(i=>d[i]); +var iee=Object.defineProperty;var aN=r=>{throw TypeError(r)};var see=(r,e,t)=>e in r?iee(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Oe=(r,e,t)=>see(r,typeof e!="symbol"?e+"":e,t),WA=(r,e,t)=>e.has(r)||aN("Cannot "+t);var ee=(r,e,t)=>(WA(r,e,"read from private field"),t?t.call(r):e.get(r)),Le=(r,e,t)=>e.has(r)?aN("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),de=(r,e,t,n)=>(WA(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),rt=(r,e,t)=>(WA(r,e,"access private method"),t);var O2=(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 +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function DS(r,e){const t=new Set(r.split(","));return n=>t.has(n)}const Sn={},jg=[],du=()=>{},oee=()=>!1,W8=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),$S=r=>r.startsWith("onUpdate:"),hs=Object.assign,BS=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},aee=Object.prototype.hasOwnProperty,gn=(r,e)=>aee.call(r,e),cr=Array.isArray,Hg=r=>z8(r)==="[object Map]",vL=r=>z8(r)==="[object Set]",vr=r=>typeof r=="function",Si=r=>typeof r=="string",Yf=r=>typeof r=="symbol",zn=r=>r!==null&&typeof r=="object",yL=r=>(zn(r)||vr(r))&&vr(r.then)&&vr(r.catch),bL=Object.prototype.toString,z8=r=>bL.call(r),cee=r=>z8(r).slice(8,-1),_L=r=>z8(r)==="[object Object]",LS=r=>Si(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,m3=DS(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),V8=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},lee=/-(\w)/g,ll=V8(r=>r.replace(lee,(e,t)=>t?t.toUpperCase():"")),uee=/\B([A-Z])/g,p1=V8(r=>r.replace(uee,"-$1").toLowerCase()),q8=V8(r=>r.charAt(0).toUpperCase()+r.slice(1)),zA=V8(r=>r?`on${q8(r)}`:""),Bf=(r,e)=>!Object.is(r,e),y4=(r,...e)=>{for(let t=0;t{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,writable:n,value:t})},c9=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let cN;const AL=()=>cN||(cN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function US(r){if(cr(r)){const e={};for(let t=0;t{if(t){const n=t.split(dee);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Wg(r){let e="";if(Si(r))e=r;else if(cr(r))for(let t=0;t!!(r&&r.__v_isRef===!0),SL=r=>Si(r)?r:r==null?"":cr(r)||zn(r)&&(r.toString===bL||!vr(r.toString))?CL(r)?SL(r.value):JSON.stringify(r,IL,2):String(r),IL=(r,e)=>CL(e)?IL(r,e.value):Hg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i],s)=>(t[VA(n,s)+" =>"]=i,t),{})}:vL(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>VA(t))}:Yf(e)?VA(e):zn(e)&&!cr(e)&&!_L(e)?String(e):e,VA=(r,e="")=>{var t;return Yf(r)?`Symbol(${(t=r.description)!=null?t:e})`:r};/** +* @vue/reactivity v3.5.3 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let sa;class wee{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=sa,!e&&sa&&(this.index=(sa.scopes||(sa.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0)return;let r;for(;w3;){let e=w3;for(w3=void 0;e;){const t=e.nextEffect;if(e.nextEffect=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){r||(r=n)}e=t}}if(r)throw r}function kL(r){for(let e=r.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function NL(r){let e,t=r.depsTail;for(let n=t;n;n=n.prevDep)n.version===-1?(n===t&&(t=n.prevDep),HS(n),yee(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0;r.deps=e,r.depsTail=t}function l9(r){for(let e=r.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&PL(e.dep.computed)===!1||e.dep.version!==e.version)return!0;return!!r._dirty}function PL(r){if(r.flags&2)return!1;if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===W3))return;r.globalVersion=W3;const e=r.dep;if(r.flags|=2,e.version>0&&!r.isSSR&&!l9(r)){r.flags&=-3;return}const t=Cn,n=il;Cn=r,il=!0;try{kL(r);const i=r.fn(r._value);(e.version===0||Bf(i,r._value))&&(r._value=i,e.version++)}catch(i){throw e.version++,i}finally{Cn=t,il=n,NL(r),r.flags&=-3}}function HS(r){const{dep:e,prevSub:t,nextSub:n}=r;if(t&&(t.nextSub=n,r.prevSub=void 0),n&&(n.prevSub=t,r.nextSub=void 0),e.subs===r&&(e.subs=t),!e.subs&&e.computed){e.computed.flags&=-5;for(let i=e.computed.deps;i;i=i.nextDep)HS(i)}}function yee(r){const{prevDep:e,nextDep:t}=r;e&&(e.nextDep=t,r.prevDep=void 0),t&&(t.prevDep=e,r.nextDep=void 0)}let il=!0;const OL=[];function Qf(){OL.push(il),il=!1}function Jf(){const r=OL.pop();il=r===void 0?!0:r}function lN(r){const{cleanup:e}=r;if(r.cleanup=void 0,e){const t=Cn;Cn=void 0;try{e()}finally{Cn=t}}}let W3=0;class WS{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!Cn||!il||Cn===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Cn)t=this.activeLink={dep:this,sub:Cn,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},Cn.deps?(t.prevDep=Cn.depsTail,Cn.depsTail.nextDep=t,Cn.depsTail=t):Cn.deps=Cn.depsTail=t,Cn.flags&4&&ML(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const n=t.nextDep;n.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=n),t.prevDep=Cn.depsTail,t.nextDep=void 0,Cn.depsTail.nextDep=t,Cn.depsTail=t,Cn.deps===t&&(Cn.deps=n)}return t}trigger(e){this.version++,W3++,this.notify(e)}notify(e){FS();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()}finally{jS()}}}function ML(r){const e=r.dep.computed;if(e&&!r.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)ML(n)}const t=r.dep.subs;t!==r&&(r.prevSub=t,t&&(t.nextSub=r)),r.dep.subs=r}const u9=new WeakMap,Cp=Symbol(""),h9=Symbol(""),z3=Symbol("");function Os(r,e,t){if(il&&Cn){let n=u9.get(r);n||u9.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=new WS),i.track()}}function Xh(r,e,t,n,i,s){const o=u9.get(r);if(!o){W3++;return}let a=[];if(e==="clear")a=[...o.values()];else{const c=cr(r),l=c&&LS(t);if(c&&t==="length"){const h=Number(n);o.forEach((f,v)=>{(v==="length"||v===z3||!Yf(v)&&v>=h)&&a.push(f)})}else{const h=f=>f&&a.push(f);switch(t!==void 0&&h(o.get(t)),l&&h(o.get(z3)),e){case"add":c?l&&h(o.get("length")):(h(o.get(Cp)),Hg(r)&&h(o.get(h9)));break;case"delete":c||(h(o.get(Cp)),Hg(r)&&h(o.get(h9)));break;case"set":Hg(r)&&h(o.get(Cp));break}}}FS();for(const c of a)c.trigger();jS()}function ng(r){const e=un(r);return e===r?e:(Os(e,"iterate",z3),sl(r)?e:e.map(Is))}function K8(r){return Os(r=un(r),"iterate",z3),r}const bee={__proto__:null,[Symbol.iterator](){return KA(this,Symbol.iterator,Is)},concat(...r){return ng(this).concat(...r.map(e=>cr(e)?ng(e):e))},entries(){return KA(this,"entries",r=>(r[1]=Is(r[1]),r))},every(r,e){return dh(this,"every",r,e,void 0,arguments)},filter(r,e){return dh(this,"filter",r,e,t=>t.map(Is),arguments)},find(r,e){return dh(this,"find",r,e,Is,arguments)},findIndex(r,e){return dh(this,"findIndex",r,e,void 0,arguments)},findLast(r,e){return dh(this,"findLast",r,e,Is,arguments)},findLastIndex(r,e){return dh(this,"findLastIndex",r,e,void 0,arguments)},forEach(r,e){return dh(this,"forEach",r,e,void 0,arguments)},includes(...r){return GA(this,"includes",r)},indexOf(...r){return GA(this,"indexOf",r)},join(r){return ng(this).join(r)},lastIndexOf(...r){return GA(this,"lastIndexOf",r)},map(r,e){return dh(this,"map",r,e,void 0,arguments)},pop(){return M2(this,"pop")},push(...r){return M2(this,"push",r)},reduce(r,...e){return uN(this,"reduce",r,e)},reduceRight(r,...e){return uN(this,"reduceRight",r,e)},shift(){return M2(this,"shift")},some(r,e){return dh(this,"some",r,e,void 0,arguments)},splice(...r){return M2(this,"splice",r)},toReversed(){return ng(this).toReversed()},toSorted(r){return ng(this).toSorted(r)},toSpliced(...r){return ng(this).toSpliced(...r)},unshift(...r){return M2(this,"unshift",r)},values(){return KA(this,"values",Is)}};function KA(r,e,t){const n=K8(r),i=n[e]();return n!==r&&!sl(r)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=t(s.value)),s}),i}const _ee=Array.prototype;function dh(r,e,t,n,i,s){const o=K8(r),a=o!==r&&!sl(r),c=o[e];if(c!==_ee[e]){const f=c.apply(r,s);return a?Is(f):f}let l=t;o!==r&&(a?l=function(f,v){return t.call(this,Is(f),v,r)}:t.length>2&&(l=function(f,v){return t.call(this,f,v,r)}));const h=c.call(o,l,n);return a&&i?i(h):h}function uN(r,e,t,n){const i=K8(r);let s=t;return i!==r&&(sl(r)?t.length>3&&(s=function(o,a,c){return t.call(this,o,a,c,r)}):s=function(o,a,c){return t.call(this,o,Is(a),c,r)}),i[e](s,...n)}function GA(r,e,t){const n=un(r);Os(n,"iterate",z3);const i=n[e](...t);return(i===-1||i===!1)&&KS(t[0])?(t[0]=un(t[0]),n[e](...t)):i}function M2(r,e,t=[]){Qf(),FS();const n=un(r)[e].apply(r,t);return jS(),Jf(),n}const xee=DS("__proto__,__v_isRef,__isVue"),DL=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(Yf));function Aee(r){Yf(r)||(r=String(r));const e=un(this);return Os(e,"has",r),e.hasOwnProperty(r)}class $L{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const i=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!i;if(t==="__v_isReadonly")return i;if(t==="__v_isShallow")return s;if(t==="__v_raw")return n===(i?s?$ee:FL:s?UL:LL).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=cr(e);if(!i){let c;if(o&&(c=bee[t]))return c;if(t==="hasOwnProperty")return Aee}const a=Reflect.get(e,t,Ns(e)?e:n);return(Yf(t)?DL.has(t):xee(t))||(i||Os(e,"get",t),s)?a:Ns(a)?o&&LS(t)?a:a.value:zn(a)?i?HL(a):yy(a):a}}class BL extends $L{constructor(e=!1){super(!1,e)}set(e,t,n,i){let s=e[t];if(!this._isShallow){const c=Pp(s);if(!sl(n)&&!Pp(n)&&(s=un(s),n=un(n)),!cr(e)&&Ns(s)&&!Ns(n))return c?!1:(s.value=n,!0)}const o=cr(e)&&LS(t)?Number(t)r,G8=r=>Reflect.getPrototypeOf(r);function S5(r,e,t=!1,n=!1){r=r.__v_raw;const i=un(r),s=un(e);t||(Bf(e,s)&&Os(i,"get",e),Os(i,"get",s));const{has:o}=G8(i),a=n?zS:t?GS:Is;if(o.call(i,e))return a(r.get(e));if(o.call(i,s))return a(r.get(s));r!==i&&r.get(e)}function I5(r,e=!1){const t=this.__v_raw,n=un(t),i=un(r);return e||(Bf(r,i)&&Os(n,"has",r),Os(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function T5(r,e=!1){return r=r.__v_raw,!e&&Os(un(r),"iterate",Cp),Reflect.get(r,"size",r)}function hN(r,e=!1){!e&&!sl(r)&&!Pp(r)&&(r=un(r));const t=un(this);return G8(t).has.call(t,r)||(t.add(r),Xh(t,"add",r,r)),this}function dN(r,e,t=!1){!t&&!sl(e)&&!Pp(e)&&(e=un(e));const n=un(this),{has:i,get:s}=G8(n);let o=i.call(n,r);o||(r=un(r),o=i.call(n,r));const a=s.call(n,r);return n.set(r,e),o?Bf(e,a)&&Xh(n,"set",r,e):Xh(n,"add",r,e),this}function fN(r){const e=un(this),{has:t,get:n}=G8(e);let i=t.call(e,r);i||(r=un(r),i=t.call(e,r)),n&&n.call(e,r);const s=e.delete(r);return i&&Xh(e,"delete",r,void 0),s}function pN(){const r=un(this),e=r.size!==0,t=r.clear();return e&&Xh(r,"clear",void 0,void 0),t}function R5(r,e){return function(n,i){const s=this,o=s.__v_raw,a=un(o),c=e?zS:r?GS:Is;return!r&&Os(a,"iterate",Cp),o.forEach((l,h)=>n.call(i,c(l),c(h),s))}}function k5(r,e,t){return function(...n){const i=this.__v_raw,s=un(i),o=Hg(s),a=r==="entries"||r===Symbol.iterator&&o,c=r==="keys"&&o,l=i[r](...n),h=t?zS:e?GS:Is;return!e&&Os(s,"iterate",c?h9:Cp),{next(){const{value:f,done:v}=l.next();return v?{value:f,done:v}:{value:a?[h(f[0]),h(f[1])]:h(f),done:v}},[Symbol.iterator](){return this}}}}function $d(r){return function(...e){return r==="delete"?!1:r==="clear"?void 0:this}}function Tee(){const r={get(s){return S5(this,s)},get size(){return T5(this)},has:I5,add:hN,set:dN,delete:fN,clear:pN,forEach:R5(!1,!1)},e={get(s){return S5(this,s,!1,!0)},get size(){return T5(this)},has:I5,add(s){return hN.call(this,s,!0)},set(s,o){return dN.call(this,s,o,!0)},delete:fN,clear:pN,forEach:R5(!1,!0)},t={get(s){return S5(this,s,!0)},get size(){return T5(this,!0)},has(s){return I5.call(this,s,!0)},add:$d("add"),set:$d("set"),delete:$d("delete"),clear:$d("clear"),forEach:R5(!0,!1)},n={get(s){return S5(this,s,!0,!0)},get size(){return T5(this,!0)},has(s){return I5.call(this,s,!0)},add:$d("add"),set:$d("set"),delete:$d("delete"),clear:$d("clear"),forEach:R5(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=k5(s,!1,!1),t[s]=k5(s,!0,!1),e[s]=k5(s,!1,!0),n[s]=k5(s,!0,!0)}),[r,t,e,n]}const[Ree,kee,Nee,Pee]=Tee();function VS(r,e){const t=e?r?Pee:Nee:r?kee:Ree;return(n,i,s)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get(gn(t,i)&&i in n?t:n,i,s)}const Oee={get:VS(!1,!1)},Mee={get:VS(!1,!0)},Dee={get:VS(!0,!1)};const LL=new WeakMap,UL=new WeakMap,FL=new WeakMap,$ee=new WeakMap;function Bee(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Lee(r){return r.__v_skip||!Object.isExtensible(r)?0:Bee(cee(r))}function yy(r){return Pp(r)?r:qS(r,!1,Cee,Oee,LL)}function jL(r){return qS(r,!1,Iee,Mee,UL)}function HL(r){return qS(r,!0,See,Dee,FL)}function qS(r,e,t,n,i){if(!zn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const s=i.get(r);if(s)return s;const o=Lee(r);if(o===0)return r;const a=new Proxy(r,o===2?n:t);return i.set(r,a),a}function zg(r){return Pp(r)?zg(r.__v_raw):!!(r&&r.__v_isReactive)}function Pp(r){return!!(r&&r.__v_isReadonly)}function sl(r){return!!(r&&r.__v_isShallow)}function KS(r){return r?!!r.__v_raw:!1}function un(r){const e=r&&r.__v_raw;return e?un(e):r}function Uee(r){return Object.isExtensible(r)&&xL(r,"__v_skip",!0),r}const Is=r=>zn(r)?yy(r):r,GS=r=>zn(r)?HL(r):r;function Ns(r){return r?r.__v_isRef===!0:!1}function Tf(r){return WL(r,!1)}function Fee(r){return WL(r,!0)}function WL(r,e){return Ns(r)?r:new jee(r,e)}class jee{constructor(e,t){this.dep=new WS,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:un(e),this._value=t?e:Is(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||sl(e)||Pp(e);e=n?e:un(e),Bf(e,t)&&(this._rawValue=e,this._value=n?e:Is(e),this.dep.trigger())}}function Oo(r){return Ns(r)?r.value:r}const Hee={get:(r,e,t)=>e==="__v_raw"?r:Oo(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Ns(i)&&!Ns(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function zL(r){return zg(r)?r:new Proxy(r,Hee)}class Wee{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new WS(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=W3-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){Cn!==this&&(this.flags|=16,this.dep.notify())}get value(){const e=this.dep.track();return PL(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function zee(r,e,t=!1){let n,i;return vr(r)?n=r:(n=r.get,i=r.set),new Wee(n,i,t)}const N5={},t6=new WeakMap;let $0;function Vee(r,e=!1,t=$0){if(t){let n=t6.get(t);n||t6.set(t,n=[]),n.push(r)}}function qee(r,e,t=Sn){const{immediate:n,deep:i,once:s,scheduler:o,augmentJob:a,call:c}=t,l=F=>i?F:sl(F)||i===!1||i===0?zh(F,1):zh(F);let h,f,v,y,A=!1,M=!1;if(Ns(r)?(f=()=>r.value,A=sl(r)):zg(r)?(f=()=>l(r),A=!0):cr(r)?(M=!0,A=r.some(F=>zg(F)||sl(F)),f=()=>r.map(F=>{if(Ns(F))return F.value;if(zg(F))return l(F);if(vr(F))return c?c(F,2):F()})):vr(r)?e?f=c?()=>c(r,2):r:f=()=>{if(v){Qf();try{v()}finally{Jf()}}const F=$0;$0=h;try{return c?c(r,3,[y]):r(y)}finally{$0=F}}:f=du,e&&i){const F=f,q=i===!0?1/0:i;f=()=>zh(F(),q)}const $=vee(),L=()=>{h.stop(),$&&BS($.effects,h)};if(s)if(e){const F=e;e=(...q)=>{F(...q),L()}}else{const F=f;f=()=>{F(),L()}}let P=M?new Array(r.length).fill(N5):N5;const H=F=>{if(!(!(h.flags&1)||!h.dirty&&!F))if(e){const q=h.run();if(i||A||(M?q.some((Y,I)=>Bf(Y,P[I])):Bf(q,P))){v&&v();const Y=$0;$0=h;try{const I=[q,P===N5?void 0:M&&P[0]===N5?[]:P,y];c?c(e,3,I):e(...I),P=q}finally{$0=Y}}}else h.run()};return a&&a(H),h=new TL(f),h.scheduler=o?()=>o(H,!1):H,y=F=>Vee(F,!1,h),v=h.onStop=()=>{const F=t6.get(h);if(F){if(c)c(F,4);else for(const q of F)q();t6.delete(h)}},e?n?H(!0):P=h.run():o?o(H.bind(null,!0),!0):h.run(),L.pause=h.pause.bind(h),L.resume=h.resume.bind(h),L.stop=L,L}function zh(r,e=1/0,t){if(e<=0||!zn(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),e--,Ns(r))zh(r.value,e,t);else if(cr(r))for(let n=0;n{zh(n,e,t)});else if(_L(r)){for(const n in r)zh(r[n],e,t);for(const n of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,n)&&zh(r[n],e,t)}return r}/** +* @vue/runtime-core v3.5.3 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function by(r,e,t,n){try{return n?r(...n):r()}catch(i){Z8(i,e,t)}}function Tu(r,e,t,n){if(vr(r)){const i=by(r,e,t,n);return i&&yL(i)&&i.catch(s=>{Z8(s,e,t)}),i}if(cr(r)){const i=[];for(let s=0;s>>1,i=Zs[n],s=q3(i);s=q3(t)?Zs.push(r):Zs.splice(Gee(e),0,r),r.flags|=1,KL()}}function KL(){!V3&&!d9&&(d9=!0,ZS=VL.then(ZL))}function Zee(r){cr(r)?Vg.push(...r):qd&&r.id===-1?qd.splice(vg+1,0,r):r.flags&1||(Vg.push(r),r.flags|=1),KL()}function gN(r,e,t=V3?Ll+1:0){for(;tq3(t)-q3(n));if(Vg.length=0,qd){qd.push(...e);return}for(qd=e,vg=0;vgr.id==null?r.flags&2?-1:1/0:r.id;function ZL(r){d9=!1,V3=!0;try{for(Ll=0;Ll{n._d&&EN(-1);const s=r6(e);let o;try{o=r(...i)}finally{r6(s),n._d&&EN(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function DRe(r,e){if(la===null)return r;const t=e_(la),n=r.dirs||(r.dirs=[]);for(let i=0;ir.__isTeleport;function QS(r,e){r.shapeFlag&6&&r.component?(r.transition=e,QS(r.component.subTree,e)):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}/*! #__NO_SIDE_EFFECTS__ */function QL(r,e){return vr(r)?hs({name:r.name},e,{setup:r}):r}function JL(r){r.ids=[r.ids[0]+r.ids[2]+++"-",0,0]}function f9(r,e,t,n,i=!1){if(cr(r)){r.forEach((A,M)=>f9(A,e&&(cr(e)?e[M]:e),t,n,i));return}if(v3(n)&&!i)return;const s=n.shapeFlag&4?e_(n.component):n.el,o=i?null:s,{i:a,r:c}=r,l=e&&e.r,h=a.refs===Sn?a.refs={}:a.refs,f=a.setupState,v=un(f),y=f===Sn?()=>!1:A=>gn(v,A);if(l!=null&&l!==c&&(Si(l)?(h[l]=null,y(l)&&(f[l]=null)):Ns(l)&&(l.value=null)),vr(c))by(c,a,12,[o,h]);else{const A=Si(c),M=Ns(c);if(A||M){const $=()=>{if(r.f){const L=A?y(c)?f[c]:h[c]:c.value;i?cr(L)&&BS(L,s):cr(L)?L.includes(s)||L.push(s):A?(h[c]=[s],y(c)&&(f[c]=h[c])):(c.value=[s],r.k&&(h[r.k]=c.value))}else A?(h[c]=o,y(c)&&(f[c]=o)):M&&(c.value=o,r.k&&(h[r.k]=o))};o?($.id=-1,Xo($,t)):$()}}}const v3=r=>!!r.type.__asyncLoader,XL=r=>r.type.__isKeepAlive;function Xee(r,e){eU(r,"a",e)}function ete(r,e){eU(r,"da",e)}function eU(r,e,t=Rs){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(Y8(e,n,t),t){let i=t.parent;for(;i&&i.parent;)XL(i.parent.vnode)&&tte(n,e,t,i),i=i.parent}}function tte(r,e,t,n){const i=Y8(e,r,n,!0);_y(()=>{BS(n[e],i)},t)}function Y8(r,e,t=Rs,n=!1){if(t){const i=t[r]||(t[r]=[]),s=e.__weh||(e.__weh=(...o)=>{Qf();const a=xy(t),c=Tu(e,t,r,o);return a(),Jf(),c});return n?i.unshift(s):i.push(s),s}}const _d=r=>(e,t=Rs)=>{(!X8||r==="sp")&&Y8(r,(...n)=>e(...n),t)},rte=_d("bm"),nte=_d("m"),ite=_d("bu"),ste=_d("u"),ote=_d("bum"),_y=_d("um"),ate=_d("sp"),cte=_d("rtg"),lte=_d("rtc");function ute(r,e=Rs){Y8("ec",r,e)}const hte="components";function dte(r,e){return pte(hte,r,!0,e)||r}const fte=Symbol.for("v-ndc");function pte(r,e,t=!0,n=!1){const i=la||Rs;if(i){const s=i.type;{const a=tre(s,!1);if(a&&(a===e||a===ll(e)||a===q8(ll(e))))return s}const o=mN(i[r]||s[r],e)||mN(i.appContext[r],e);return!o&&n?s:o}}function mN(r,e){return r&&(r[e]||r[ll(e)]||r[q8(ll(e))])}function $Re(r,e,t,n){let i;const s=t,o=cr(r);if(o||Si(r)){const a=o&&zg(r);a&&(r=K8(r)),i=new Array(r.length);for(let c=0,l=r.length;ce(a,c,void 0,s));else{const a=Object.keys(r);i=new Array(a.length);for(let c=0,l=a.length;cr?bU(r)?e_(r):p9(r.parent):null,y3=hs(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>p9(r.parent),$root:r=>p9(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>JS(r),$forceUpdate:r=>r.f||(r.f=()=>{YS(r.update)}),$nextTick:r=>r.n||(r.n=qL.bind(r.proxy)),$watch:r=>Dte.bind(r)}),ZA=(r,e)=>r!==Sn&&!r.__isScriptSetup&&gn(r,e),gte={get({_:r},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:n,data:i,props:s,accessCache:o,type:a,appContext:c}=r;let l;if(e[0]!=="$"){const y=o[e];if(y!==void 0)switch(y){case 1:return n[e];case 2:return i[e];case 4:return t[e];case 3:return s[e]}else{if(ZA(n,e))return o[e]=1,n[e];if(i!==Sn&&gn(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&gn(l,e))return o[e]=3,s[e];if(t!==Sn&&gn(t,e))return o[e]=4,t[e];g9&&(o[e]=0)}}const h=y3[e];let f,v;if(h)return e==="$attrs"&&Os(r.attrs,"get",""),h(r);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==Sn&&gn(t,e))return o[e]=4,t[e];if(v=c.config.globalProperties,gn(v,e))return v[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:s}=r;return ZA(i,e)?(i[e]=t,!0):n!==Sn&&gn(n,e)?(n[e]=t,!0):gn(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(s[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:n,appContext:i,propsOptions:s}},o){let a;return!!t[o]||r!==Sn&&gn(r,o)||ZA(e,o)||(a=s[0])&&gn(a,o)||gn(n,o)||gn(y3,o)||gn(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:gn(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};function wN(r){return cr(r)?r.reduce((e,t)=>(e[t]=null,e),{}):r}let g9=!0;function mte(r){const e=JS(r),t=r.proxy,n=r.ctx;g9=!1,e.beforeCreate&&vN(e.beforeCreate,r,"bc");const{data:i,computed:s,methods:o,watch:a,provide:c,inject:l,created:h,beforeMount:f,mounted:v,beforeUpdate:y,updated:A,activated:M,deactivated:$,beforeDestroy:L,beforeUnmount:P,destroyed:H,unmounted:F,render:q,renderTracked:Y,renderTriggered:I,errorCaptured:T,serverPrefetch:V,expose:Q,inheritAttrs:te,components:oe,directives:d,filters:g}=e;if(l&&wte(l,n,null),o)for(const E in o){const C=o[E];vr(C)&&(n[E]=C.bind(t))}if(i){const E=i.call(t,t);zn(E)&&(r.data=yy(E))}if(g9=!0,s)for(const E in s){const C=s[E],B=vr(C)?C.bind(t,t):vr(C.get)?C.get.bind(t,t):du,R=!vr(C)&&vr(C.set)?C.set.bind(t):du,w=Jc({get:B,set:R});Object.defineProperty(n,E,{enumerable:!0,configurable:!0,get:()=>w.value,set:O=>w.value=O})}if(a)for(const E in a)tU(a[E],n,t,E);if(c){const E=vr(c)?c.call(t):c;Reflect.ownKeys(E).forEach(C=>{b4(C,E[C])})}h&&vN(h,r,"c");function b(E,C){cr(C)?C.forEach(B=>E(B.bind(t))):C&&E(C.bind(t))}if(b(rte,f),b(nte,v),b(ite,y),b(ste,A),b(Xee,M),b(ete,$),b(ute,T),b(lte,Y),b(cte,I),b(ote,P),b(_y,F),b(ate,V),cr(Q))if(Q.length){const E=r.exposed||(r.exposed={});Q.forEach(C=>{Object.defineProperty(E,C,{get:()=>t[C],set:B=>t[C]=B})})}else r.exposed||(r.exposed={});q&&r.render===du&&(r.render=q),te!=null&&(r.inheritAttrs=te),oe&&(r.components=oe),d&&(r.directives=d),V&&JL(r)}function wte(r,e,t=du){cr(r)&&(r=m9(r));for(const n in r){const i=r[n];let s;zn(i)?"default"in i?s=ol(i.from||n,i.default,!0):s=ol(i.from||n):s=ol(i),Ns(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[n]=s}}function vN(r,e,t){Tu(cr(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function tU(r,e,t,n){let i=n.includes(".")?gU(t,n):()=>t[n];if(Si(r)){const s=e[r];vr(s)&&_4(i,s)}else if(vr(r))_4(i,r.bind(t));else if(zn(r))if(cr(r))r.forEach(s=>tU(s,e,t,n));else{const s=vr(r.handler)?r.handler.bind(t):e[r.handler];vr(s)&&_4(i,s,r)}}function JS(r){const e=r.type,{mixins:t,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=r.appContext,a=s.get(e);let c;return a?c=a:!i.length&&!t&&!n?c=e:(c={},i.length&&i.forEach(l=>n6(c,l,o,!0)),n6(c,e,o)),zn(e)&&s.set(e,c),c}function n6(r,e,t,n=!1){const{mixins:i,extends:s}=e;s&&n6(r,s,t,!0),i&&i.forEach(o=>n6(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const a=vte[o]||t&&t[o];r[o]=a?a(r[o],e[o]):e[o]}return r}const vte={data:yN,props:bN,emits:bN,methods:n3,computed:n3,beforeCreate:Ws,created:Ws,beforeMount:Ws,mounted:Ws,beforeUpdate:Ws,updated:Ws,beforeDestroy:Ws,beforeUnmount:Ws,destroyed:Ws,unmounted:Ws,activated:Ws,deactivated:Ws,errorCaptured:Ws,serverPrefetch:Ws,components:n3,directives:n3,watch:bte,provide:yN,inject:yte};function yN(r,e){return e?r?function(){return hs(vr(r)?r.call(this,this):r,vr(e)?e.call(this,this):e)}:e:r}function yte(r,e){return n3(m9(r),m9(e))}function m9(r){if(cr(r)){const e={};for(let t=0;t1)return t&&vr(e)?e.call(n&&n.proxy):e}}const nU={},iU=()=>Object.create(nU),sU=r=>Object.getPrototypeOf(r)===nU;function Ate(r,e,t,n=!1){const i={},s=iU();r.propsDefaults=Object.create(null),oU(r,e,i,s);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:jL(i):r.type.props?r.props=i:r.props=s,r.attrs=s}function Ete(r,e,t,n){const{props:i,attrs:s,vnode:{patchFlag:o}}=r,a=un(i),[c]=r.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const h=r.vnode.dynamicProps;for(let f=0;f{c=!0;const[v,y]=aU(f,e,!0);hs(o,v),y&&a.push(...y)};!t&&e.mixins.length&&e.mixins.forEach(h),r.extends&&h(r.extends),r.mixins&&r.mixins.forEach(h)}if(!s&&!c)return zn(r)&&n.set(r,jg),jg;if(cr(s))for(let h=0;hr[0]==="_"||r==="$stable",XS=r=>cr(r)?r.map(nu):[nu(r)],Ste=(r,e,t)=>{if(e._n)return e;const n=Yee((...i)=>XS(e(...i)),t);return n._c=!1,n},lU=(r,e,t)=>{const n=r._ctx;for(const i in r){if(cU(i))continue;const s=r[i];if(vr(s))e[i]=Ste(i,s,n);else if(s!=null){const o=XS(s);e[i]=()=>o}}},uU=(r,e)=>{const t=XS(e);r.slots.default=()=>t},hU=(r,e,t)=>{for(const n in e)(t||n!=="_")&&(r[n]=e[n])},Ite=(r,e,t)=>{const n=r.slots=iU();if(r.vnode.shapeFlag&32){const i=e._;i?(hU(n,e,t),t&&xL(n,"_",i,!0)):lU(e,n)}else e&&uU(r,e)},Tte=(r,e,t)=>{const{vnode:n,slots:i}=r;let s=!0,o=Sn;if(n.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:hU(i,e,t):(s=!e.$stable,lU(e,i)),o=e}else e&&(uU(r,e),o={default:1});if(s)for(const a in i)!cU(a)&&o[a]==null&&delete i[a]},Xo=Hte;function Rte(r){return kte(r)}function kte(r,e){const t=AL();t.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:o,createText:a,createComment:c,setText:l,setElementText:h,parentNode:f,nextSibling:v,setScopeId:y=du,insertStaticContent:A}=r,M=(z,K,ue,ye=null,we=null,je=null,Me=void 0,Ie=null,Be=!!K.dynamicChildren)=>{if(z===K)return;z&&!D2(z,K)&&(ye=k(z),O(z,we,je,!0),z=null),K.patchFlag===-2&&(Be=!1,K.dynamicChildren=null);const{type:xe,ref:$e,shapeFlag:We}=K;switch(xe){case J8:$(z,K,ue,ye);break;case Op:L(z,K,ue,ye);break;case x4:z==null&&P(K,ue,ye,Me);break;case Qc:oe(z,K,ue,ye,we,je,Me,Ie,Be);break;default:We&1?q(z,K,ue,ye,we,je,Me,Ie,Be):We&6?d(z,K,ue,ye,we,je,Me,Ie,Be):(We&64||We&128)&&xe.process(z,K,ue,ye,we,je,Me,Ie,Be,S)}$e!=null&&we&&f9($e,z&&z.ref,je,K||z,!K)},$=(z,K,ue,ye)=>{if(z==null)n(K.el=a(K.children),ue,ye);else{const we=K.el=z.el;K.children!==z.children&&l(we,K.children)}},L=(z,K,ue,ye)=>{z==null?n(K.el=c(K.children||""),ue,ye):K.el=z.el},P=(z,K,ue,ye)=>{[z.el,z.anchor]=A(z.children,K,ue,ye,z.el,z.anchor)},H=({el:z,anchor:K},ue,ye)=>{let we;for(;z&&z!==K;)we=v(z),n(z,ue,ye),z=we;n(K,ue,ye)},F=({el:z,anchor:K})=>{let ue;for(;z&&z!==K;)ue=v(z),i(z),z=ue;i(K)},q=(z,K,ue,ye,we,je,Me,Ie,Be)=>{K.type==="svg"?Me="svg":K.type==="math"&&(Me="mathml"),z==null?Y(K,ue,ye,we,je,Me,Ie,Be):V(z,K,we,je,Me,Ie,Be)},Y=(z,K,ue,ye,we,je,Me,Ie)=>{let Be,xe;const{props:$e,shapeFlag:We,transition:Ne,dirs:Ue}=z;if(Be=z.el=o(z.type,je,$e&&$e.is,$e),We&8?h(Be,z.children):We&16&&T(z.children,Be,null,ye,we,YA(z,je),Me,Ie),Ue&&I0(z,null,ye,"created"),I(Be,z,z.scopeId,Me,ye),$e){for(const N in $e)N!=="value"&&!m3(N)&&s(Be,N,null,$e[N],je,ye);"value"in $e&&s(Be,"value",null,$e.value,je),(xe=$e.onVnodeBeforeMount)&&Pl(xe,ye,z)}Ue&&I0(z,null,ye,"beforeMount");const X=Nte(we,Ne);X&&Ne.beforeEnter(Be),n(Be,K,ue),((xe=$e&&$e.onVnodeMounted)||X||Ue)&&Xo(()=>{xe&&Pl(xe,ye,z),X&&Ne.enter(Be),Ue&&I0(z,null,ye,"mounted")},we)},I=(z,K,ue,ye,we)=>{if(ue&&y(z,ue),ye)for(let je=0;je{for(let xe=Be;xe{const Ie=K.el=z.el;let{patchFlag:Be,dynamicChildren:xe,dirs:$e}=K;Be|=z.patchFlag&16;const We=z.props||Sn,Ne=K.props||Sn;let Ue;if(ue&&T0(ue,!1),(Ue=Ne.onVnodeBeforeUpdate)&&Pl(Ue,ue,K,z),$e&&I0(K,z,ue,"beforeUpdate"),ue&&T0(ue,!0),(We.innerHTML&&Ne.innerHTML==null||We.textContent&&Ne.textContent==null)&&h(Ie,""),xe?Q(z.dynamicChildren,xe,Ie,ue,ye,YA(K,we),je):Me||C(z,K,Ie,null,ue,ye,YA(K,we),je,!1),Be>0){if(Be&16)te(Ie,We,Ne,ue,we);else if(Be&2&&We.class!==Ne.class&&s(Ie,"class",null,Ne.class,we),Be&4&&s(Ie,"style",We.style,Ne.style,we),Be&8){const X=K.dynamicProps;for(let N=0;N{Ue&&Pl(Ue,ue,K,z),$e&&I0(K,z,ue,"updated")},ye)},Q=(z,K,ue,ye,we,je,Me)=>{for(let Ie=0;Ie{if(K!==ue){if(K!==Sn)for(const je in K)!m3(je)&&!(je in ue)&&s(z,je,K[je],null,we,ye);for(const je in ue){if(m3(je))continue;const Me=ue[je],Ie=K[je];Me!==Ie&&je!=="value"&&s(z,je,Ie,Me,we,ye)}"value"in ue&&s(z,"value",K.value,ue.value,we)}},oe=(z,K,ue,ye,we,je,Me,Ie,Be)=>{const xe=K.el=z?z.el:a(""),$e=K.anchor=z?z.anchor:a("");let{patchFlag:We,dynamicChildren:Ne,slotScopeIds:Ue}=K;Ue&&(Ie=Ie?Ie.concat(Ue):Ue),z==null?(n(xe,ue,ye),n($e,ue,ye),T(K.children||[],ue,$e,we,je,Me,Ie,Be)):We>0&&We&64&&Ne&&z.dynamicChildren?(Q(z.dynamicChildren,Ne,ue,we,je,Me,Ie),(K.key!=null||we&&K===we.subTree)&&dU(z,K,!0)):C(z,K,ue,$e,we,je,Me,Ie,Be)},d=(z,K,ue,ye,we,je,Me,Ie,Be)=>{K.slotScopeIds=Ie,z==null?K.shapeFlag&512?we.ctx.activate(K,ue,ye,Me,Be):g(K,ue,ye,we,je,Me,Be):m(z,K,Be)},g=(z,K,ue,ye,we,je,Me)=>{const Ie=z.component=Yte(z,ye,we);if(XL(z)&&(Ie.ctx.renderer=S),Qte(Ie,!1,Me),Ie.asyncDep){if(we&&we.registerDep(Ie,b,Me),!z.el){const Be=Ie.subTree=eo(Op);L(null,Be,K,ue)}}else b(Ie,z,K,ue,we,je,Me)},m=(z,K,ue)=>{const ye=K.component=z.component;if(Fte(z,K,ue))if(ye.asyncDep&&!ye.asyncResolved){E(ye,K,ue);return}else ye.next=K,ye.update();else K.el=z.el,ye.vnode=K},b=(z,K,ue,ye,we,je,Me)=>{const Ie=()=>{if(z.isMounted){let{next:We,bu:Ne,u:Ue,parent:X,vnode:N}=z;{const Ee=fU(z);if(Ee){We&&(We.el=N.el,E(z,We,Me)),Ee.asyncDep.then(()=>{z.isUnmounted||Ie()});return}}let U=We,ie;T0(z,!1),We?(We.el=N.el,E(z,We,Me)):We=N,Ne&&y4(Ne),(ie=We.props&&We.props.onVnodeBeforeUpdate)&&Pl(ie,X,We,N),T0(z,!0);const le=QA(z),me=z.subTree;z.subTree=le,M(me,le,f(me.el),k(me),z,we,je),We.el=le.el,U===null&&jte(z,le.el),Ue&&Xo(Ue,we),(ie=We.props&&We.props.onVnodeUpdated)&&Xo(()=>Pl(ie,X,We,N),we)}else{let We;const{el:Ne,props:Ue}=K,{bm:X,m:N,parent:U,root:ie,type:le}=z,me=v3(K);if(T0(z,!1),X&&y4(X),!me&&(We=Ue&&Ue.onVnodeBeforeMount)&&Pl(We,U,K),T0(z,!0),Ne&&G){const Ee=()=>{z.subTree=QA(z),G(Ne,z.subTree,z,we,null)};me&&le.__asyncHydrate?le.__asyncHydrate(Ne,z,Ee):Ee()}else{ie.ce&&ie.ce._injectChildStyle(le);const Ee=z.subTree=QA(z);M(null,Ee,ue,ye,z,we,je),K.el=Ee.el}if(N&&Xo(N,we),!me&&(We=Ue&&Ue.onVnodeMounted)){const Ee=K;Xo(()=>Pl(We,U,Ee),we)}(K.shapeFlag&256||U&&v3(U.vnode)&&U.vnode.shapeFlag&256)&&z.a&&Xo(z.a,we),z.isMounted=!0,K=ue=ye=null}};z.scope.on();const Be=z.effect=new TL(Ie);z.scope.off();const xe=z.update=Be.run.bind(Be),$e=z.job=Be.runIfDirty.bind(Be);$e.i=z,$e.id=z.uid,Be.scheduler=()=>YS($e),T0(z,!0),xe()},E=(z,K,ue)=>{K.component=z;const ye=z.vnode.props;z.vnode=K,z.next=null,Ete(z,K.props,ye,ue),Tte(z,K.children,ue),Qf(),gN(z),Jf()},C=(z,K,ue,ye,we,je,Me,Ie,Be=!1)=>{const xe=z&&z.children,$e=z?z.shapeFlag:0,We=K.children,{patchFlag:Ne,shapeFlag:Ue}=K;if(Ne>0){if(Ne&128){R(xe,We,ue,ye,we,je,Me,Ie,Be);return}else if(Ne&256){B(xe,We,ue,ye,we,je,Me,Ie,Be);return}}Ue&8?($e&16&&Z(xe,we,je),We!==xe&&h(ue,We)):$e&16?Ue&16?R(xe,We,ue,ye,we,je,Me,Ie,Be):Z(xe,we,je,!0):($e&8&&h(ue,""),Ue&16&&T(We,ue,ye,we,je,Me,Ie,Be))},B=(z,K,ue,ye,we,je,Me,Ie,Be)=>{z=z||jg,K=K||jg;const xe=z.length,$e=K.length,We=Math.min(xe,$e);let Ne;for(Ne=0;Ne$e?Z(z,we,je,!0,!1,We):T(K,ue,ye,we,je,Me,Ie,Be,We)},R=(z,K,ue,ye,we,je,Me,Ie,Be)=>{let xe=0;const $e=K.length;let We=z.length-1,Ne=$e-1;for(;xe<=We&&xe<=Ne;){const Ue=z[xe],X=K[xe]=Be?Kd(K[xe]):nu(K[xe]);if(D2(Ue,X))M(Ue,X,ue,null,we,je,Me,Ie,Be);else break;xe++}for(;xe<=We&&xe<=Ne;){const Ue=z[We],X=K[Ne]=Be?Kd(K[Ne]):nu(K[Ne]);if(D2(Ue,X))M(Ue,X,ue,null,we,je,Me,Ie,Be);else break;We--,Ne--}if(xe>We){if(xe<=Ne){const Ue=Ne+1,X=Ue<$e?K[Ue].el:ye;for(;xe<=Ne;)M(null,K[xe]=Be?Kd(K[xe]):nu(K[xe]),ue,X,we,je,Me,Ie,Be),xe++}}else if(xe>Ne)for(;xe<=We;)O(z[xe],we,je,!0),xe++;else{const Ue=xe,X=xe,N=new Map;for(xe=X;xe<=Ne;xe++){const St=K[xe]=Be?Kd(K[xe]):nu(K[xe]);St.key!=null&&N.set(St.key,xe)}let U,ie=0;const le=Ne-X+1;let me=!1,Ee=0;const ze=new Array(le);for(xe=0;xe=le){O(St,we,je,!0);continue}let Je;if(St.key!=null)Je=N.get(St.key);else for(U=X;U<=Ne;U++)if(ze[U-X]===0&&D2(St,K[U])){Je=U;break}Je===void 0?O(St,we,je,!0):(ze[Je-X]=xe+1,Je>=Ee?Ee=Je:me=!0,M(St,K[Je],ue,null,we,je,Me,Ie,Be),ie++)}const qe=me?Pte(ze):jg;for(U=qe.length-1,xe=le-1;xe>=0;xe--){const St=X+xe,Je=K[St],nt=St+1<$e?K[St+1].el:ye;ze[xe]===0?M(null,Je,ue,nt,we,je,Me,Ie,Be):me&&(U<0||xe!==qe[U]?w(Je,ue,nt,2):U--)}}},w=(z,K,ue,ye,we=null)=>{const{el:je,type:Me,transition:Ie,children:Be,shapeFlag:xe}=z;if(xe&6){w(z.component.subTree,K,ue,ye);return}if(xe&128){z.suspense.move(K,ue,ye);return}if(xe&64){Me.move(z,K,ue,S);return}if(Me===Qc){n(je,K,ue);for(let We=0;WeIe.enter(je),we);else{const{leave:We,delayLeave:Ne,afterLeave:Ue}=Ie,X=()=>n(je,K,ue),N=()=>{We(je,()=>{X(),Ue&&Ue()})};Ne?Ne(je,X,N):N()}else n(je,K,ue)},O=(z,K,ue,ye=!1,we=!1)=>{const{type:je,props:Me,ref:Ie,children:Be,dynamicChildren:xe,shapeFlag:$e,patchFlag:We,dirs:Ne,cacheIndex:Ue}=z;if(We===-2&&(we=!1),Ie!=null&&f9(Ie,null,ue,z,!0),Ue!=null&&(K.renderCache[Ue]=void 0),$e&256){K.ctx.deactivate(z);return}const X=$e&1&&Ne,N=!v3(z);let U;if(N&&(U=Me&&Me.onVnodeBeforeUnmount)&&Pl(U,K,z),$e&6)x(z.component,ue,ye);else{if($e&128){z.suspense.unmount(ue,ye);return}X&&I0(z,null,K,"beforeUnmount"),$e&64?z.type.remove(z,K,ue,S,ye):xe&&!xe.hasOnce&&(je!==Qc||We>0&&We&64)?Z(xe,K,ue,!1,!0):(je===Qc&&We&384||!we&&$e&16)&&Z(Be,K,ue),ye&&pe(z)}(N&&(U=Me&&Me.onVnodeUnmounted)||X)&&Xo(()=>{U&&Pl(U,K,z),X&&I0(z,null,K,"unmounted")},ue)},pe=z=>{const{type:K,el:ue,anchor:ye,transition:we}=z;if(K===Qc){be(ue,ye);return}if(K===x4){F(z);return}const je=()=>{i(ue),we&&!we.persisted&&we.afterLeave&&we.afterLeave()};if(z.shapeFlag&1&&we&&!we.persisted){const{leave:Me,delayLeave:Ie}=we,Be=()=>Me(ue,je);Ie?Ie(z.el,je,Be):Be()}else je()},be=(z,K)=>{let ue;for(;z!==K;)ue=v(z),i(z),z=ue;i(K)},x=(z,K,ue)=>{const{bum:ye,scope:we,job:je,subTree:Me,um:Ie,m:Be,a:xe}=z;xN(Be),xN(xe),ye&&y4(ye),we.stop(),je&&(je.flags|=8,O(Me,z,K,ue)),Ie&&Xo(Ie,K),Xo(()=>{z.isUnmounted=!0},K),K&&K.pendingBranch&&!K.isUnmounted&&z.asyncDep&&!z.asyncResolved&&z.suspenseId===K.pendingId&&(K.deps--,K.deps===0&&K.resolve())},Z=(z,K,ue,ye=!1,we=!1,je=0)=>{for(let Me=je;Me{if(z.shapeFlag&6)return k(z.component.subTree);if(z.shapeFlag&128)return z.suspense.next();const K=v(z.anchor||z.el),ue=K&&K[Qee];return ue?v(ue):K};let W=!1;const J=(z,K,ue)=>{z==null?K._vnode&&O(K._vnode,null,null,!0):M(K._vnode||null,z,K,null,null,null,ue),K._vnode=z,W||(W=!0,gN(),GL(),W=!1)},S={p:M,um:O,m:w,r:pe,mt:g,mc:T,pc:C,pbc:Q,n:k,o:r};let D,G;return{render:J,hydrate:D,createApp:xte(J,D)}}function YA({type:r,props:e},t){return t==="svg"&&r==="foreignObject"||t==="mathml"&&r==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function T0({effect:r,job:e},t){t?(r.flags|=32,e.flags|=4):(r.flags&=-33,e.flags&=-5)}function Nte(r,e){return(!r||r&&!r.pendingBranch)&&e&&!e.persisted}function dU(r,e,t=!1){const n=r.children,i=e.children;if(cr(n)&&cr(i))for(let s=0;s>1,r[t[a]]0&&(e[n]=t[s-1]),t[s]=n)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function fU(r){const e=r.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:fU(e)}function xN(r){if(r)for(let e=0;eol(Ote);function _4(r,e,t){return pU(r,e,t)}function pU(r,e,t=Sn){const{immediate:n,deep:i,flush:s,once:o}=t,a=hs({},t);let c;if(X8)if(s==="sync"){const v=Mte();c=v.__watcherHandles||(v.__watcherHandles=[])}else if(!e||n)a.once=!0;else return{stop:du,resume:du,pause:du};const l=Rs;a.call=(v,y,A)=>Tu(v,l,y,A);let h=!1;s==="post"?a.scheduler=v=>{Xo(v,l&&l.suspense)}:s!=="sync"&&(h=!0,a.scheduler=(v,y)=>{y?v():YS(v)}),a.augmentJob=v=>{e&&(v.flags|=4),h&&(v.flags|=2,l&&(v.id=l.uid,v.i=l))};const f=qee(r,e,a);return c&&c.push(f),f}function Dte(r,e,t){const n=this.proxy,i=Si(r)?r.includes(".")?gU(n,r):()=>n[r]:r.bind(n,n);let s;vr(e)?s=e:(s=e.handler,t=e);const o=xy(this),a=pU(i,s.bind(n),t);return o(),a}function gU(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;ie==="modelValue"||e==="model-value"?r.modelModifiers:r[`${e}Modifiers`]||r[`${ll(e)}Modifiers`]||r[`${p1(e)}Modifiers`];function Bte(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||Sn;let i=t;const s=e.startsWith("update:"),o=s&&$te(n,e.slice(7));o&&(o.trim&&(i=t.map(h=>Si(h)?h.trim():h)),o.number&&(i=t.map(c9)));let a,c=n[a=zA(e)]||n[a=zA(ll(e))];!c&&s&&(c=n[a=zA(p1(e))]),c&&Tu(c,r,6,i);const l=n[a+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[a])return;r.emitted[a]=!0,Tu(l,r,6,i)}}function mU(r,e,t=!1){const n=e.emitsCache,i=n.get(r);if(i!==void 0)return i;const s=r.emits;let o={},a=!1;if(!vr(r)){const c=l=>{const h=mU(l,e,!0);h&&(a=!0,hs(o,h))};!t&&e.mixins.length&&e.mixins.forEach(c),r.extends&&c(r.extends),r.mixins&&r.mixins.forEach(c)}return!s&&!a?(zn(r)&&n.set(r,null),null):(cr(s)?s.forEach(c=>o[c]=null):hs(o,s),zn(r)&&n.set(r,o),o)}function Q8(r,e){return!r||!W8(e)?!1:(e=e.slice(2).replace(/Once$/,""),gn(r,e[0].toLowerCase()+e.slice(1))||gn(r,p1(e))||gn(r,e))}function QA(r){const{type:e,vnode:t,proxy:n,withProxy:i,propsOptions:[s],slots:o,attrs:a,emit:c,render:l,renderCache:h,props:f,data:v,setupState:y,ctx:A,inheritAttrs:M}=r,$=r6(r);let L,P;try{if(t.shapeFlag&4){const F=i||n,q=F;L=nu(l.call(q,F,h,f,y,v,A)),P=a}else{const F=e;L=nu(F.length>1?F(f,{attrs:a,slots:o,emit:c}):F(f,null)),P=e.props?a:Lte(a)}}catch(F){b3.length=0,Z8(F,r,1),L=eo(Op)}let H=L;if(P&&M!==!1){const F=Object.keys(P),{shapeFlag:q}=H;F.length&&q&7&&(s&&F.some($S)&&(P=Ute(P,s)),H=Jm(H,P,!1,!0))}return t.dirs&&(H=Jm(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(t.dirs):t.dirs),t.transition&&QS(H,t.transition),L=H,r6($),L}const Lte=r=>{let e;for(const t in r)(t==="class"||t==="style"||W8(t))&&((e||(e={}))[t]=r[t]);return e},Ute=(r,e)=>{const t={};for(const n in r)(!$S(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function Fte(r,e,t){const{props:n,children:i,component:s}=r,{props:o,children:a,patchFlag:c}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&c>=0){if(c&1024)return!0;if(c&16)return n?AN(n,o,l):!!o;if(c&8){const h=e.dynamicProps;for(let f=0;fr.__isSuspense;function Hte(r,e){e&&e.pendingBranch?cr(r)?e.effects.push(...r):e.effects.push(r):Zee(r)}const Qc=Symbol.for("v-fgt"),J8=Symbol.for("v-txt"),Op=Symbol.for("v-cmt"),x4=Symbol.for("v-stc"),b3=[];let ua=null;function fu(r=!1){b3.push(ua=r?null:[])}function Wte(){b3.pop(),ua=b3[b3.length-1]||null}let K3=1;function EN(r){K3+=r,r<0&&ua&&(ua.hasOnce=!0)}function vU(r){return r.dynamicChildren=K3>0?ua||jg:null,Wte(),K3>0&&ua&&ua.push(r),r}function Kg(r,e,t,n,i,s){return vU(sn(r,e,t,n,i,s,!0))}function i6(r,e,t,n,i){return vU(eo(r,e,t,n,i,!0))}function v9(r){return r?r.__v_isVNode===!0:!1}function D2(r,e){return r.type===e.type&&r.key===e.key}const yU=({key:r})=>r??null,A4=({ref:r,ref_key:e,ref_for:t})=>(typeof r=="number"&&(r=""+r),r!=null?Si(r)||Ns(r)||vr(r)?{i:la,r,k:e,f:!!t}:r:null);function sn(r,e=null,t=null,n=0,i=null,s=r===Qc?0:1,o=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&yU(e),ref:e&&A4(e),scopeId:YL,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:la};return a?(eI(c,t),s&128&&r.normalize(c)):t&&(c.shapeFlag|=Si(t)?8:16),K3>0&&!o&&ua&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&ua.push(c),c}const eo=zte;function zte(r,e=null,t=null,n=0,i=null,s=!1){if((!r||r===fte)&&(r=Op),v9(r)){const a=Jm(r,e,!0);return t&&eI(a,t),K3>0&&!s&&ua&&(a.shapeFlag&6?ua[ua.indexOf(r)]=a:ua.push(a)),a.patchFlag=-2,a}if(rre(r)&&(r=r.__vccOpts),e){e=Vte(e);let{class:a,style:c}=e;a&&!Si(a)&&(e.class=Wg(a)),zn(c)&&(KS(c)&&!cr(c)&&(c=hs({},c)),e.style=US(c))}const o=Si(r)?1:wU(r)?128:Jee(r)?64:zn(r)?4:vr(r)?2:0;return sn(r,e,t,n,i,o,s,!0)}function Vte(r){return r?KS(r)||sU(r)?hs({},r):r:null}function Jm(r,e,t=!1,n=!1){const{props:i,ref:s,patchFlag:o,children:a,transition:c}=r,l=e?Kte(i||{},e):i,h={__v_isVNode:!0,__v_skip:!0,type:r.type,props:l,key:l&&yU(l),ref:e&&e.ref?t&&s?cr(s)?s.concat(A4(e)):[s,A4(e)]:A4(e):s,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:a,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==Qc?o===-1?16:o|16:o,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:c,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&Jm(r.ssContent),ssFallback:r.ssFallback&&Jm(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return c&&n&&QS(h,c.clone(h)),h}function qte(r=" ",e=0){return eo(J8,null,r,e)}function BRe(r,e){const t=eo(x4,null,r);return t.staticCount=e,t}function s6(r="",e=!1){return e?(fu(),i6(Op,null,r)):eo(Op,null,r)}function nu(r){return r==null||typeof r=="boolean"?eo(Op):cr(r)?eo(Qc,null,r.slice()):typeof r=="object"?Kd(r):eo(J8,null,String(r))}function Kd(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:Jm(r)}function eI(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(cr(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),eI(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!sU(e)?e._ctx=la:i===3&&la&&(la.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else vr(e)?(e={default:e,_ctx:la},t=32):(e=String(e),n&64?(t=16,e=[qte(e)]):t=8);r.children=e,r.shapeFlag|=t}function Kte(...r){const e={};for(let t=0;t{let i;return(i=r[t])||(i=r[t]=[]),i.push(n),s=>{i.length>1?i.forEach(o=>o(s)):i[0](s)}};o6=e("__VUE_INSTANCE_SETTERS__",t=>Rs=t),y9=e("__VUE_SSR_SETTERS__",t=>X8=t)}const xy=r=>{const e=Rs;return o6(r),r.scope.on(),()=>{r.scope.off(),o6(e)}},CN=()=>{Rs&&Rs.scope.off(),o6(null)};function bU(r){return r.vnode.shapeFlag&4}let X8=!1;function Qte(r,e=!1,t=!1){e&&y9(e);const{props:n,children:i}=r.vnode,s=bU(r);Ate(r,n,s,e),Ite(r,i,t);const o=s?Jte(r,e):void 0;return e&&y9(!1),o}function Jte(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,gte);const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?ere(r):null,s=xy(r);Qf();const o=by(n,r,0,[r.props,i]);if(Jf(),s(),yL(o)){if(v3(r)||JL(r),o.then(CN,CN),e)return o.then(a=>{SN(r,a,e)}).catch(a=>{Z8(a,r,0)});r.asyncDep=o}else SN(r,o,e)}else _U(r,e)}function SN(r,e,t){vr(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:zn(e)&&(r.setupState=zL(e)),_U(r,t)}let IN;function _U(r,e,t){const n=r.type;if(!r.render){if(!e&&IN&&!n.render){const i=n.template||JS(r).template;if(i){const{isCustomElement:s,compilerOptions:o}=r.appContext.config,{delimiters:a,compilerOptions:c}=n,l=hs(hs({isCustomElement:s,delimiters:a},o),c);n.render=IN(i,l)}}r.render=n.render||du}{const i=xy(r);Qf();try{mte(r)}finally{Jf(),i()}}}const Xte={get(r,e){return Os(r,"get",""),r[e]}};function ere(r){const e=t=>{r.exposed=t||{}};return{attrs:new Proxy(r.attrs,Xte),slots:r.slots,emit:r.emit,expose:e}}function e_(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(zL(Uee(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in y3)return y3[t](r)},has(e,t){return t in e||t in y3}})):r.proxy}function tre(r,e=!0){return vr(r)?r.displayName||r.name:r.name||e&&r.__name}function rre(r){return vr(r)&&"__vccOpts"in r}const Jc=(r,e)=>zee(r,e,X8);function xU(r,e,t){const n=arguments.length;return n===2?zn(e)&&!cr(e)?v9(e)?eo(r,null,[e]):eo(r,e):eo(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&v9(t)&&(t=[t]),eo(r,e,t))}const nre="3.5.3";/** +* @vue/runtime-dom v3.5.3 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let b9;const TN=typeof window<"u"&&window.trustedTypes;if(TN)try{b9=TN.createPolicy("vue",{createHTML:r=>r})}catch{}const AU=b9?r=>b9.createHTML(r):r=>r,ire="http://www.w3.org/2000/svg",sre="http://www.w3.org/1998/Math/MathML",Eh=typeof document<"u"?document:null,RN=Eh&&Eh.createElement("template"),ore={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e==="svg"?Eh.createElementNS(ire,r):e==="mathml"?Eh.createElementNS(sre,r):t?Eh.createElement(r,{is:t}):Eh.createElement(r);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>Eh.createTextNode(r),createComment:r=>Eh.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Eh.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,s){const o=t?t.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===s||!(i=i.nextSibling)););else{RN.innerHTML=AU(n==="svg"?`${r}`:n==="mathml"?`${r}`:r);const a=RN.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},are=Symbol("_vtc");function cre(r,e,t){const n=r[are];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}const kN=Symbol("_vod"),lre=Symbol("_vsh"),ure=Symbol(""),hre=/(^|;)\s*display\s*:/;function dre(r,e,t){const n=r.style,i=Si(t);let s=!1;if(t&&!i){if(e)if(Si(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&E4(n,a,"")}else for(const o in e)t[o]==null&&E4(n,o,"");for(const o in t)o==="display"&&(s=!0),E4(n,o,t[o])}else if(i){if(e!==t){const o=n[ure];o&&(t+=";"+o),n.cssText=t,s=hre.test(t)}}else e&&r.removeAttribute("style");kN in r&&(r[kN]=s?n.display:"",r[lre]&&(n.display="none"))}const NN=/\s*!important$/;function E4(r,e,t){if(cr(t))t.forEach(n=>E4(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=fre(r,e);NN.test(t)?r.setProperty(p1(n),t.replace(NN,""),"important"):r[n]=t}}const PN=["Webkit","Moz","ms"],JA={};function fre(r,e){const t=JA[e];if(t)return t;let n=ll(e);if(n!=="filter"&&n in r)return JA[e]=n;n=q8(n);for(let i=0;iXA||(vre.then(()=>XA=0),XA=Date.now());function bre(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;Tu(_re(n,t.value),e,5,[n])};return t.value=r,t.attached=yre(),t}function _re(r,e){if(cr(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const BN=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,xre=(r,e,t,n,i,s)=>{const o=i==="svg";e==="class"?cre(r,n,o):e==="style"?dre(r,t,n):W8(e)?$S(e)||mre(r,e,t,n,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Are(r,e,n,o))?(pre(r,e,n),!r.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&MN(r,e,n,o,s,e!=="value")):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),MN(r,e,n,o))};function Are(r,e,t,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in r&&BN(e)&&vr(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=r.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return BN(e)&&Si(t)?!1:!!(e in r||r._isVueCE&&(/[A-Z]/.test(e)||!Si(t)))}const LN=r=>{const e=r.props["onUpdate:modelValue"]||!1;return cr(e)?t=>y4(e,t):e};function Ere(r){r.target.composing=!0}function UN(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const eE=Symbol("_assign"),LRe={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r[eE]=LN(i);const s=n||i.props&&i.props.type==="number";yg(r,e?"change":"input",o=>{if(o.target.composing)return;let a=r.value;t&&(a=a.trim()),s&&(a=c9(a)),r[eE](a)}),t&&yg(r,"change",()=>{r.value=r.value.trim()}),e||(yg(r,"compositionstart",Ere),yg(r,"compositionend",UN),yg(r,"change",UN))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,oldValue:t,modifiers:{lazy:n,trim:i,number:s}},o){if(r[eE]=LN(o),r.composing)return;const a=(s||r.type==="number")&&!/^0\d/.test(r.value)?c9(r.value):r.value,c=e??"";a!==c&&(document.activeElement===r&&r.type!=="range"&&(n&&e===t||i&&r.value.trim()===c)||(r.value=c))}},Cre=hs({patchProp:xre},ore);let FN;function Sre(){return FN||(FN=Rte(Cre))}const Ire=(...r)=>{const e=Sre().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=Rre(n);if(!i)return;const s=e._component;!vr(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=t(i,!1,Tre(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e};function Tre(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function Rre(r){return Si(r)?document.querySelector(r):r}const kre="/webapp/assets/logo-BzMutN9x.svg";/*! + * vue-router v4.4.3 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const bg=typeof document<"u";function Nre(r){return r.__esModule||r[Symbol.toStringTag]==="Module"}const fn=Object.assign;function tE(r,e){const t={};for(const n in e){const i=e[n];t[n]=ul(i)?i.map(r):r(i)}return t}const _3=()=>{},ul=Array.isArray,EU=/#/g,Pre=/&/g,Ore=/\//g,Mre=/=/g,Dre=/\?/g,CU=/\+/g,$re=/%5B/g,Bre=/%5D/g,SU=/%5E/g,Lre=/%60/g,IU=/%7B/g,Ure=/%7C/g,TU=/%7D/g,Fre=/%20/g;function tI(r){return encodeURI(""+r).replace(Ure,"|").replace($re,"[").replace(Bre,"]")}function jre(r){return tI(r).replace(IU,"{").replace(TU,"}").replace(SU,"^")}function _9(r){return tI(r).replace(CU,"%2B").replace(Fre,"+").replace(EU,"%23").replace(Pre,"%26").replace(Lre,"`").replace(IU,"{").replace(TU,"}").replace(SU,"^")}function Hre(r){return _9(r).replace(Mre,"%3D")}function Wre(r){return tI(r).replace(EU,"%23").replace(Dre,"%3F")}function zre(r){return r==null?"":Wre(r).replace(Ore,"%2F")}function G3(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const Vre=/\/$/,qre=r=>r.replace(Vre,"");function rE(r,e,t="/"){let n,i={},s="",o="";const a=e.indexOf("#");let c=e.indexOf("?");return a=0&&(c=-1),c>-1&&(n=e.slice(0,c),s=e.slice(c+1,a>-1?a:e.length),i=r(s)),a>-1&&(n=n||e.slice(0,a),o=e.slice(a,e.length)),n=Yre(n??e,t),{fullPath:n+(s&&"?")+s+o,path:n,query:i,hash:G3(o)}}function Kre(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function jN(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function Gre(r,e,t){const n=e.matched.length-1,i=t.matched.length-1;return n>-1&&n===i&&Xm(e.matched[n],t.matched[i])&&RU(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function Xm(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function RU(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!Zre(r[t],e[t]))return!1;return!0}function Zre(r,e){return ul(r)?HN(r,e):ul(e)?HN(e,r):r===e}function HN(r,e){return ul(e)?r.length===e.length&&r.every((t,n)=>t===e[n]):r.length===1&&r[0]===e}function Yre(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),n=r.split("/"),i=n[n.length-1];(i===".."||i===".")&&n.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+n.slice(o).join("/")}const Bd={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Z3;(function(r){r.pop="pop",r.push="push"})(Z3||(Z3={}));var x3;(function(r){r.back="back",r.forward="forward",r.unknown=""})(x3||(x3={}));function Qre(r){if(!r)if(bg){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),qre(r)}const Jre=/^[^#]+#/;function Xre(r,e){return r.replace(Jre,"#")+e}function ene(r,e){const t=document.documentElement.getBoundingClientRect(),n=r.getBoundingClientRect();return{behavior:e.behavior,left:n.left-t.left-(e.left||0),top:n.top-t.top-(e.top||0)}}const t_=()=>({left:window.scrollX,top:window.scrollY});function tne(r){let e;if("el"in r){const t=r.el,n=typeof t=="string"&&t.startsWith("#"),i=typeof t=="string"?n?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!i)return;e=ene(i,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function WN(r,e){return(history.state?history.state.position-e:-1)+r}const x9=new Map;function rne(r,e){x9.set(r,e)}function nne(r){const e=x9.get(r);return x9.delete(r),e}let ine=()=>location.protocol+"//"+location.host;function kU(r,e){const{pathname:t,search:n,hash:i}=e,s=r.indexOf("#");if(s>-1){let a=i.includes(r.slice(s))?r.slice(s).length:1,c=i.slice(a);return c[0]!=="/"&&(c="/"+c),jN(c,"")}return jN(t,r)+n+i}function sne(r,e,t,n){let i=[],s=[],o=null;const a=({state:v})=>{const y=kU(r,location),A=t.value,M=e.value;let $=0;if(v){if(t.value=y,e.value=v,o&&o===A){o=null;return}$=M?v.position-M.position:0}else n(y);i.forEach(L=>{L(t.value,A,{delta:$,type:Z3.pop,direction:$?$>0?x3.forward:x3.back:x3.unknown})})};function c(){o=t.value}function l(v){i.push(v);const y=()=>{const A=i.indexOf(v);A>-1&&i.splice(A,1)};return s.push(y),y}function h(){const{history:v}=window;v.state&&v.replaceState(fn({},v.state,{scroll:t_()}),"")}function f(){for(const v of s)v();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:c,listen:l,destroy:f}}function zN(r,e,t,n=!1,i=!1){return{back:r,current:e,forward:t,replaced:n,position:window.history.length,scroll:i?t_():null}}function one(r){const{history:e,location:t}=window,n={value:kU(r,t)},i={value:e.state};i.value||s(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(c,l,h){const f=r.indexOf("#"),v=f>-1?(t.host&&document.querySelector("base")?r:r.slice(f))+c:ine()+r+c;try{e[h?"replaceState":"pushState"](l,"",v),i.value=l}catch(y){console.error(y),t[h?"replace":"assign"](v)}}function o(c,l){const h=fn({},e.state,zN(i.value.back,c,i.value.forward,!0),l,{position:i.value.position});s(c,h,!0),n.value=c}function a(c,l){const h=fn({},i.value,e.state,{forward:c,scroll:t_()});s(h.current,h,!0);const f=fn({},zN(n.value,c,null),{position:h.position+1},l);s(c,f,!1),n.value=c}return{location:n,state:i,push:a,replace:o}}function ane(r){r=Qre(r);const e=one(r),t=sne(r,e.state,e.location,e.replace);function n(s,o=!0){o||t.pauseListeners(),history.go(s)}const i=fn({location:"",base:r,go:n,createHref:Xre.bind(null,r)},e,t);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function cne(r){return typeof r=="string"||r&&typeof r=="object"}function NU(r){return typeof r=="string"||typeof r=="symbol"}const PU=Symbol("");var VN;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(VN||(VN={}));function ew(r,e){return fn(new Error,{type:r,[PU]:!0},e)}function fh(r,e){return r instanceof Error&&PU in r&&(e==null||!!(r.type&e))}const qN="[^/]+?",lne={sensitive:!1,strict:!1,start:!0,end:!0},une=/[.+*?^${}()[\]/\\]/g;function hne(r,e){const t=fn({},lne,e),n=[];let i=t.start?"^":"";const s=[];for(const l of r){const h=l.length?[]:[90];t.strict&&!l.length&&(i+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function OU(r,e){let t=0;const n=r.score,i=e.score;for(;t0&&e[e.length-1]<0}const fne={type:0,value:""},pne=/[a-zA-Z0-9_]/;function gne(r){if(!r)return[[]];if(r==="/")return[[fne]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(y){throw new Error(`ERR (${t})/"${l}": ${y}`)}let t=0,n=t;const i=[];let s;function o(){s&&i.push(s),s=[]}let a=0,c,l="",h="";function f(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(c==="*"||c==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:h,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):e("Invalid state to consume buffer"),l="")}function v(){l+=c}for(;a{o(H)}:_3}function o(f){if(NU(f)){const v=n.get(f);v&&(n.delete(f),t.splice(t.indexOf(v),1),v.children.forEach(o),v.alias.forEach(o))}else{const v=t.indexOf(f);v>-1&&(t.splice(v,1),f.record.name&&n.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function c(f){const v=_ne(f,t);t.splice(v,0,f),f.record.name&&!ZN(f)&&n.set(f.record.name,f)}function l(f,v){let y,A={},M,$;if("name"in f&&f.name){if(y=n.get(f.name),!y)throw ew(1,{location:f});$=y.record.name,A=fn(GN(v.params,y.keys.filter(H=>!H.optional).concat(y.parent?y.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),f.params&&GN(f.params,y.keys.map(H=>H.name))),M=y.stringify(A)}else if(f.path!=null)M=f.path,y=t.find(H=>H.re.test(M)),y&&(A=y.parse(M),$=y.record.name);else{if(y=v.name?n.get(v.name):t.find(H=>H.re.test(v.path)),!y)throw ew(1,{location:f,currentLocation:v});$=y.record.name,A=fn({},v.params,f.params),M=y.stringify(A)}const L=[];let P=y;for(;P;)L.unshift(P.record),P=P.parent;return{name:$,path:M,params:A,matched:L,meta:bne(L)}}r.forEach(f=>s(f));function h(){t.length=0,n.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:h,getRoutes:a,getRecordMatcher:i}}function GN(r,e){const t={};for(const n of e)n in r&&(t[n]=r[n]);return t}function vne(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:yne(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}}}function yne(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const n in r.components)e[n]=typeof t=="object"?t[n]:t;return e}function ZN(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function bne(r){return r.reduce((e,t)=>fn(e,t.meta),{})}function YN(r,e){const t={};for(const n in r)t[n]=n in e?e[n]:r[n];return t}function _ne(r,e){let t=0,n=e.length;for(;t!==n;){const s=t+n>>1;OU(r,e[s])<0?n=s:t=s+1}const i=xne(r);return i&&(n=e.lastIndexOf(i,n-1)),n}function xne(r){let e=r;for(;e=e.parent;)if(MU(e)&&OU(r,e)===0)return e}function MU({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function Ane(r){const e={};if(r===""||r==="?")return e;const n=(r[0]==="?"?r.slice(1):r).split("&");for(let i=0;is&&_9(s)):[n&&_9(n)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function Ene(r){const e={};for(const t in r){const n=r[t];n!==void 0&&(e[t]=ul(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return e}const Cne=Symbol(""),JN=Symbol(""),r_=Symbol(""),rI=Symbol(""),A9=Symbol("");function $2(){let r=[];function e(n){return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function Gd(r,e,t,n,i,s=o=>o()){const o=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((a,c)=>{const l=v=>{v===!1?c(ew(4,{from:t,to:e})):v instanceof Error?c(v):cne(v)?c(ew(2,{from:e,to:v})):(o&&n.enterCallbacks[i]===o&&typeof v=="function"&&o.push(v),a())},h=s(()=>r.call(n&&n.instances[i],e,t,l));let f=Promise.resolve(h);r.length<3&&(f=f.then(l)),f.catch(v=>c(v))})}function nE(r,e,t,n,i=s=>s()){const s=[];for(const o of r)for(const a in o.components){let c=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Sne(c)){const h=(c.__vccOpts||c)[e];h&&s.push(Gd(h,t,n,o,a,i))}else{let l=c();s.push(()=>l.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const f=Nre(h)?h.default:h;o.components[a]=f;const y=(f.__vccOpts||f)[e];return y&&Gd(y,t,n,o,a,i)()}))}}return s}function Sne(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function XN(r){const e=ol(r_),t=ol(rI),n=Jc(()=>{const c=Oo(r.to);return e.resolve(c)}),i=Jc(()=>{const{matched:c}=n.value,{length:l}=c,h=c[l-1],f=t.matched;if(!h||!f.length)return-1;const v=f.findIndex(Xm.bind(null,h));if(v>-1)return v;const y=eP(c[l-2]);return l>1&&eP(h)===y&&f[f.length-1].path!==y?f.findIndex(Xm.bind(null,c[l-2])):v}),s=Jc(()=>i.value>-1&&kne(t.params,n.value.params)),o=Jc(()=>i.value>-1&&i.value===t.matched.length-1&&RU(t.params,n.value.params));function a(c={}){return Rne(c)?e[Oo(r.replace)?"replace":"push"](Oo(r.to)).catch(_3):Promise.resolve()}return{route:n,href:Jc(()=>n.value.href),isActive:s,isExactActive:o,navigate:a}}const Ine=QL({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:XN,setup(r,{slots:e}){const t=yy(XN(r)),{options:n}=ol(r_),i=Jc(()=>({[tP(r.activeClass,n.linkActiveClass,"router-link-active")]:t.isActive,[tP(r.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&e.default(t);return r.custom?s:xU("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:i.value},s)}}}),Tne=Ine;function Rne(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function kne(r,e){for(const t in e){const n=e[t],i=r[t];if(typeof n=="string"){if(n!==i)return!1}else if(!ul(i)||i.length!==n.length||n.some((s,o)=>s!==i[o]))return!1}return!0}function eP(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const tP=(r,e,t)=>r??e??t,Nne=QL({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const n=ol(A9),i=Jc(()=>r.route||n.value),s=ol(JN,0),o=Jc(()=>{let l=Oo(s);const{matched:h}=i.value;let f;for(;(f=h[l])&&!f.components;)l++;return l}),a=Jc(()=>i.value.matched[o.value]);b4(JN,Jc(()=>o.value+1)),b4(Cne,a),b4(A9,i);const c=Tf();return _4(()=>[c.value,a.value,r.name],([l,h,f],[v,y,A])=>{h&&(h.instances[f]=l,y&&y!==h&&l&&l===v&&(h.leaveGuards.size||(h.leaveGuards=y.leaveGuards),h.updateGuards.size||(h.updateGuards=y.updateGuards))),l&&h&&(!y||!Xm(h,y)||!v)&&(h.enterCallbacks[f]||[]).forEach(M=>M(l))},{flush:"post"}),()=>{const l=i.value,h=r.name,f=a.value,v=f&&f.components[h];if(!v)return rP(t.default,{Component:v,route:l});const y=f.props[h],A=y?y===!0?l.params:typeof y=="function"?y(l):y:null,$=xU(v,fn({},A,e,{onVnodeUnmounted:L=>{L.component.isUnmounted&&(f.instances[h]=null)},ref:c}));return rP(t.default,{Component:$,route:l})||$}}});function rP(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const Pne=Nne;function One(r){const e=wne(r.routes,r),t=r.parseQuery||Ane,n=r.stringifyQuery||QN,i=r.history,s=$2(),o=$2(),a=$2(),c=Fee(Bd);let l=Bd;bg&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=tE.bind(null,k=>""+k),f=tE.bind(null,zre),v=tE.bind(null,G3);function y(k,W){let J,S;return NU(k)?(J=e.getRecordMatcher(k),S=W):S=k,e.addRoute(S,J)}function A(k){const W=e.getRecordMatcher(k);W&&e.removeRoute(W)}function M(){return e.getRoutes().map(k=>k.record)}function $(k){return!!e.getRecordMatcher(k)}function L(k,W){if(W=fn({},W||c.value),typeof k=="string"){const K=rE(t,k,W.path),ue=e.resolve({path:K.path},W),ye=i.createHref(K.fullPath);return fn(K,ue,{params:v(ue.params),hash:G3(K.hash),redirectedFrom:void 0,href:ye})}let J;if(k.path!=null)J=fn({},k,{path:rE(t,k.path,W.path).path});else{const K=fn({},k.params);for(const ue in K)K[ue]==null&&delete K[ue];J=fn({},k,{params:f(K)}),W.params=f(W.params)}const S=e.resolve(J,W),D=k.hash||"";S.params=h(v(S.params));const G=Kre(n,fn({},k,{hash:jre(D),path:S.path})),z=i.createHref(G);return fn({fullPath:G,hash:D,query:n===QN?Ene(k.query):k.query||{}},S,{redirectedFrom:void 0,href:z})}function P(k){return typeof k=="string"?rE(t,k,c.value.path):fn({},k)}function H(k,W){if(l!==k)return ew(8,{from:W,to:k})}function F(k){return I(k)}function q(k){return F(fn(P(k),{replace:!0}))}function Y(k){const W=k.matched[k.matched.length-1];if(W&&W.redirect){const{redirect:J}=W;let S=typeof J=="function"?J(k):J;return typeof S=="string"&&(S=S.includes("?")||S.includes("#")?S=P(S):{path:S},S.params={}),fn({query:k.query,hash:k.hash,params:S.path!=null?{}:k.params},S)}}function I(k,W){const J=l=L(k),S=c.value,D=k.state,G=k.force,z=k.replace===!0,K=Y(J);if(K)return I(fn(P(K),{state:typeof K=="object"?fn({},D,K.state):D,force:G,replace:z}),W||J);const ue=J;ue.redirectedFrom=W;let ye;return!G&&Gre(n,S,J)&&(ye=ew(16,{to:ue,from:S}),w(S,S,!0,!1)),(ye?Promise.resolve(ye):Q(ue,S)).catch(we=>fh(we)?fh(we,2)?we:R(we):C(we,ue,S)).then(we=>{if(we){if(fh(we,2))return I(fn({replace:z},P(we.to),{state:typeof we.to=="object"?fn({},D,we.to.state):D,force:G}),W||ue)}else we=oe(ue,S,!0,z,D);return te(ue,S,we),we})}function T(k,W){const J=H(k,W);return J?Promise.reject(J):Promise.resolve()}function V(k){const W=be.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(k):k()}function Q(k,W){let J;const[S,D,G]=Mne(k,W);J=nE(S.reverse(),"beforeRouteLeave",k,W);for(const K of S)K.leaveGuards.forEach(ue=>{J.push(Gd(ue,k,W))});const z=T.bind(null,k,W);return J.push(z),Z(J).then(()=>{J=[];for(const K of s.list())J.push(Gd(K,k,W));return J.push(z),Z(J)}).then(()=>{J=nE(D,"beforeRouteUpdate",k,W);for(const K of D)K.updateGuards.forEach(ue=>{J.push(Gd(ue,k,W))});return J.push(z),Z(J)}).then(()=>{J=[];for(const K of G)if(K.beforeEnter)if(ul(K.beforeEnter))for(const ue of K.beforeEnter)J.push(Gd(ue,k,W));else J.push(Gd(K.beforeEnter,k,W));return J.push(z),Z(J)}).then(()=>(k.matched.forEach(K=>K.enterCallbacks={}),J=nE(G,"beforeRouteEnter",k,W,V),J.push(z),Z(J))).then(()=>{J=[];for(const K of o.list())J.push(Gd(K,k,W));return J.push(z),Z(J)}).catch(K=>fh(K,8)?K:Promise.reject(K))}function te(k,W,J){a.list().forEach(S=>V(()=>S(k,W,J)))}function oe(k,W,J,S,D){const G=H(k,W);if(G)return G;const z=W===Bd,K=bg?history.state:{};J&&(S||z?i.replace(k.fullPath,fn({scroll:z&&K&&K.scroll},D)):i.push(k.fullPath,D)),c.value=k,w(k,W,J,z),R()}let d;function g(){d||(d=i.listen((k,W,J)=>{if(!x.listening)return;const S=L(k),D=Y(S);if(D){I(fn(D,{replace:!0}),S).catch(_3);return}l=S;const G=c.value;bg&&rne(WN(G.fullPath,J.delta),t_()),Q(S,G).catch(z=>fh(z,12)?z:fh(z,2)?(I(z.to,S).then(K=>{fh(K,20)&&!J.delta&&J.type===Z3.pop&&i.go(-1,!1)}).catch(_3),Promise.reject()):(J.delta&&i.go(-J.delta,!1),C(z,S,G))).then(z=>{z=z||oe(S,G,!1),z&&(J.delta&&!fh(z,8)?i.go(-J.delta,!1):J.type===Z3.pop&&fh(z,20)&&i.go(-1,!1)),te(S,G,z)}).catch(_3)}))}let m=$2(),b=$2(),E;function C(k,W,J){R(k);const S=b.list();return S.length?S.forEach(D=>D(k,W,J)):console.error(k),Promise.reject(k)}function B(){return E&&c.value!==Bd?Promise.resolve():new Promise((k,W)=>{m.add([k,W])})}function R(k){return E||(E=!k,g(),m.list().forEach(([W,J])=>k?J(k):W()),m.reset()),k}function w(k,W,J,S){const{scrollBehavior:D}=r;if(!bg||!D)return Promise.resolve();const G=!J&&nne(WN(k.fullPath,0))||(S||!J)&&history.state&&history.state.scroll||null;return qL().then(()=>D(k,W,G)).then(z=>z&&tne(z)).catch(z=>C(z,k,W))}const O=k=>i.go(k);let pe;const be=new Set,x={currentRoute:c,listening:!0,addRoute:y,removeRoute:A,clearRoutes:e.clearRoutes,hasRoute:$,getRoutes:M,resolve:L,options:r,push:F,replace:q,go:O,back:()=>O(-1),forward:()=>O(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:b.add,isReady:B,install(k){const W=this;k.component("RouterLink",Tne),k.component("RouterView",Pne),k.config.globalProperties.$router=W,Object.defineProperty(k.config.globalProperties,"$route",{enumerable:!0,get:()=>Oo(c)}),bg&&!pe&&c.value===Bd&&(pe=!0,F(i.location).catch(D=>{}));const J={};for(const D in Bd)Object.defineProperty(J,D,{get:()=>c.value[D],enumerable:!0});k.provide(r_,W),k.provide(rI,jL(J)),k.provide(A9,c);const S=k.unmount;be.add(k),k.unmount=function(){be.delete(k),be.size<1&&(l=Bd,d&&d(),d=null,c.value=Bd,pe=!1,E=!1),S()}}};function Z(k){return k.reduce((W,J)=>W.then(()=>V(J)),Promise.resolve())}return x}function Mne(r,e){const t=[],n=[],i=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;oXm(l,a))?n.push(a):t.push(a));const c=r.matched[o];c&&(e.matched.find(l=>Xm(l,c))||i.push(c))}return[t,n,i]}function DU(){return ol(r_)}function $U(r){return ol(rI)}const ct={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",WALLET_STANDARD_CONNECTOR_ID:"announced",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",AUTH_CONNECTOR_ID:"w3mAuth",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},VERSION:"5.1.6"},As={ConnectorExplorerIds:{[ct.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[ct.COINBASE_SDK_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[ct.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[ct.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[ct.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[ct.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[ct.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[ct.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[ct.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[ct.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[ct.INJECTED_CONNECTOR_ID]:"Browser Wallet",[ct.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[ct.COINBASE_CONNECTOR_ID]:"Coinbase",[ct.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[ct.LEDGER_CONNECTOR_ID]:"Ledger",[ct.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[ct.INJECTED_CONNECTOR_ID]:"INJECTED",[ct.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[ct.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[ct.AUTH_CONNECTOR_ID]:"AUTH"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},nP={getCaipTokens(r){if(!r)return;const e={};return Object.entries(r).forEach(([t,n])=>{e[`${ct.EIP155}:${t}`]=n}),e}};var a6;(function(r){r.Google="google",r.Github="github",r.Apple="apple",r.Facebook="facebook",r.X="x",r.Discord="discord",r.Farcaster="farcaster"})(a6||(a6={}));const Dne="modulepreload",$ne=function(r){return"/webapp/"+r},iP={},lc=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(t.map(a=>{if(a=$ne(a),a in iP)return;iP[a]=!0;const c=a.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${l}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Dne,c||(h.as="script"),h.crossOrigin="",h.href=a,o&&h.setAttribute("nonce",o),document.head.appendChild(h),c)return new Promise((f,v)=>{h.addEventListener("load",f),h.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},Bne=Symbol(),sP=Object.getPrototypeOf,E9=new WeakMap,Lne=r=>r&&(E9.has(r)?E9.get(r):sP(r)===Object.prototype||sP(r)===Array.prototype),Une=r=>Lne(r)&&r[Bne]||null,oP=(r,e=!0)=>{E9.set(r,e)},c6={BASE_URL:"/webapp/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},iE=r=>typeof r=="object"&&r!==null,Zd=new WeakMap,i3=new WeakSet,Fne=(r=Object.is,e=(l,h)=>new Proxy(l,h),t=l=>iE(l)&&!i3.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),n=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},i=new WeakMap,s=(l,h,f=n)=>{const v=i.get(l);if((v==null?void 0:v[0])===h)return v[1];const y=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return oP(y,!0),i.set(l,[h,y]),Reflect.ownKeys(l).forEach(A=>{if(Object.getOwnPropertyDescriptor(y,A))return;const M=Reflect.get(l,A),$={value:M,enumerable:!0,configurable:!0};if(i3.has(M))oP(M,!1);else if(M instanceof Promise)delete $.value,$.get=()=>f(M);else if(Zd.has(M)){const[L,P]=Zd.get(M);$.value=s(L,P(),f)}Object.defineProperty(y,A,$)}),Object.preventExtensions(y)},o=new WeakMap,a=[1,1],c=l=>{if(!iE(l))throw new Error("object required");const h=o.get(l);if(h)return h;let f=a[0];const v=new Set,y=(V,Q=++a[0])=>{f!==Q&&(f=Q,v.forEach(te=>te(V,Q)))};let A=a[1];const M=(V=++a[1])=>(A!==V&&!v.size&&(A=V,L.forEach(([Q])=>{const te=Q[1](V);te>f&&(f=te)})),f),$=V=>(Q,te)=>{const oe=[...Q];oe[1]=[V,...oe[1]],y(oe,te)},L=new Map,P=(V,Q)=>{if((c6?"production":void 0)!=="production"&&L.has(V))throw new Error("prop listener already exists");if(v.size){const te=Q[3]($(V));L.set(V,[Q,te])}else L.set(V,[Q])},H=V=>{var Q;const te=L.get(V);te&&(L.delete(V),(Q=te[1])==null||Q.call(te))},F=V=>(v.add(V),v.size===1&&L.forEach(([te,oe],d)=>{if((c6?"production":void 0)!=="production"&&oe)throw new Error("remove already exists");const g=te[3]($(d));L.set(d,[te,g])}),()=>{v.delete(V),v.size===0&&L.forEach(([te,oe],d)=>{oe&&(oe(),L.set(d,[te]))})}),q=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),I=e(q,{deleteProperty(V,Q){const te=Reflect.get(V,Q);H(Q);const oe=Reflect.deleteProperty(V,Q);return oe&&y(["delete",[Q],te]),oe},set(V,Q,te,oe){const d=Reflect.has(V,Q),g=Reflect.get(V,Q,oe);if(d&&(r(g,te)||o.has(te)&&r(g,o.get(te))))return!0;H(Q),iE(te)&&(te=Une(te)||te);let m=te;if(te instanceof Promise)te.then(b=>{te.status="fulfilled",te.value=b,y(["resolve",[Q],b])}).catch(b=>{te.status="rejected",te.reason=b,y(["reject",[Q],b])});else{!Zd.has(te)&&t(te)&&(m=c(te));const b=!i3.has(m)&&Zd.get(m);b&&P(Q,b)}return Reflect.set(V,Q,m,oe),y(["set",[Q],te,g]),!0}});o.set(l,I);const T=[q,M,s,F];return Zd.set(I,T),Reflect.ownKeys(l).forEach(V=>{const Q=Object.getOwnPropertyDescriptor(l,V);"value"in Q&&(I[V]=l[V],delete Q.value,delete Q.writable),Object.defineProperty(q,V,Q)}),I})=>[c,Zd,i3,r,e,t,n,i,s,o,a],[jne]=Fne();function ei(r={}){return jne(r)}function Ms(r,e,t){const n=Zd.get(r);(c6?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i;const s=[],o=n[3];let a=!1;const l=o(h=>{s.push(h),i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function BU(r,e){const t=Zd.get(r);(c6?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,i,s]=t;return s(n,i(),e)}function oa(r){return i3.add(r),r}function po(r,e,t,n){let i=r[e];return Ms(r,()=>{const s=r[e];Object.is(i,s)||t(i=s)})}function Hne(r){const e=ei({data:Array.from([]),has(t){return this.data.some(n=>n[0]===t)},set(t,n){const i=this.data.find(s=>s[0]===t);return i?i[1]=n:this.data.push([t,n]),this},get(t){var n;return(n=this.data.find(i=>i[0]===t))==null?void 0:n[1]},delete(t){const n=this.data.findIndex(i=>i[0]===t);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(t){this.data.forEach(n=>{t(n[1],n[0],this)})},keys(){return this.data.map(t=>t[0]).values()},values(){return this.data.map(t=>t[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(e,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(e),e}var Yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Ay(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):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 LU={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(Yr,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",h="week",f="month",v="quarter",y="year",A="date",M="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(g){var m=["th","st","nd","rd"],b=g%100;return"["+g+(m[(b-20)%10]||m[b]||m[0])+"]"}},H=function(g,m,b){var E=String(g);return!E||E.length>=m?g:""+Array(m+1-E.length).join(b)+g},F={s:H,z:function(g){var m=-g.utcOffset(),b=Math.abs(m),E=Math.floor(b/60),C=b%60;return(m<=0?"+":"-")+H(E,2,"0")+":"+H(C,2,"0")},m:function g(m,b){if(m.date()1)return g(R[0])}else{var w=m.name;Y[w]=m,C=w}return!E&&C&&(q=C),C||!E&&q},Q=function(g,m){if(T(g))return g.clone();var b=typeof m=="object"?m:{};return b.date=g,b.args=arguments,new oe(b)},te=F;te.l=V,te.i=T,te.w=function(g,m){return Q(g,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var oe=function(){function g(b){this.$L=V(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[I]=!0}var m=g.prototype;return m.parse=function(b){this.$d=function(E){var C=E.date,B=E.utc;if(C===null)return new Date(NaN);if(te.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var R=C.match($);if(R){var w=R[2]-1||0,O=(R[7]||"0").substring(0,3);return B?new Date(Date.UTC(R[1],w,R[3]||1,R[4]||0,R[5]||0,R[6]||0,O)):new Date(R[1],w,R[3]||1,R[4]||0,R[5]||0,R[6]||0,O)}}return new Date(C)}(b),this.init()},m.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},m.$utils=function(){return te},m.isValid=function(){return this.$d.toString()!==M},m.isSame=function(b,E){var C=Q(b);return this.startOf(E)<=C&&C<=this.endOf(E)},m.isAfter=function(b,E){return Q(b)0,Y<=q.r||!q.r){Y<=1&&F>0&&(q=P[F-1]);var I=L[q.l];y&&(Y=y(""+Y)),M=typeof I=="string"?I.replace("%d",Y):I(Y,h,q.l,$);break}}if(h)return M;var T=$?L.future:L.past;return typeof T=="function"?T(M):T.replace("%s",M)},s.to=function(l,h){return a(l,h,this,!0)},s.from=function(l,h){return a(l,h,this)};var c=function(l){return l.$u?i.utc():i()};s.toNow=function(l){return this.to(c(this),l)},s.fromNow=function(l){return this.from(c(this),l)}}})})(FU);var qne=FU.exports;const Kne=Xf(qne);var jU={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(Yr,function(){return function(t,n,i){i.updateLocale=function(s,o){var a=i.Ls[s];if(a)return(o?Object.keys(o):[]).forEach(function(c){a[c]=o[c]}),a}}})})(jU);var Gne=jU.exports;const Zne=Xf(Gne);Gg.extend(Kne);Gg.extend(Zne);const Yne={...Vne,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}};Gg.locale("en-web3-modal",Yne);const nI={getYear(r=new Date().toISOString()){return Gg(r).year()},getRelativeDateFromNow(r){return Gg(r).locale("en-web3-modal").fromNow(!0)},formatDate(r,e="DD MMM"){return Gg(r).format(e)}},$c={caipNetworkIdToNumber(r){return r?Number(r.split(":")[1]):void 0},parseEvmChainId(r){return typeof r=="string"?this.caipNetworkIdToNumber(r):r}};var Qne=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,sE=Math.ceil,Va=Math.floor,So="[BigNumber Error] ",aP=So+"Number primitive has more than 15 significant digits: ",Tc=1e14,gr=14,oE=9007199254740991,aE=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ld=1e7,ji=1e9;function HU(r){var e,t,n,i=P.prototype={constructor:P,toString:null,valueOf:null},s=new P(1),o=20,a=4,c=-7,l=21,h=-1e7,f=1e7,v=!1,y=1,A=0,M={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function P(T,V){var Q,te,oe,d,g,m,b,E,C=this;if(!(C instanceof P))return new P(T,V);if(V==null){if(T&&T._isBigNumber===!0){C.s=T.s,!T.c||T.e>f?C.c=C.e=null:T.e=10;g/=10,d++);d>f?C.c=C.e=null:(C.e=d,C.c=[T]);return}E=String(T)}else{if(!Qne.test(E=String(T)))return n(C,E,m);C.s=E.charCodeAt(0)==45?(E=E.slice(1),-1):1}(d=E.indexOf("."))>-1&&(E=E.replace(".","")),(g=E.search(/e/i))>0?(d<0&&(d=g),d+=+E.slice(g+1),E=E.substring(0,g)):d<0&&(d=E.length)}else{if(Gn(V,2,$.length,"Base"),V==10&&L)return C=new P(T),Y(C,o+C.e+1,a);if(E=String(T),m=typeof T=="number"){if(T*0!=0)return n(C,E,m,V);if(C.s=1/T<0?(E=E.slice(1),-1):1,P.DEBUG&&E.replace(/^0\.0*|\./,"").length>15)throw Error(aP+T)}else C.s=E.charCodeAt(0)===45?(E=E.slice(1),-1):1;for(Q=$.slice(0,V),d=g=0,b=E.length;gd){d=b;continue}}else if(!oe&&(E==E.toUpperCase()&&(E=E.toLowerCase())||E==E.toLowerCase()&&(E=E.toUpperCase()))){oe=!0,g=-1,d=0;continue}return n(C,String(T),m,V)}m=!1,E=t(E,V,10,C.s),(d=E.indexOf("."))>-1?E=E.replace(".",""):d=E.length}for(g=0;E.charCodeAt(g)===48;g++);for(b=E.length;E.charCodeAt(--b)===48;);if(E=E.slice(g,++b)){if(b-=g,m&&P.DEBUG&&b>15&&(T>oE||T!==Va(T)))throw Error(aP+C.s*T);if((d=d-g-1)>f)C.c=C.e=null;else if(d=-ji&&oe<=ji&&oe===Va(oe)){if(te[0]===0){if(oe===0&&te.length===1)return!0;break e}if(V=(oe+1)%gr,V<1&&(V+=gr),String(te[0]).length==V){for(V=0;V=Tc||Q!==Va(Q))break e;if(Q!==0)return!0}}}else if(te===null&&oe===null&&(d===null||d===1||d===-1))return!0;throw Error(So+"Invalid BigNumber: "+T)},P.maximum=P.max=function(){return F(arguments,-1)},P.minimum=P.min=function(){return F(arguments,1)},P.random=function(){var T=9007199254740992,V=Math.random()*T&2097151?function(){return Va(Math.random()*T)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(Q){var te,oe,d,g,m,b=0,E=[],C=new P(s);if(Q==null?Q=o:Gn(Q,0,ji),g=sE(Q/gr),v)if(crypto.getRandomValues){for(te=crypto.getRandomValues(new Uint32Array(g*=2));b>>11),m>=9e15?(oe=crypto.getRandomValues(new Uint32Array(2)),te[b]=oe[0],te[b+1]=oe[1]):(E.push(m%1e14),b+=2);b=g/2}else if(crypto.randomBytes){for(te=crypto.randomBytes(g*=7);b=9e15?crypto.randomBytes(7).copy(te,b):(E.push(m%1e14),b+=7);b=g/7}else throw v=!1,Error(So+"crypto unavailable");if(!v)for(;b=10;m/=10,b++);boe-1&&(m[g+1]==null&&(m[g+1]=0),m[g+1]+=m[g]/oe|0,m[g]%=oe)}return m.reverse()}return function(Q,te,oe,d,g){var m,b,E,C,B,R,w,O,pe=Q.indexOf("."),be=o,x=a;for(pe>=0&&(C=A,A=0,Q=Q.replace(".",""),O=new P(te),R=O.pow(Q.length-pe),A=C,O.c=V(ph(Ma(R.c),R.e,"0"),10,oe,T),O.e=O.c.length),w=V(Q,te,oe,g?(m=$,T):(m=T,$)),E=C=w.length;w[--C]==0;w.pop());if(!w[0])return m.charAt(0);if(pe<0?--E:(R.c=w,R.e=E,R.s=d,R=e(R,O,be,x,oe),w=R.c,B=R.r,E=R.e),b=E+be+1,pe=w[b],C=oe/2,B=B||b<0||w[b+1]!=null,B=x<4?(pe!=null||B)&&(x==0||x==(R.s<0?3:2)):pe>C||pe==C&&(x==4||B||x==6&&w[b-1]&1||x==(R.s<0?8:7)),b<1||!w[0])Q=B?ph(m.charAt(1),-be,m.charAt(0)):m.charAt(0);else{if(w.length=b,B)for(--oe;++w[--b]>oe;)w[b]=0,b||(++E,w=[1].concat(w));for(C=w.length;!w[--C];);for(pe=0,Q="";pe<=C;Q+=m.charAt(w[pe++]));Q=ph(Q,E,m.charAt(0))}return Q}}(),e=function(){function T(te,oe,d){var g,m,b,E,C=0,B=te.length,R=oe%Ld,w=oe/Ld|0;for(te=te.slice();B--;)b=te[B]%Ld,E=te[B]/Ld|0,g=w*b+E*R,m=R*b+g%Ld*Ld+C,C=(m/d|0)+(g/Ld|0)+w*E,te[B]=m%d;return C&&(te=[C].concat(te)),te}function V(te,oe,d,g){var m,b;if(d!=g)b=d>g?1:-1;else for(m=b=0;moe[m]?1:-1;break}return b}function Q(te,oe,d,g){for(var m=0;d--;)te[d]-=m,m=te[d]1;te.splice(0,1));}return function(te,oe,d,g,m){var b,E,C,B,R,w,O,pe,be,x,Z,k,W,J,S,D,G,z=te.s==oe.s?1:-1,K=te.c,ue=oe.c;if(!K||!K[0]||!ue||!ue[0])return new P(!te.s||!oe.s||(K?ue&&K[0]==ue[0]:!ue)?NaN:K&&K[0]==0||!ue?z*0:z/0);for(pe=new P(z),be=pe.c=[],E=te.e-oe.e,z=d+E+1,m||(m=Tc,E=qa(te.e/gr)-qa(oe.e/gr),z=z/gr|0),C=0;ue[C]==(K[C]||0);C++);if(ue[C]>(K[C]||0)&&E--,z<0)be.push(1),B=!0;else{for(J=K.length,D=ue.length,C=0,z+=2,R=Va(m/(ue[0]+1)),R>1&&(ue=T(ue,R,m),K=T(K,R,m),D=ue.length,J=K.length),W=D,x=K.slice(0,D),Z=x.length;Z=m/2&&S++;do{if(R=0,b=V(ue,x,D,Z),b<0){if(k=x[0],D!=Z&&(k=k*m+(x[1]||0)),R=Va(k/S),R>1)for(R>=m&&(R=m-1),w=T(ue,R,m),O=w.length,Z=x.length;V(w,x,O,Z)==1;)R--,Q(w,D=10;z/=10,C++);Y(pe,d+(pe.e=C+E*gr-1)+1,g,B)}else pe.e=E,pe.r=+B;return pe}}();function H(T,V,Q,te){var oe,d,g,m,b;if(Q==null?Q=a:Gn(Q,0,8),!T.c)return T.toString();if(oe=T.c[0],g=T.e,V==null)b=Ma(T.c),b=te==1||te==2&&(g<=c||g>=l)?O5(b,g):ph(b,g,"0");else if(T=Y(new P(T),V,Q),d=T.e,b=Ma(T.c),m=b.length,te==1||te==2&&(V<=d||d<=c)){for(;mm){if(--V>0)for(b+=".";V--;b+="0");}else if(V+=d-m,V>0)for(d+1==m&&(b+=".");V--;b+="0");return T.s<0&&oe?"-"+b:b}function F(T,V){for(var Q,te,oe=1,d=new P(T[0]);oe=10;oe/=10,te++);return(Q=te+Q*gr-1)>f?T.c=T.e=null:Q=10;m/=10,oe++);if(d=V-oe,d<0)d+=gr,g=V,b=B[E=0],C=Va(b/R[oe-g-1]%10);else if(E=sE((d+1)/gr),E>=B.length)if(te){for(;B.length<=E;B.push(0));b=C=0,oe=1,d%=gr,g=d-gr+1}else break e;else{for(b=m=B[E],oe=1;m>=10;m/=10,oe++);d%=gr,g=d-gr+oe,C=g<0?0:Va(b/R[oe-g-1]%10)}if(te=te||V<0||B[E+1]!=null||(g<0?b:b%R[oe-g-1]),te=Q<4?(C||te)&&(Q==0||Q==(T.s<0?3:2)):C>5||C==5&&(Q==4||te||Q==6&&(d>0?g>0?b/R[oe-g]:0:B[E-1])%10&1||Q==(T.s<0?8:7)),V<1||!B[0])return B.length=0,te?(V-=T.e+1,B[0]=R[(gr-V%gr)%gr],T.e=-V||0):B[0]=T.e=0,T;if(d==0?(B.length=E,m=1,E--):(B.length=E+1,m=R[gr-d],B[E]=g>0?Va(b/R[oe-g]%R[g])*m:0),te)for(;;)if(E==0){for(d=1,g=B[0];g>=10;g/=10,d++);for(g=B[0]+=m,m=1;g>=10;g/=10,m++);d!=m&&(T.e++,B[0]==Tc&&(B[0]=1));break}else{if(B[E]+=m,B[E]!=Tc)break;B[E--]=0,m=1}for(d=B.length;B[--d]===0;B.pop());}T.e>f?T.c=T.e=null:T.e=l?O5(V,Q):ph(V,Q,"0"),T.s<0?"-"+V:V)}return i.absoluteValue=i.abs=function(){var T=new P(this);return T.s<0&&(T.s=1),T},i.comparedTo=function(T,V){return R0(this,new P(T,V))},i.decimalPlaces=i.dp=function(T,V){var Q,te,oe,d=this;if(T!=null)return Gn(T,0,ji),V==null?V=a:Gn(V,0,8),Y(new P(d),T+d.e+1,V);if(!(Q=d.c))return null;if(te=((oe=Q.length-1)-qa(this.e/gr))*gr,oe=Q[oe])for(;oe%10==0;oe/=10,te--);return te<0&&(te=0),te},i.dividedBy=i.div=function(T,V){return e(this,new P(T,V),o,a)},i.dividedToIntegerBy=i.idiv=function(T,V){return e(this,new P(T,V),0,1)},i.exponentiatedBy=i.pow=function(T,V){var Q,te,oe,d,g,m,b,E,C,B=this;if(T=new P(T),T.c&&!T.isInteger())throw Error(So+"Exponent not an integer: "+I(T));if(V!=null&&(V=new P(V)),m=T.e>14,!B.c||!B.c[0]||B.c[0]==1&&!B.e&&B.c.length==1||!T.c||!T.c[0])return C=new P(Math.pow(+I(B),m?T.s*(2-P5(T)):+I(T))),V?C.mod(V):C;if(b=T.s<0,V){if(V.c?!V.c[0]:!V.s)return new P(NaN);te=!b&&B.isInteger()&&V.isInteger(),te&&(B=B.mod(V))}else{if(T.e>9&&(B.e>0||B.e<-1||(B.e==0?B.c[0]>1||m&&B.c[1]>=24e7:B.c[0]<8e13||m&&B.c[0]<=9999975e7)))return d=B.s<0&&P5(T)?-0:0,B.e>-1&&(d=1/d),new P(b?1/d:d);A&&(d=sE(A/gr+2))}for(m?(Q=new P(.5),b&&(T.s=1),E=P5(T)):(oe=Math.abs(+I(T)),E=oe%2),C=new P(s);;){if(E){if(C=C.times(B),!C.c)break;d?C.c.length>d&&(C.c.length=d):te&&(C=C.mod(V))}if(oe){if(oe=Va(oe/2),oe===0)break;E=oe%2}else if(T=T.times(Q),Y(T,T.e+1,1),T.e>14)E=P5(T);else{if(oe=+I(T),oe===0)break;E=oe%2}B=B.times(B),d?B.c&&B.c.length>d&&(B.c.length=d):te&&(B=B.mod(V))}return te?C:(b&&(C=s.div(C)),V?C.mod(V):d?Y(C,A,a,g):C)},i.integerValue=function(T){var V=new P(this);return T==null?T=a:Gn(T,0,8),Y(V,V.e+1,T)},i.isEqualTo=i.eq=function(T,V){return R0(this,new P(T,V))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(T,V){return R0(this,new P(T,V))>0},i.isGreaterThanOrEqualTo=i.gte=function(T,V){return(V=R0(this,new P(T,V)))===1||V===0},i.isInteger=function(){return!!this.c&&qa(this.e/gr)>this.c.length-2},i.isLessThan=i.lt=function(T,V){return R0(this,new P(T,V))<0},i.isLessThanOrEqualTo=i.lte=function(T,V){return(V=R0(this,new P(T,V)))===-1||V===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(T,V){var Q,te,oe,d,g=this,m=g.s;if(T=new P(T,V),V=T.s,!m||!V)return new P(NaN);if(m!=V)return T.s=-V,g.plus(T);var b=g.e/gr,E=T.e/gr,C=g.c,B=T.c;if(!b||!E){if(!C||!B)return C?(T.s=-V,T):new P(B?g:NaN);if(!C[0]||!B[0])return B[0]?(T.s=-V,T):new P(C[0]?g:a==3?-0:0)}if(b=qa(b),E=qa(E),C=C.slice(),m=b-E){for((d=m<0)?(m=-m,oe=C):(E=b,oe=B),oe.reverse(),V=m;V--;oe.push(0));oe.reverse()}else for(te=(d=(m=C.length)<(V=B.length))?m:V,m=V=0;V0)for(;V--;C[Q++]=0);for(V=Tc-1;te>m;){if(C[--te]=0;){for(Q=0,R=k[oe]%be,w=k[oe]/be|0,g=b,d=oe+g;d>oe;)E=Z[--g]%be,C=Z[g]/be|0,m=w*E+C*R,E=R*E+m%be*be+O[d]+Q,Q=(E/pe|0)+(m/be|0)+w*C,O[d--]=E%pe;O[d]=Q}return Q?++te:O.splice(0,1),q(T,O,te)},i.negated=function(){var T=new P(this);return T.s=-T.s||null,T},i.plus=function(T,V){var Q,te=this,oe=te.s;if(T=new P(T,V),V=T.s,!oe||!V)return new P(NaN);if(oe!=V)return T.s=-V,te.minus(T);var d=te.e/gr,g=T.e/gr,m=te.c,b=T.c;if(!d||!g){if(!m||!b)return new P(oe/0);if(!m[0]||!b[0])return b[0]?T:new P(m[0]?te:oe*0)}if(d=qa(d),g=qa(g),m=m.slice(),oe=d-g){for(oe>0?(g=d,Q=b):(oe=-oe,Q=m),Q.reverse();oe--;Q.push(0));Q.reverse()}for(oe=m.length,V=b.length,oe-V<0&&(Q=b,b=m,m=Q,V=oe),oe=0;V;)oe=(m[--V]=m[V]+b[V]+oe)/Tc|0,m[V]=Tc===m[V]?0:m[V]%Tc;return oe&&(m=[oe].concat(m),++g),q(T,m,g)},i.precision=i.sd=function(T,V){var Q,te,oe,d=this;if(T!=null&&T!==!!T)return Gn(T,1,ji),V==null?V=a:Gn(V,0,8),Y(new P(d),T,V);if(!(Q=d.c))return null;if(oe=Q.length-1,te=oe*gr+1,oe=Q[oe]){for(;oe%10==0;oe/=10,te--);for(oe=Q[0];oe>=10;oe/=10,te++);}return T&&d.e+1>te&&(te=d.e+1),te},i.shiftedBy=function(T){return Gn(T,-oE,oE),this.times("1e"+T)},i.squareRoot=i.sqrt=function(){var T,V,Q,te,oe,d=this,g=d.c,m=d.s,b=d.e,E=o+4,C=new P("0.5");if(m!==1||!g||!g[0])return new P(!m||m<0&&(!g||g[0])?NaN:g?d:1/0);if(m=Math.sqrt(+I(d)),m==0||m==1/0?(V=Ma(g),(V.length+b)%2==0&&(V+="0"),m=Math.sqrt(+V),b=qa((b+1)/2)-(b<0||b%2),m==1/0?V="5e"+b:(V=m.toExponential(),V=V.slice(0,V.indexOf("e")+1)+b),Q=new P(V)):Q=new P(m+""),Q.c[0]){for(b=Q.e,m=b+E,m<3&&(m=0);;)if(oe=Q,Q=C.times(oe.plus(e(d,oe,E,1))),Ma(oe.c).slice(0,m)===(V=Ma(Q.c)).slice(0,m))if(Q.e0&&O>0){for(d=O%m||m,C=w.substr(0,d);d0&&(C+=E+w.slice(d)),R&&(C="-"+C)}te=B?C+(Q.decimalSeparator||"")+((b=+Q.fractionGroupSize)?B.replace(new RegExp("\\d{"+b+"}\\B","g"),"$&"+(Q.fractionGroupSeparator||"")):B):C}return(Q.prefix||"")+te+(Q.suffix||"")},i.toFraction=function(T){var V,Q,te,oe,d,g,m,b,E,C,B,R,w=this,O=w.c;if(T!=null&&(m=new P(T),!m.isInteger()&&(m.c||m.s!==1)||m.lt(s)))throw Error(So+"Argument "+(m.isInteger()?"out of range: ":"not an integer: ")+I(m));if(!O)return new P(w);for(V=new P(s),E=Q=new P(s),te=b=new P(s),R=Ma(O),d=V.e=R.length-w.e-1,V.c[0]=aE[(g=d%gr)<0?gr+g:g],T=!T||m.comparedTo(V)>0?d>0?V:E:m,g=f,f=1/0,m=new P(R),b.c[0]=0;C=e(m,V,0,1),oe=Q.plus(C.times(te)),oe.comparedTo(T)!=1;)Q=te,te=oe,E=b.plus(C.times(oe=E)),b=oe,V=m.minus(C.times(oe=V)),m=oe;return oe=e(T.minus(Q),te,0,1),b=b.plus(oe.times(E)),Q=Q.plus(oe.times(te)),b.s=E.s=w.s,d=d*2,B=e(E,te,d,a).minus(w).abs().comparedTo(e(b,Q,d,a).minus(w).abs())<1?[E,te]:[b,Q],f=g,B},i.toNumber=function(){return+I(this)},i.toPrecision=function(T,V){return T!=null&&Gn(T,1,ji),H(this,T,V,2)},i.toString=function(T){var V,Q=this,te=Q.s,oe=Q.e;return oe===null?te?(V="Infinity",te<0&&(V="-"+V)):V="NaN":(T==null?V=oe<=c||oe>=l?O5(Ma(Q.c),oe):ph(Ma(Q.c),oe,"0"):T===10&&L?(Q=Y(new P(Q),o+oe+1,a),V=ph(Ma(Q.c),Q.e,"0")):(Gn(T,2,$.length,"Base"),V=t(ph(Ma(Q.c),oe,"0"),10,T,te,!0)),te<0&&Q.c[0]&&(V="-"+V)),V},i.valueOf=i.toJSON=function(){return I(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,r!=null&&P.set(r),P}function qa(r){var e=r|0;return r>0||r===e?e:e-1}function Ma(r){for(var e,t,n=1,i=r.length,s=r[0]+"";nl^t?1:-1;for(a=(c=i.length)<(l=s.length)?c:l,o=0;os[o]^t?1:-1;return c==l?0:c>l^t?1:-1}function Gn(r,e,t,n){if(rt||r!==Va(r))throw Error(So+(n||"Argument")+(typeof r=="number"?rt?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function P5(r){var e=r.c.length-1;return qa(r.e/gr)==e&&r.c[e]%2!=0}function O5(r,e){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(e<0?"e":"e+")+e}function ph(r,e,t){var n,i;if(e<0){for(i=t+".";++e;i+=t);r=i+r}else if(n=r.length,++e>n){for(i=t,e-=n;--e;i+=t);r+=i}else e="0"&&s<="9";!i&&(a||c||l||h)&&r.preventDefault(),e==="0"&&!f&&!v&&s==="0"&&r.preventDefault(),e==="0"&&y&&(t(s),r.preventDefault()),(f||v)&&(e||(t("0."),r.preventDefault()),(e!=null&&e.includes(".")||e!=null&&e.includes(","))&&r.preventDefault()),!y&&!n.includes(s)&&!v&&!f&&r.preventDefault()}},Xne=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],iI={URLS:{FAQ:"https://walletconnect.com/faq"}},vn={WC_NAME_SUFFIX:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CHAIN:{EVM:"evm",SOLANA:"solana"},CHAIN_NAME_MAP:{evm:"Ethereum",solana:"Solana"}};function Rf(r,e){return e==="light"?{"--w3m-accent":(r==null?void 0:r["--w3m-accent"])||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":(r==null?void 0:r["--w3m-accent"])||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}const cE="https://secure.walletconnect.org",WU=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],Ci={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:cE,SECURE_SITE_DASHBOARD:`${cE}/dashboard`,SECURE_SITE_FAVICON:`${cE}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:56","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1},ot={isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(r,e=""){return r==null?void 0:r.id.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){const r=window.navigator.userAgent.toLowerCase();return ot.isMobile()&&r.includes("android")},isIos(){const r=window.navigator.userAgent.toLowerCase();return ot.isMobile()&&(r.includes("iphone")||r.includes("ipad"))},isClient(){return typeof window<"u"},isPairingExpired(r){return r?r-Date.now()<=Ci.TEN_SEC_MS:!0},isAllowedRetry(r){return Date.now()-r>=Ci.ONE_SEC_MS},copyToClopboard(r){navigator.clipboard.writeText(r)},getPairingExpiry(){return Date.now()+Ci.FOUR_MINUTES_MS},getNetworkId(r){return r==null?void 0:r.split(":")[1]},getPlainAddress(r){return r==null?void 0:r.split(":")[2]},async wait(r){return new Promise(e=>{setTimeout(e,r)})},debounce(r,e=500){let t;return(...n)=>{function i(){r(...n)}t&&clearTimeout(t),t=setTimeout(i,e)}},isHttpUrl(r){return r.startsWith("http://")||r.startsWith("https://")},formatNativeUrl(r,e){if(ot.isHttpUrl(r))return this.formatUniversalUrl(r,e);let t=r;t.includes("://")||(t=r.replaceAll("/","").replaceAll(":",""),t=`${t}://`),t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},formatUniversalUrl(r,e){if(!ot.isHttpUrl(r))return this.formatNativeUrl(r,e);let t=r;t.endsWith("/")||(t=`${t}/`);const n=encodeURIComponent(e);return{redirect:`${t}wc?uri=${n}`,href:t}},openHref(r,e,t){window.open(r,e,t||"noreferrer noopener")},returnOpenHref(r,e,t){return window.open(r,e,t||"noreferrer noopener")},async preloadImage(r){const e=new Promise((t,n)=>{const i=new Image;i.onload=t,i.onerror=n,i.crossOrigin="anonymous",i.src=r});return Promise.race([e,ot.wait(2e3)])},formatBalance(r,e){let t="0.000";if(typeof r=="string"){const n=Number(r);if(n){const i=Math.floor(n*1e3)/1e3;i&&(t=i.toString())}}return`${t}${e?` ${e}`:""}`},formatBalance2(r,e){var n;let t;if(r==="0")t="0";else if(typeof r=="string"){const i=Number(r);i&&(t=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:t??"0",rest:t==="0"?"000":"",symbol:e}},getApiUrl(){return vn.W3M_API_URL},getBlockchainApiUrl(){return vn.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return vn.PULSE_API_URL},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,r=>{const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})},parseError(r){var e,t;return typeof r=="string"?r:typeof((t=(e=r==null?void 0:r.issues)==null?void 0:e[0])==null?void 0:t.message)=="string"?r.issues[0].message:r instanceof Error?r.message:"Unknown error"},sortRequestedNetworks(r,e=[]){const t={};return e&&r&&(r.forEach((n,i)=>{t[n]=i}),e.sort((n,i)=>{const s=t[n.id],o=t[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(r){let e=0;for(const t of r)e+=t.value??0;return e},formatTokenBalance(r){const e=r.toFixed(2),[t,n]=e.split(".");return{dollars:t,pennies:n}},isAddress(r){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(r)||/^(?:0x)?[0-9A-F]{40}$/iu.test(r))return!0}else return!1;return!1},uniqueBy(r,e){const t=new Set;return r.filter(n=>{const i=n[e];return t.has(i)?!1:(t.add(i),!0)})}};async function B2(...r){const e=await fetch(...r);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}class n_{constructor({baseUrl:e,clientId:t}){this.baseUrl=e,this.clientId=t}async get({headers:e,signal:t,cache:n,...i}){const s=this.createUrl(i);return(await B2(s,{method:"GET",headers:e,signal:t,cache:n})).json()}async getBlob({headers:e,signal:t,...n}){const i=this.createUrl(n);return(await B2(i,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await B2(s,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await B2(s,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:t,signal:n,...i}){const s=this.createUrl(i);return(await B2(s,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:t}){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),this.clientId&&n.searchParams.append("clientId",this.clientId),n}}const lE="WALLETCONNECT_DEEPLINK_CHOICE",cP="@w3m/recent",lP="@w3m/connected_connector",uP="@w3m/connected_social",eie="@w3m-storage/SOCIAL_USERNAME",en={setWalletConnectDeepLink({href:r,name:e}){try{localStorage.setItem(lE,JSON.stringify({href:r,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const r=localStorage.getItem(lE);if(r)return JSON.parse(r)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(lE)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(r){try{const e=en.getRecentWallets();e.find(n=>n.id===r.id)||(e.unshift(r),e.length>2&&e.pop(),localStorage.setItem(cP,JSON.stringify(e)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const r=localStorage.getItem(cP);return r?JSON.parse(r):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedConnector(r){try{localStorage.setItem(lP,r)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(lP)}catch{console.info("Unable to get Connected Connector")}},setConnectedSocialProvider(r){try{localStorage.setItem(uP,r)}catch{console.info("Unable to set Connected Social Provider")}},getConnectedSocialProvider(){try{return localStorage.getItem(uP)}catch{console.info("Unable to get Connected Social Provider")}},getConnectedSocialUsername(){try{return localStorage.getItem(eie)}catch{console.info("Unable to get Connected Social Username")}}},Da=ei({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),Jn={state:Da,subscribeNetworkImages(r){return Ms(Da.networkImages,()=>r(Da.networkImages))},subscribeKey(r,e){return po(Da,r,e)},subscribe(r){return Ms(Da,()=>r(Da))},setWalletImage(r,e){Da.walletImages[r]=e},setNetworkImage(r,e){Da.networkImages[r]=e},setChainImage(r,e){Da.chainImages[r]=e},setConnectorImage(r,e){Da.connectorImages[r]=e},setTokenImage(r,e){Da.tokenImages[r]=e},setCurrencyImage(r,e){Da.currencyImages[r]=e}},gh=ei({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),ii={state:gh,subscribe(r){return Ms(gh,()=>r(gh))},setThemeMode(r){gh.themeMode=r;try{const e=Mt.getAuthConnector();if(e){const t=ii.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:r,themeVariables:t,w3mThemeVariables:Rf(t,r)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(r){gh.themeVariables={...gh.themeVariables,...r};try{const e=Mt.getAuthConnector();if(e){const t=ii.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:t,w3mThemeVariables:Rf(gh.themeVariables,gh.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot(){return BU(gh)}},Ol=ei({unMergedConnectors:[],connectors:[]}),Mt={state:Ol,subscribeKey(r,e){return po(Ol,r,e)},setConnectors(r){r.forEach(this.syncIfAuthConnector),Ol.unMergedConnectors=[...Ol.unMergedConnectors,...r],Ol.connectors=this.mergeMultiChainConnectors(Ol.unMergedConnectors)},mergeMultiChainConnectors(r){const e=this.generateConnectorMapByName(r);return Array.from(e.values()).map(n=>{var i,s,o;return n.length>1?{name:(i=n[0])==null?void 0:i.name,imageUrl:(s=n[0])==null?void 0:s.imageUrl,imageId:(o=n[0])==null?void 0:o.imageId,providers:this.getUniqueConnectorsByName(n),type:"MULTI_CHAIN"}:n[0]})},generateConnectorMapByName(r){const e=new Map;return r.forEach(t=>{const{name:n}=t;if(!n)return;const i=e.get(n)||[];i.find(o=>o.chain===t.chain)||i.push(t),e.set(n,i)}),e},getUniqueConnectorsByName(r){const e=[];return r.forEach(t=>{e.find(n=>n.chain===t.chain)||e.push({...t,name:vn.CHAIN_NAME_MAP[t.chain]})}),e},addConnector(r){this.setConnectors([r])},getAuthConnector(){return Ol.connectors.find(r=>r.type==="AUTH")},getAnnouncedConnectorRdns(){return Ol.connectors.filter(r=>r.type==="ANNOUNCED").map(r=>{var e;return(e=r.info)==null?void 0:e.rdns})},getConnectors(){return Ol.connectors},getConnector(r,e){return Ol.connectors.find(t=>{var n;return t.explorerId===r||((n=t.info)==null?void 0:n.rdns)===e})},syncIfAuthConnector(r){var s,o;if(r.id!=="w3mAuth")return;const e=r,t=BU(bt.state),n=ii.getSnapshot().themeMode,i=ii.getSnapshot().themeVariables;(o=(s=e==null?void 0:e.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:t.metadata,sdkVersion:t.sdkVersion,projectId:t.projectId}),e.provider.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:Rf(i,n)})}},tie=ot.getAnalyticsUrl(),rie=new n_({baseUrl:tie,clientId:null}),nie=["MODAL_CREATED"],ig=ei({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),It={state:ig,subscribe(r){return Ms(ig,()=>r(ig))},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=bt.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},async _sendAnalyticsEvent(r){try{if(nie.includes(r.data.event)||typeof window>"u")return;await rie.post({path:"/e",headers:It._getApiHeaders(),body:{eventId:ot.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:r.timestamp,props:r.data}})}catch{}},sendEvent(r){ig.timestamp=Date.now(),ig.data=r,bt.state.enableAnalytics&&It._sendAnalyticsEvent(ig)}},L2=ei({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0}),pu={state:L2,subscribe(r){return Ms(L2,()=>r(L2))},set(r){Object.assign(L2,{...L2,...r})}},iie={isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]},sie={supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]},zr=ei({chains:Hne(),activeChain:void 0,activeCaipNetwork:void 0}),st={state:zr,subscribeKey(r,e){return po(zr,r,e)},subscribeChain(r){let e;return Ms(zr.chains,()=>{const t=zr.activeChain;if(t){const n=zr.chains.get(t);(!e||e!==n)&&(e=n,r(n))}})},subscribeChainProp(r,e){let t;return Ms(zr.chains,()=>{var i;const n=zr.activeChain;if(n){const s=(i=zr.chains.get(n))==null?void 0:i[r];t!==s&&(t=s,e(s))}})},initialize(r){const e=r==null?void 0:r[0];if(!e)throw new Error("Adapter is required to initialize ChainController");zr.activeChain=e.chain,pu.set({activeChain:e.chain}),this.setActiveCaipNetwork(e.defaultChain),r.forEach(t=>{zr.chains.set(t.chain,{chain:t.chain,connectionControllerClient:t.connectionControllerClient,networkControllerClient:t.networkControllerClient,accountState:iie,networkState:sie})})},setChainNetworkData(r,e,t=!1){if(!r)throw new Error("Chain is required to update chain network data");const n=zr.chains.get(r);n&&(n.networkState=oa({...n.networkState,...e}),zr.chains.set(r,oa(n)),(t||zr.chains.size===1||zr.activeChain===r)&&it.replaceState(n.networkState))},setChainAccountData(r,e,t=!0){if(!r)throw new Error("Chain is required to update chain account data");const n=zr.chains.get(r);n&&(n.accountState=oa({...n.accountState,...e}),zr.chains.set(r,n),(t||zr.chains.size===1||zr.activeChain===r)&&De.replaceState(n.accountState))},setAccountProp(r,e,t){this.setChainAccountData(t,{[r]:e})},setActiveChain(r){var t,n,i,s,o;const e=r?zr.chains.get(r):void 0;e&&e.chain!==zr.activeChain&&(zr.activeChain=e.chain,zr.activeCaipNetwork=(t=e.networkState)!=null&&t.caipNetwork?oa((n=e.networkState)==null?void 0:n.caipNetwork):void 0,De.replaceState(e.accountState),it.replaceState(e.networkState),this.setCaipNetwork(e.chain,(i=e.networkState)==null?void 0:i.caipNetwork),pu.set({activeChain:r,selectedNetworkId:(o=(s=e.networkState)==null?void 0:s.caipNetwork)==null?void 0:o.id}))},setActiveCaipNetwork(r){r&&(r.chain!==zr.activeChain&&this.setActiveChain(r.chain),zr.activeCaipNetwork=oa(r),zr.activeChain=r.chain,this.setCaipNetwork(r.chain,r,!0),pu.set({activeChain:r.chain,selectedNetworkId:r==null?void 0:r.id}))},setCaipNetwork(r,e,t=!1){this.setChainNetworkData(r,{caipNetwork:e},t)},setActiveConnector(r){r&&(zr.activeConnector=oa(r))},getNetworkControllerClient(){const r=zr.activeChain;if(!r)throw new Error("Chain is required to get network controller client");const e=zr.chains.get(r);if(!e)throw new Error("Chain adapter not found");if(!e.networkControllerClient)throw new Error("NetworkController client not set");return e.networkControllerClient},getConnectionControllerClient(r){const e=r||zr.activeChain;if(!e)throw new Error("Chain is required to get connection controller client");const t=zr.chains.get(e);if(!t)throw new Error("Chain adapter not found");if(!t.connectionControllerClient)throw new Error("ConnectionController client not set");return t.connectionControllerClient},getAccountProp(r,e){var i;let t=zr.activeChain;if(e&&(t=e),!t)return;const n=(i=zr.chains.get(t))==null?void 0:i.accountState;if(n)return n[r]},getNetworkProp(r){var n;const e=zr.activeChain;if(!e)return;const t=(n=zr.chains.get(e))==null?void 0:n.networkState;if(t)return t[r]},resetAccount(r){const e=r;if(!e)throw new Error("Chain is required to set account prop");this.setChainAccountData(e,oa({isConnected:!1,smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:void 0,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0}))}},uE=ei({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),it={state:uE,replaceState(r){r&&Object.assign(uE,oa(r))},subscribeKey(r,e){let t;return st.subscribeChainProp("networkState",n=>{if(n){const i=n[r];t!==i&&(t=i,e(i))}})},_getClient(){return st.getNetworkControllerClient()},initializeDefaultNetwork(){const r=this.getRequestedCaipNetworks();r.length>0&&this.setCaipNetwork(r[0])},setDefaultCaipNetwork(r){r&&(st.setCaipNetwork(r.chain,r,!0),st.setChainNetworkData(r.chain,{isDefaultCaipNetwork:!0}),pu.set({selectedNetworkId:r.id}))},setActiveCaipNetwork(r){var e,t;r&&(st.setActiveCaipNetwork(r),st.setChainNetworkData(r.chain,{caipNetwork:r}),pu.set({activeChain:r.chain,selectedNetworkId:r==null?void 0:r.id}),(t=(e=st.state.chains.get(r.chain))==null?void 0:e.networkState)!=null&&t.allowUnsupportedChain||this.checkIfSupportedNetwork()||this.showUnsupportedChainUI())},setCaipNetwork(r){var e,t;if(r){if(!(r!=null&&r.chain))throw new Error("chain is required to set active network");st.setCaipNetwork(r==null?void 0:r.chain,r),(t=(e=st.state.chains.get(r.chain))==null?void 0:e.networkState)!=null&&t.allowUnsupportedChain||this.checkIfSupportedNetwork()||this.showUnsupportedChainUI()}},setRequestedCaipNetworks(r,e){st.setChainNetworkData(e,{requestedCaipNetworks:r})},setAllowUnsupportedChain(r,e){st.setChainNetworkData(e||st.state.activeChain,{allowUnsupportedChain:r})},setSmartAccountEnabledNetworks(r,e){st.setChainNetworkData(e,{smartAccountEnabledNetworks:r})},getRequestedCaipNetworks(r){let e;if(!st.state.activeChain)throw new Error("activeChain is required to get requested networks");if(r){const s=r;if(!s)throw new Error("chain is required to get requested networks");e=[s]}else e=[...st.state.chains.keys()];const t=[],n=[];return e.forEach(s=>{var o,a,c,l,h,f,v,y;(a=(o=st.state.chains.get(s))==null?void 0:o.networkState)!=null&&a.approvedCaipNetworkIds&&t.push(...((l=(c=st.state.chains.get(s))==null?void 0:c.networkState)==null?void 0:l.approvedCaipNetworkIds)||[]),(f=(h=st.state.chains.get(s))==null?void 0:h.networkState)!=null&&f.requestedCaipNetworks&&n.push(...((y=(v=st.state.chains.get(s))==null?void 0:v.networkState)==null?void 0:y.requestedCaipNetworks)||[])}),ot.sortRequestedNetworks(t,n)},async switchActiveNetwork(r){var t;const e=r?(t=st.state.chains.get(r.chain))==null?void 0:t.networkControllerClient:void 0;if(!e)throw new Error("networkControllerClient not found for given network object");st.setActiveCaipNetwork(r),await(e==null?void 0:e.switchCaipNetwork(r)),r&&It.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:r.id}})},getApprovedCaipNetworkIds(r){var t,n;if(r){const i=r;if(!i)throw new Error("chain is required to get approved network IDs");return(n=(t=st.state.chains.get(i))==null?void 0:t.networkState)==null?void 0:n.approvedCaipNetworkIds}const e=[];return Object.values(st.state.chains).forEach(i=>{var s;i.networkState.approvedCaipNetworkIds&&e.push(...((s=i.networkState)==null?void 0:s.approvedCaipNetworkIds)||[])}),e},async setApprovedCaipNetworksData(r){const t=await st.getNetworkControllerClient().getApprovedCaipNetworksData();if(!r)throw new Error("chain is required to set approved network data");st.setChainNetworkData(r,{approvedCaipNetworkIds:t==null?void 0:t.approvedCaipNetworkIds,supportsAllNetworks:(t==null?void 0:t.supportsAllNetworks)||!1})},checkIfSupportedNetwork(){var n,i;const r=st.state.activeChain;if(!r)return!1;const e=(i=(n=st.state.chains.get(r))==null?void 0:n.networkState)==null?void 0:i.caipNetwork,t=this.getRequestedCaipNetworks();return t.length?t==null?void 0:t.some(s=>s.id===(e==null?void 0:e.id)):!0},checkIfSmartAccountEnabled(){var n;const r=$c.caipNetworkIdToNumber((n=uE.caipNetwork)==null?void 0:n.id);if(!st.state.activeChain)throw new Error("activeChain is required to check if smart account is enabled");if(!r)return!1;const t=st.getNetworkProp("smartAccountEnabledNetworks");return!!(t!=null&&t.includes(r))},resetNetwork(){const r=st.state.activeChain;if(!r)throw new Error("chain is required to reset network");st.setChainNetworkData(r,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]})},getSupportsAllNetworks(){var e,t;const r=st.state.activeChain;if(!r)throw new Error("chain is required to check if network supports all networks");return(t=(e=st.state.chains.get(r))==null?void 0:e.networkState)==null?void 0:t.supportsAllNetworks},showUnsupportedChainUI(){setTimeout(()=>{nr.open({view:"UnsupportedChain"})},300)}},oie=ot.getApiUrl(),ys=new n_({baseUrl:oie,clientId:null}),aie="40",hP="4",cie=20,Hi=ei({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1,excludedRDNS:[]}),Yt={state:Hi,subscribeKey(r,e){return po(Hi,r,e)},_getApiHeaders(){const{projectId:r,sdkType:e,sdkVersion:t}=bt.state;return{"x-project-id":r,"x-sdk-type":e,"x-sdk-version":t}},_filterOutExtensions(r){return bt.state.isUniversalProvider?r.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):r},async _fetchWalletImage(r){const e=`${ys.baseUrl}/getWalletImage/${r}`,t=await ys.getBlob({path:e,headers:Yt._getApiHeaders()});Jn.setWalletImage(r,URL.createObjectURL(t))},async _fetchNetworkImage(r){const e=`${ys.baseUrl}/public/getAssetImage/${r}`,t=await ys.getBlob({path:e,headers:Yt._getApiHeaders()});Jn.setNetworkImage(r,URL.createObjectURL(t))},async _fetchConnectorImage(r){const e=`${ys.baseUrl}/public/getAssetImage/${r}`,t=await ys.getBlob({path:e,headers:Yt._getApiHeaders()});Jn.setConnectorImage(r,URL.createObjectURL(t))},async _fetchCurrencyImage(r){const e=`${ys.baseUrl}/public/getCurrencyImage/${r}`,t=await ys.getBlob({path:e,headers:Yt._getApiHeaders()});Jn.setCurrencyImage(r,URL.createObjectURL(t))},async _fetchTokenImage(r){const e=`${ys.baseUrl}/public/getTokenImage/${r}`,t=await ys.getBlob({path:e,headers:Yt._getApiHeaders()});Jn.setTokenImage(r,URL.createObjectURL(t))},async fetchNetworkImages(){const r=it.getRequestedCaipNetworks(),e=r==null?void 0:r.map(({imageId:t})=>t).filter(Boolean);e&&await Promise.allSettled(e.map(t=>Yt._fetchNetworkImage(t)))},async fetchConnectorImages(){const{connectors:r}=Mt.state,e=r.map(({imageId:t})=>t).filter(Boolean);await Promise.allSettled(e.map(t=>Yt._fetchConnectorImage(t)))},async fetchCurrencyImages(r=[]){await Promise.allSettled(r.map(e=>Yt._fetchCurrencyImage(e)))},async fetchTokenImages(r=[]){await Promise.allSettled(r.map(e=>Yt._fetchTokenImage(e)))},async fetchFeaturedWallets(){const{featuredWalletIds:r}=bt.state;if(r!=null&&r.length){const{data:e}=await ys.get({path:"/getWallets",headers:Yt._getApiHeaders(),params:{page:"1",entries:r!=null&&r.length?String(r.length):hP,include:r==null?void 0:r.join(",")}});e.sort((n,i)=>r.indexOf(n.id)-r.indexOf(i.id));const t=e.map(n=>n.image_id).filter(Boolean);await Promise.allSettled(t.map(n=>Yt._fetchWalletImage(n))),Hi.featured=e}},async fetchRecommendedWallets(){var l;const{includeWalletIds:r,excludeWalletIds:e,featuredWalletIds:t}=bt.state,n=[...e??[],...t??[]].filter(Boolean),{data:i,count:s}=await ys.get({path:"/getWallets",headers:Yt._getApiHeaders(),params:{page:"1",chains:(l=it.state.caipNetwork)==null?void 0:l.id,entries:hP,include:r==null?void 0:r.join(","),exclude:n==null?void 0:n.join(",")}}),o=en.getRecentWallets(),a=i.map(h=>h.image_id).filter(Boolean),c=o.map(h=>h.image_id).filter(Boolean);await Promise.allSettled([...a,...c].map(h=>Yt._fetchWalletImage(h))),Hi.recommended=i,Hi.count=s??0},async fetchWallets({page:r}){var c;const{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:n}=bt.state,i=[...Hi.recommended.map(({id:l})=>l),...t??[],...n??[]].filter(Boolean),{data:s,count:o}=await ys.get({path:"/getWallets",headers:Yt._getApiHeaders(),params:{page:String(r),entries:aie,chains:(c=it.state.caipNetwork)==null?void 0:c.id,include:e==null?void 0:e.join(","),exclude:i.join(",")}}),a=s.slice(0,cie).map(l=>l.image_id).filter(Boolean);await Promise.allSettled(a.map(l=>Yt._fetchWalletImage(l))),Hi.wallets=ot.uniqueBy([...Hi.wallets,...Yt._filterOutExtensions(s)],"id"),Hi.count=o>Hi.count?o:Hi.count,Hi.page=r},async searchWalletByIds({ids:r}){var t;const{data:e}=await ys.get({path:"/getWallets",headers:Yt._getApiHeaders(),params:{page:"1",entries:String(r.length),chains:(t=it.state.caipNetwork)==null?void 0:t.id,include:r==null?void 0:r.join(",")}});e&&e.forEach(n=>{n!=null&&n.rdns&&Hi.excludedRDNS.push(n.rdns)})},async searchWallet({search:r}){var s;const{includeWalletIds:e,excludeWalletIds:t}=bt.state;Hi.search=[];const{data:n}=await ys.get({path:"/getWallets",headers:Yt._getApiHeaders(),params:{page:"1",entries:"100",search:r==null?void 0:r.trim(),chains:(s=it.state.caipNetwork)==null?void 0:s.id,include:e==null?void 0:e.join(","),exclude:t==null?void 0:t.join(",")}}),i=n.map(o=>o.image_id).filter(Boolean);await Promise.allSettled([...i.map(o=>Yt._fetchWalletImage(o)),ot.wait(300)]),Hi.search=Yt._filterOutExtensions(n)},async reFetchWallets(){Hi.page=1,Hi.wallets=[],await Yt.fetchFeaturedWallets(),await Yt.fetchRecommendedWallets()},prefetch(){const r=[Yt.fetchFeaturedWallets(),Yt.fetchRecommendedWallets(),Yt.fetchNetworkImages(),Yt.fetchConnectorImages()];bt.state.enableAnalytics===void 0&&r.push(Yt.fetchAnalyticsConfig()),Hi.prefetchPromise=Promise.race([Promise.allSettled(r)])},async fetchAnalyticsConfig(){const{isAnalyticsEnabled:r}=await ys.get({path:"/getAnalyticsConfig",headers:Yt._getApiHeaders()});bt.setEnableAnalytics(r)}},ri=ei({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),bt={state:ri,subscribeKey(r,e){return po(ri,r,e)},setOptions(r){Object.assign(ri,r)},setProjectId(r){ri.projectId=r},setAllWallets(r){ri.allWallets=r},setIncludeWalletIds(r){ri.includeWalletIds=r},setExcludeWalletIds(r){ri.excludeWalletIds=r,r&&Yt.searchWalletByIds({ids:r})},setFeaturedWalletIds(r){ri.featuredWalletIds=r},setTokens(r){ri.tokens=r},setTermsConditionsUrl(r){ri.termsConditionsUrl=r},setPrivacyPolicyUrl(r){ri.privacyPolicyUrl=r},setCustomWallets(r){ri.customWallets=r},setIsSiweEnabled(r){ri.isSiweEnabled=r},setIsUniversalProvider(r){ri.isUniversalProvider=r},setEnableAnalytics(r){ri.enableAnalytics=r},setSdkVersion(r){ri.sdkVersion=r},setMetadata(r){ri.metadata=r},setOnrampEnabled(r){ri.enableOnramp=r},setDisableAppend(r){ri.disableAppend=r},setEIP6963Enabled(r){ri.enableEIP6963=r},setHasMultipleAddresses(r){ri.hasMultipleAddresses=r},setEnableSwaps(r){ri.enableSwaps=r}},lie={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},zU=ot.getBlockchainApiUrl(),xi=ei({clientId:null,api:new n_({baseUrl:zU,clientId:null})}),Hn={state:xi,fetchIdentity({address:r}){return xi.api.get({path:`/v1/identity/${r}`,params:{projectId:bt.state.projectId,sender:De.state.address}})},fetchTransactions({account:r,projectId:e,cursor:t,onramp:n,signal:i,cache:s,chainId:o}){return xi.api.get({path:`/v1/account/${r}/history`,params:{projectId:e,cursor:t,onramp:n,chainId:o},signal:i,cache:s})},fetchSwapQuote({projectId:r,amount:e,userAddress:t,from:n,to:i,gasPrice:s}){return xi.api.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{projectId:r,amount:e,userAddress:t,from:n,to:i,gasPrice:s}})},fetchSwapTokens({projectId:r,chainId:e}){return xi.api.get({path:"/v1/convert/tokens",params:{projectId:r,chainId:e}})},fetchTokenPrice({projectId:r,addresses:e}){return xi.api.post({path:"/v1/fungible/price",body:{projectId:r,currency:"usd",addresses:e},headers:{"Content-Type":"application/json"}})},fetchSwapAllowance({projectId:r,tokenAddress:e,userAddress:t}){const{sdkType:n,sdkVersion:i}=bt.state;return xi.api.get({path:"/v1/convert/allowance",params:{projectId:r,tokenAddress:e,userAddress:t},headers:{"Content-Type":"application/json","x-sdk-type":n,"x-sdk-version":i}})},fetchGasPrice({projectId:r,chainId:e}){const{sdkType:t,sdkVersion:n}=bt.state;return xi.api.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json","x-sdk-type":t,"x-sdk-version":n},params:{projectId:r,chainId:e}})},generateSwapCalldata({amount:r,from:e,projectId:t,to:n,userAddress:i}){return xi.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:r,eip155:{slippage:Ci.CONVERT_SLIPPAGE_TOLERANCE},from:e,projectId:t,to:n,userAddress:i}})},generateApproveCalldata({from:r,projectId:e,to:t,userAddress:n}){const{sdkType:i,sdkVersion:s}=bt.state;return xi.api.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":s},params:{projectId:e,userAddress:n,from:r,to:t}})},async getBalance(r,e,t){const{sdkType:n,sdkVersion:i}=bt.state;return xi.api.get({path:`/v1/account/${r}/balance`,headers:{"x-sdk-type":n,"x-sdk-version":i},params:{currency:"usd",projectId:bt.state.projectId,chainId:e,forceUpdate:t}})},async lookupEnsName(r){return xi.api.get({path:`/v1/profile/account/${r}${vn.WC_NAME_SUFFIX}`,params:{projectId:bt.state.projectId}})},async reverseLookupEnsName({address:r}){return xi.api.get({path:`/v1/profile/reverse/${r}`,params:{sender:De.state.address,projectId:bt.state.projectId}})},async getEnsNameSuggestions(r){return xi.api.get({path:`/v1/profile/suggestions/${r}`,params:{projectId:bt.state.projectId}})},async registerEnsName({coinType:r,address:e,message:t,signature:n}){return xi.api.post({path:"/v1/profile/account",body:{coin_type:r,address:e,message:t,signature:n},headers:{"Content-Type":"application/json"}})},async generateOnRampURL({destinationWallets:r,partnerUserId:e,defaultNetwork:t,purchaseAmount:n,paymentAmount:i}){return(await xi.api.post({path:"/v1/generators/onrampurl",params:{projectId:bt.state.projectId},body:{destinationWallets:r,defaultNetwork:t,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url},async getOnrampOptions(){try{return await xi.api.get({path:"/v1/onramp/options",params:{projectId:bt.state.projectId}})}catch{return lie}},async getOnrampQuote({purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}){try{return await xi.api.post({path:"/v1/onramp/quote",params:{projectId:bt.state.projectId},body:{purchaseCurrency:r,paymentCurrency:e,amount:t,network:n}})}catch{return{coinbaseFee:{amount:t,currency:e.id},networkFee:{amount:t,currency:e.id},paymentSubtotal:{amount:t,currency:e.id},paymentTotal:{amount:t,currency:e.id},purchaseAmount:{amount:t,currency:e.id},quoteId:"mocked-quote-id"}}},setClientId(r){xi.clientId=r,xi.api=new n_({baseUrl:zU,clientId:r})}},$a=ei({message:"",variant:"success",open:!1}),Vt={state:$a,subscribeKey(r,e){return po($a,r,e)},showLoading(r){$a.message=r,$a.variant="loading",$a.open=!0},showSuccess(r){$a.message=r,$a.variant="success",$a.open=!0},showError(r){const e=ot.parseError(r);$a.message=e,$a.variant="error",$a.open=!0},hide(){$a.open=!1}};var zw={},i_={};i_.byteLength=die;i_.toByteArray=pie;i_.fromByteArray=wie;var cu=[],Qa=[],uie=typeof Uint8Array<"u"?Uint8Array:Array,hE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var sg=0,hie=hE.length;sg0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function die(r){var e=VU(r),t=e[0],n=e[1];return(t+n)*3/4-n}function fie(r,e,t){return(e+t)*3/4-t}function pie(r){var e,t=VU(r),n=t[0],i=t[1],s=new uie(fie(r,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Qa[r.charCodeAt(c)]<<2|Qa[r.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=Qa[r.charCodeAt(c)]<<10|Qa[r.charCodeAt(c+1)]<<4|Qa[r.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function gie(r){return cu[r>>18&63]+cu[r>>12&63]+cu[r>>6&63]+cu[r&63]}function mie(r,e,t){for(var n,i=[],s=e;sa?a:o+s));return n===1?(e=r[t-1],i.push(cu[e>>2]+cu[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(cu[e>>10]+cu[e>>4&63]+cu[e<<2&63]+"=")),i.join("")}var sI={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */sI.read=function(r,e,t,n,i){var s,o,a=i*8-n-1,c=(1<>1,h=-7,f=t?i-1:0,v=t?-1:1,y=r[e+f];for(f+=v,s=y&(1<<-h)-1,y>>=-h,h+=a;h>0;s=s*256+r[e+f],f+=v,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=o*256+r[e+f],f+=v,h-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(y?-1:1)*o*Math.pow(2,s-n)};sI.write=function(r,e,t,n,i,s){var o,a,c,l=s*8-i-1,h=(1<>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,A=n?1:-1,M=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?e+=v/c:e+=v*Math.pow(2,1-f),e*c>=2&&(o++,c/=2),o+f>=h?(a=0,o=h):o+f>=1?(a=(e*c-1)*Math.pow(2,i),o=o+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;r[t+y]=a&255,y+=A,a/=256,i-=8);for(o=o<0;r[t+y]=o&255,y+=A,o/=256,l-=8);r[t+y-A]|=M*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(r){const e=i_,t=sI,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=P,r.INSPECT_MAX_BYTES=50;const i=2147483647;r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const X=new Uint8Array(1),N={foo:function(){return 42}};return Object.setPrototypeOf(N,Uint8Array.prototype),Object.setPrototypeOf(X,N),X.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(X){if(X>i)throw new RangeError('The value "'+X+'" is invalid for option "size"');const N=new Uint8Array(X);return Object.setPrototypeOf(N,a.prototype),N}function a(X,N,U){if(typeof X=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(X)}return c(X,N,U)}a.poolSize=8192;function c(X,N,U){if(typeof X=="string")return v(X,N);if(ArrayBuffer.isView(X))return A(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(xe(X,ArrayBuffer)||X&&xe(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(xe(X,SharedArrayBuffer)||X&&xe(X.buffer,SharedArrayBuffer)))return M(X,N,U);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ie=X.valueOf&&X.valueOf();if(ie!=null&&ie!==X)return a.from(ie,N,U);const le=$(X);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return a.from(X[Symbol.toPrimitive]("string"),N,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}a.from=function(X,N,U){return c(X,N,U)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function h(X,N,U){return l(X),X<=0?o(X):N!==void 0?typeof U=="string"?o(X).fill(N,U):o(X).fill(N):o(X)}a.alloc=function(X,N,U){return h(X,N,U)};function f(X){return l(X),o(X<0?0:L(X)|0)}a.allocUnsafe=function(X){return f(X)},a.allocUnsafeSlow=function(X){return f(X)};function v(X,N){if((typeof N!="string"||N==="")&&(N="utf8"),!a.isEncoding(N))throw new TypeError("Unknown encoding: "+N);const U=H(X,N)|0;let ie=o(U);const le=ie.write(X,N);return le!==U&&(ie=ie.slice(0,le)),ie}function y(X){const N=X.length<0?0:L(X.length)|0,U=o(N);for(let ie=0;ie=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return X|0}function P(X){return+X!=X&&(X=0),a.alloc(+X)}a.isBuffer=function(N){return N!=null&&N._isBuffer===!0&&N!==a.prototype},a.compare=function(N,U){if(xe(N,Uint8Array)&&(N=a.from(N,N.offset,N.byteLength)),xe(U,Uint8Array)&&(U=a.from(U,U.offset,U.byteLength)),!a.isBuffer(N)||!a.isBuffer(U))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(N===U)return 0;let ie=N.length,le=U.length;for(let me=0,Ee=Math.min(ie,le);mele.length?(a.isBuffer(Ee)||(Ee=a.from(Ee)),Ee.copy(le,me)):Uint8Array.prototype.set.call(le,Ee,me);else if(a.isBuffer(Ee))Ee.copy(le,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=Ee.length}return le};function H(X,N){if(a.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||xe(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);const U=X.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&U===0)return 0;let le=!1;for(;;)switch(N){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return we(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U*2;case"hex":return U>>>1;case"base64":return Ie(X).length;default:if(le)return ie?-1:we(X).length;N=(""+N).toLowerCase(),le=!0}}a.byteLength=H;function F(X,N,U){let ie=!1;if((N===void 0||N<0)&&(N=0),N>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0,N>>>=0,U<=N))return"";for(X||(X="utf8");;)switch(X){case"hex":return B(this,N,U);case"utf8":case"utf-8":return g(this,N,U);case"ascii":return E(this,N,U);case"latin1":case"binary":return C(this,N,U);case"base64":return d(this,N,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,N,U);default:if(ie)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),ie=!0}}a.prototype._isBuffer=!0;function q(X,N,U){const ie=X[N];X[N]=X[U],X[U]=ie}a.prototype.swap16=function(){const N=this.length;if(N%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;UU&&(N+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(N,U,ie,le,me){if(xe(N,Uint8Array)&&(N=a.from(N,N.offset,N.byteLength)),!a.isBuffer(N))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof N);if(U===void 0&&(U=0),ie===void 0&&(ie=N?N.length:0),le===void 0&&(le=0),me===void 0&&(me=this.length),U<0||ie>N.length||le<0||me>this.length)throw new RangeError("out of range index");if(le>=me&&U>=ie)return 0;if(le>=me)return-1;if(U>=ie)return 1;if(U>>>=0,ie>>>=0,le>>>=0,me>>>=0,this===N)return 0;let Ee=me-le,ze=ie-U;const qe=Math.min(Ee,ze),St=this.slice(le,me),Je=N.slice(U,ie);for(let nt=0;nt2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,$e(U)&&(U=le?0:X.length-1),U<0&&(U=X.length+U),U>=X.length){if(le)return-1;U=X.length-1}else if(U<0)if(le)U=0;else return-1;if(typeof N=="string"&&(N=a.from(N,ie)),a.isBuffer(N))return N.length===0?-1:I(X,N,U,ie,le);if(typeof N=="number")return N=N&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(X,N,U):Uint8Array.prototype.lastIndexOf.call(X,N,U):I(X,[N],U,ie,le);throw new TypeError("val must be string, number or Buffer")}function I(X,N,U,ie,le){let me=1,Ee=X.length,ze=N.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(X.length<2||N.length<2)return-1;me=2,Ee/=2,ze/=2,U/=2}function qe(Je,nt){return me===1?Je[nt]:Je.readUInt16BE(nt*me)}let St;if(le){let Je=-1;for(St=U;StEe&&(U=Ee-ze),St=U;St>=0;St--){let Je=!0;for(let nt=0;ntle&&(ie=le)):ie=le;const me=N.length;ie>me/2&&(ie=me/2);let Ee;for(Ee=0;Ee>>0,isFinite(ie)?(ie=ie>>>0,le===void 0&&(le="utf8")):(le=ie,ie=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const me=this.length-U;if((ie===void 0||ie>me)&&(ie=me),N.length>0&&(ie<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");let Ee=!1;for(;;)switch(le){case"hex":return T(this,N,U,ie);case"utf8":case"utf-8":return V(this,N,U,ie);case"ascii":case"latin1":case"binary":return Q(this,N,U,ie);case"base64":return te(this,N,U,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,N,U,ie);default:if(Ee)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Ee=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function d(X,N,U){return N===0&&U===X.length?e.fromByteArray(X):e.fromByteArray(X.slice(N,U))}function g(X,N,U){U=Math.min(X.length,U);const ie=[];let le=N;for(;le239?4:me>223?3:me>191?2:1;if(le+ze<=U){let qe,St,Je,nt;switch(ze){case 1:me<128&&(Ee=me);break;case 2:qe=X[le+1],(qe&192)===128&&(nt=(me&31)<<6|qe&63,nt>127&&(Ee=nt));break;case 3:qe=X[le+1],St=X[le+2],(qe&192)===128&&(St&192)===128&&(nt=(me&15)<<12|(qe&63)<<6|St&63,nt>2047&&(nt<55296||nt>57343)&&(Ee=nt));break;case 4:qe=X[le+1],St=X[le+2],Je=X[le+3],(qe&192)===128&&(St&192)===128&&(Je&192)===128&&(nt=(me&15)<<18|(qe&63)<<12|(St&63)<<6|Je&63,nt>65535&&nt<1114112&&(Ee=nt))}}Ee===null?(Ee=65533,ze=1):Ee>65535&&(Ee-=65536,ie.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),ie.push(Ee),le+=ze}return b(ie)}const m=4096;function b(X){const N=X.length;if(N<=m)return String.fromCharCode.apply(String,X);let U="",ie=0;for(;ieie)&&(U=ie);let le="";for(let me=N;meie&&(N=ie),U<0?(U+=ie,U<0&&(U=0)):U>ie&&(U=ie),UU)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(N,U,ie){N=N>>>0,U=U>>>0,ie||w(N,U,this.length);let le=this[N],me=1,Ee=0;for(;++Ee>>0,U=U>>>0,ie||w(N,U,this.length);let le=this[N+--U],me=1;for(;U>0&&(me*=256);)le+=this[N+--U]*me;return le},a.prototype.readUint8=a.prototype.readUInt8=function(N,U){return N=N>>>0,U||w(N,1,this.length),this[N]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(N,U){return N=N>>>0,U||w(N,2,this.length),this[N]|this[N+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(N,U){return N=N>>>0,U||w(N,2,this.length),this[N]<<8|this[N+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(N,U){return N=N>>>0,U||w(N,4,this.length),(this[N]|this[N+1]<<8|this[N+2]<<16)+this[N+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(N,U){return N=N>>>0,U||w(N,4,this.length),this[N]*16777216+(this[N+1]<<16|this[N+2]<<8|this[N+3])},a.prototype.readBigUInt64LE=Ne(function(N){N=N>>>0,z(N,"offset");const U=this[N],ie=this[N+7];(U===void 0||ie===void 0)&&K(N,this.length-8);const le=U+this[++N]*2**8+this[++N]*2**16+this[++N]*2**24,me=this[++N]+this[++N]*2**8+this[++N]*2**16+ie*2**24;return BigInt(le)+(BigInt(me)<>>0,z(N,"offset");const U=this[N],ie=this[N+7];(U===void 0||ie===void 0)&&K(N,this.length-8);const le=U*2**24+this[++N]*2**16+this[++N]*2**8+this[++N],me=this[++N]*2**24+this[++N]*2**16+this[++N]*2**8+ie;return(BigInt(le)<>>0,U=U>>>0,ie||w(N,U,this.length);let le=this[N],me=1,Ee=0;for(;++Ee=me&&(le-=Math.pow(2,8*U)),le},a.prototype.readIntBE=function(N,U,ie){N=N>>>0,U=U>>>0,ie||w(N,U,this.length);let le=U,me=1,Ee=this[N+--le];for(;le>0&&(me*=256);)Ee+=this[N+--le]*me;return me*=128,Ee>=me&&(Ee-=Math.pow(2,8*U)),Ee},a.prototype.readInt8=function(N,U){return N=N>>>0,U||w(N,1,this.length),this[N]&128?(255-this[N]+1)*-1:this[N]},a.prototype.readInt16LE=function(N,U){N=N>>>0,U||w(N,2,this.length);const ie=this[N]|this[N+1]<<8;return ie&32768?ie|4294901760:ie},a.prototype.readInt16BE=function(N,U){N=N>>>0,U||w(N,2,this.length);const ie=this[N+1]|this[N]<<8;return ie&32768?ie|4294901760:ie},a.prototype.readInt32LE=function(N,U){return N=N>>>0,U||w(N,4,this.length),this[N]|this[N+1]<<8|this[N+2]<<16|this[N+3]<<24},a.prototype.readInt32BE=function(N,U){return N=N>>>0,U||w(N,4,this.length),this[N]<<24|this[N+1]<<16|this[N+2]<<8|this[N+3]},a.prototype.readBigInt64LE=Ne(function(N){N=N>>>0,z(N,"offset");const U=this[N],ie=this[N+7];(U===void 0||ie===void 0)&&K(N,this.length-8);const le=this[N+4]+this[N+5]*2**8+this[N+6]*2**16+(ie<<24);return(BigInt(le)<>>0,z(N,"offset");const U=this[N],ie=this[N+7];(U===void 0||ie===void 0)&&K(N,this.length-8);const le=(U<<24)+this[++N]*2**16+this[++N]*2**8+this[++N];return(BigInt(le)<>>0,U||w(N,4,this.length),t.read(this,N,!0,23,4)},a.prototype.readFloatBE=function(N,U){return N=N>>>0,U||w(N,4,this.length),t.read(this,N,!1,23,4)},a.prototype.readDoubleLE=function(N,U){return N=N>>>0,U||w(N,8,this.length),t.read(this,N,!0,52,8)},a.prototype.readDoubleBE=function(N,U){return N=N>>>0,U||w(N,8,this.length),t.read(this,N,!1,52,8)};function O(X,N,U,ie,le,me){if(!a.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>le||NX.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(N,U,ie,le){if(N=+N,U=U>>>0,ie=ie>>>0,!le){const ze=Math.pow(2,8*ie)-1;O(this,N,U,ie,ze,0)}let me=1,Ee=0;for(this[U]=N&255;++Ee>>0,ie=ie>>>0,!le){const ze=Math.pow(2,8*ie)-1;O(this,N,U,ie,ze,0)}let me=ie-1,Ee=1;for(this[U+me]=N&255;--me>=0&&(Ee*=256);)this[U+me]=N/Ee&255;return U+ie},a.prototype.writeUint8=a.prototype.writeUInt8=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,1,255,0),this[U]=N&255,U+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,2,65535,0),this[U]=N&255,this[U+1]=N>>>8,U+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,2,65535,0),this[U]=N>>>8,this[U+1]=N&255,U+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,4,4294967295,0),this[U+3]=N>>>24,this[U+2]=N>>>16,this[U+1]=N>>>8,this[U]=N&255,U+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,4,4294967295,0),this[U]=N>>>24,this[U+1]=N>>>16,this[U+2]=N>>>8,this[U+3]=N&255,U+4};function pe(X,N,U,ie,le){G(N,ie,le,X,U,7);let me=Number(N&BigInt(4294967295));X[U++]=me,me=me>>8,X[U++]=me,me=me>>8,X[U++]=me,me=me>>8,X[U++]=me;let Ee=Number(N>>BigInt(32)&BigInt(4294967295));return X[U++]=Ee,Ee=Ee>>8,X[U++]=Ee,Ee=Ee>>8,X[U++]=Ee,Ee=Ee>>8,X[U++]=Ee,U}function be(X,N,U,ie,le){G(N,ie,le,X,U,7);let me=Number(N&BigInt(4294967295));X[U+7]=me,me=me>>8,X[U+6]=me,me=me>>8,X[U+5]=me,me=me>>8,X[U+4]=me;let Ee=Number(N>>BigInt(32)&BigInt(4294967295));return X[U+3]=Ee,Ee=Ee>>8,X[U+2]=Ee,Ee=Ee>>8,X[U+1]=Ee,Ee=Ee>>8,X[U]=Ee,U+8}a.prototype.writeBigUInt64LE=Ne(function(N,U=0){return pe(this,N,U,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ne(function(N,U=0){return be(this,N,U,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(N,U,ie,le){if(N=+N,U=U>>>0,!le){const qe=Math.pow(2,8*ie-1);O(this,N,U,ie,qe-1,-qe)}let me=0,Ee=1,ze=0;for(this[U]=N&255;++me>0)-ze&255;return U+ie},a.prototype.writeIntBE=function(N,U,ie,le){if(N=+N,U=U>>>0,!le){const qe=Math.pow(2,8*ie-1);O(this,N,U,ie,qe-1,-qe)}let me=ie-1,Ee=1,ze=0;for(this[U+me]=N&255;--me>=0&&(Ee*=256);)N<0&&ze===0&&this[U+me+1]!==0&&(ze=1),this[U+me]=(N/Ee>>0)-ze&255;return U+ie},a.prototype.writeInt8=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,1,127,-128),N<0&&(N=255+N+1),this[U]=N&255,U+1},a.prototype.writeInt16LE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,2,32767,-32768),this[U]=N&255,this[U+1]=N>>>8,U+2},a.prototype.writeInt16BE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,2,32767,-32768),this[U]=N>>>8,this[U+1]=N&255,U+2},a.prototype.writeInt32LE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,4,2147483647,-2147483648),this[U]=N&255,this[U+1]=N>>>8,this[U+2]=N>>>16,this[U+3]=N>>>24,U+4},a.prototype.writeInt32BE=function(N,U,ie){return N=+N,U=U>>>0,ie||O(this,N,U,4,2147483647,-2147483648),N<0&&(N=4294967295+N+1),this[U]=N>>>24,this[U+1]=N>>>16,this[U+2]=N>>>8,this[U+3]=N&255,U+4},a.prototype.writeBigInt64LE=Ne(function(N,U=0){return pe(this,N,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ne(function(N,U=0){return be(this,N,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function x(X,N,U,ie,le,me){if(U+ie>X.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function Z(X,N,U,ie,le){return N=+N,U=U>>>0,le||x(X,N,U,4),t.write(X,N,U,ie,23,4),U+4}a.prototype.writeFloatLE=function(N,U,ie){return Z(this,N,U,!0,ie)},a.prototype.writeFloatBE=function(N,U,ie){return Z(this,N,U,!1,ie)};function k(X,N,U,ie,le){return N=+N,U=U>>>0,le||x(X,N,U,8),t.write(X,N,U,ie,52,8),U+8}a.prototype.writeDoubleLE=function(N,U,ie){return k(this,N,U,!0,ie)},a.prototype.writeDoubleBE=function(N,U,ie){return k(this,N,U,!1,ie)},a.prototype.copy=function(N,U,ie,le){if(!a.isBuffer(N))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),!le&&le!==0&&(le=this.length),U>=N.length&&(U=N.length),U||(U=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),N.length-U>>0,ie=ie===void 0?this.length:ie>>>0,N||(N=0);let me;if(typeof N=="number")for(me=U;me2**32?le=S(String(U)):typeof U=="bigint"&&(le=String(U),(U>BigInt(2)**BigInt(32)||U<-(BigInt(2)**BigInt(32)))&&(le=S(le)),le+="n"),ie+=` It must be ${N}. Received ${le}`,ie},RangeError);function S(X){let N="",U=X.length;const ie=X[0]==="-"?1:0;for(;U>=ie+4;U-=3)N=`_${X.slice(U-3,U)}${N}`;return`${X.slice(0,U)}${N}`}function D(X,N,U){z(N,"offset"),(X[N]===void 0||X[N+U]===void 0)&&K(N,X.length-(U+1))}function G(X,N,U,ie,le,me){if(X>U||X= 0${Ee} and < 2${Ee} ** ${(me+1)*8}${Ee}`:ze=`>= -(2${Ee} ** ${(me+1)*8-1}${Ee}) and < 2 ** ${(me+1)*8-1}${Ee}`,new W.ERR_OUT_OF_RANGE("value",ze,X)}D(ie,le,me)}function z(X,N){if(typeof X!="number")throw new W.ERR_INVALID_ARG_TYPE(N,"number",X)}function K(X,N,U){throw Math.floor(X)!==X?(z(X,U),new W.ERR_OUT_OF_RANGE("offset","an integer",X)):N<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${N}`,X)}const ue=/[^+/0-9A-Za-z-_]/g;function ye(X){if(X=X.split("=")[0],X=X.trim().replace(ue,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function we(X,N){N=N||1/0;let U;const ie=X.length;let le=null;const me=[];for(let Ee=0;Ee55295&&U<57344){if(!le){if(U>56319){(N-=3)>-1&&me.push(239,191,189);continue}else if(Ee+1===ie){(N-=3)>-1&&me.push(239,191,189);continue}le=U;continue}if(U<56320){(N-=3)>-1&&me.push(239,191,189),le=U;continue}U=(le-55296<<10|U-56320)+65536}else le&&(N-=3)>-1&&me.push(239,191,189);if(le=null,U<128){if((N-=1)<0)break;me.push(U)}else if(U<2048){if((N-=2)<0)break;me.push(U>>6|192,U&63|128)}else if(U<65536){if((N-=3)<0)break;me.push(U>>12|224,U>>6&63|128,U&63|128)}else if(U<1114112){if((N-=4)<0)break;me.push(U>>18|240,U>>12&63|128,U>>6&63|128,U&63|128)}else throw new Error("Invalid code point")}return me}function je(X){const N=[];for(let U=0;U>8,le=U%256,me.push(le),me.push(ie);return me}function Ie(X){return e.toByteArray(ye(X))}function Be(X,N,U,ie){let le;for(le=0;le=N.length||le>=X.length);++le)N[le+U]=X[le];return le}function xe(X,N){return X instanceof N||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===N.name}function $e(X){return X!==X}const We=function(){const X="0123456789abcdef",N=new Array(256);for(let U=0;U<16;++U){const ie=U*16;for(let le=0;le<16;++le)N[ie+le]=X[U]+X[le]}return N}();function Ne(X){return typeof BigInt>"u"?Ue:X}function Ue(){throw new Error("BigInt not supported")}})(zw);var pL;typeof window<"u"&&(window.Buffer||(window.Buffer=zw.Buffer),window.global||(window.global=window),window.process||(window.process={}),(pL=window.process)!=null&&pL.env||(window.process={env:{}}));var qU={};const vie=qU.NEXT_PUBLIC_SECURE_SITE_SDK_URL||"https://secure.walletconnect.org/sdk",yie=qU.NEXT_PUBLIC_DEFAULT_LOG_LEVEL||"error",Xt={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SOCIAL_USERNAME:"SOCIAL_USERNAME",SOCIAL:"@w3m/connected_social",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},_r={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter","wallet_getCapabilities","wallet_getCallsStatus"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","solana_signMessage","solana_signTransaction","solana_signAllTransactions","solana_signAndSendTransaction","wallet_sendCalls","wallet_grantPermissions"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}};var Xr;(function(r){r.assertEqual=i=>i;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},r.getValidEnumValues=i=>{const s=r.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return r.objectValues(o)},r.objectValues=i=>r.objectKeys(i).map(function(s){return i[s]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},r.find=(i,s)=>{for(const o of i)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=n,r.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Xr||(Xr={}));var C9;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(C9||(C9={}));const Nt=Xr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ef=r=>{switch(typeof r){case"undefined":return Nt.undefined;case"string":return Nt.string;case"number":return isNaN(r)?Nt.nan:Nt.number;case"boolean":return Nt.boolean;case"function":return Nt.function;case"bigint":return Nt.bigint;case"symbol":return Nt.symbol;case"object":return Array.isArray(r)?Nt.array:r===null?Nt.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?Nt.promise:typeof Map<"u"&&r instanceof Map?Nt.map:typeof Set<"u"&&r instanceof Set?Nt.set:typeof Date<"u"&&r instanceof Date?Nt.date:Nt.object;default:return Nt.unknown}},at=Xr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),bie=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class al extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let a=n,c=0;for(;ct.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}al.create=r=>new al(r);const Y3=(r,e)=>{let t;switch(r.code){case at.invalid_type:r.received===Nt.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case at.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Xr.jsonStringifyReplacer)}`;break;case at.unrecognized_keys:t=`Unrecognized key(s) in object: ${Xr.joinValues(r.keys,", ")}`;break;case at.invalid_union:t="Invalid input";break;case at.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Xr.joinValues(r.options)}`;break;case at.invalid_enum_value:t=`Invalid enum value. Expected ${Xr.joinValues(r.options)}, received '${r.received}'`;break;case at.invalid_arguments:t="Invalid function arguments";break;case at.invalid_return_type:t="Invalid function return type";break;case at.invalid_date:t="Invalid date";break;case at.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Xr.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case at.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case at.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case at.custom:t="Invalid input";break;case at.invalid_intersection_types:t="Intersection results could not be merged";break;case at.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case at.not_finite:t="Number must be finite";break;default:t=e.defaultError,Xr.assertNever(r)}return{message:t}};let KU=Y3;function _ie(r){KU=r}function l6(){return KU}const u6=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,s=[...t,...i.path||[]],o={...i,path:s};let a="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},xie=[];function Bt(r,e){const t=u6({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,l6(),Y3].filter(n=>!!n)});r.common.issues.push(t)}class Ds{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return dr;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t)n.push({key:await i.key,value:await i.value});return Ds.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return dr;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const dr=Object.freeze({status:"aborted"}),GU=r=>({status:"dirty",value:r}),oo=r=>({status:"valid",value:r}),S9=r=>r.status==="aborted",I9=r=>r.status==="dirty",Q3=r=>r.status==="valid",h6=r=>typeof Promise<"u"&&r instanceof Promise;var er;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(er||(er={}));class Ru{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dP=(r,e)=>{if(Q3(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new al(r.common.issues);return this._error=t,this._error}}};function xr(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n??a.defaultError}:{message:t??a.defaultError},description:i}}class kr{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ef(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ef(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ds,ctx:{common:e.parent.common,data:e.data,parsedType:ef(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(h6(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ef(e)},s=this._parseSync({data:e,path:i.path,parent:i});return dP(i,s)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ef(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(h6(i)?i:Promise.resolve(i));return dP(n,s)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:at.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new hl({schema:this,typeName:ar.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ed.create(this,this._def)}nullable(){return $p.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cl.create(this,this._def)}promise(){return rw.create(this,this._def)}or(e){return tv.create([this,e],this._def)}and(e){return rv.create(this,e,this._def)}transform(e){return new hl({...xr(this._def),schema:this,typeName:ar.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new av({...xr(this._def),innerType:this,defaultValue:t,typeName:ar.ZodDefault})}brand(){return new YU({typeName:ar.ZodBranded,type:this,...xr(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new g6({...xr(this._def),innerType:this,catchValue:t,typeName:ar.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ey.create(this,e)}readonly(){return w6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Aie=/^c[^\s-]{8,}$/i,Eie=/^[a-z][a-z0-9]*$/,Cie=/^[0-9A-HJKMNP-TV-Z]{26}$/,Sie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Iie=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Tie="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let dE;const Rie=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,kie=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Nie=r=>r.precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):r.precision===0?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Pie(r,e){return!!((e==="v4"||!e)&&Rie.test(r)||(e==="v6"||!e)&&kie.test(r))}class el extends kr{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Nt.string){const s=this._getOrReturnCtx(e);return Bt(s,{code:at.invalid_type,expected:Nt.string,received:s.parsedType}),dr}const n=new Ds;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.lengths.value&&(i=this._getOrReturnCtx(e,i),Bt(i,{code:at.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.lengthe.test(i),{validation:t,code:at.invalid_string,...er.errToObj(n)})}_addCheck(e){return new el({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...er.errToObj(e)})}url(e){return this._addCheck({kind:"url",...er.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...er.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...er.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...er.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...er.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...er.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...er.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...er.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...er.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...er.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...er.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...er.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...er.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...er.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...er.errToObj(t)})}nonempty(e){return this.min(1,er.errToObj(e))}trim(){return new el({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new el({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new el({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new el({checks:[],typeName:ar.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...xr(r)})};function Oie(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,s=parseInt(r.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class Lf extends kr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Nt.number){const s=this._getOrReturnCtx(e);return Bt(s,{code:at.invalid_type,expected:Nt.number,received:s.parsedType}),dr}let n;const i=new Ds;for(const s of this._def.checks)s.kind==="int"?Xr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Oie(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.not_finite,message:s.message}),i.dirty()):Xr.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,er.toString(t))}gt(e,t){return this.setLimit("min",e,!1,er.toString(t))}lte(e,t){return this.setLimit("max",e,!0,er.toString(t))}lt(e,t){return this.setLimit("max",e,!1,er.toString(t))}setLimit(e,t,n,i){return new Lf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:er.toString(i)}]})}_addCheck(e){return new Lf({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:er.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:er.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:er.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:er.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:er.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:er.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:er.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:er.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:er.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Xr.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew Lf({checks:[],typeName:ar.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...xr(r)});class Uf extends kr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Nt.bigint){const s=this._getOrReturnCtx(e);return Bt(s,{code:at.invalid_type,expected:Nt.bigint,received:s.parsedType}),dr}let n;const i=new Ds;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.datas.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Bt(n,{code:at.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Xr.assertNever(s);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,er.toString(t))}gt(e,t){return this.setLimit("min",e,!1,er.toString(t))}lte(e,t){return this.setLimit("max",e,!0,er.toString(t))}lt(e,t){return this.setLimit("max",e,!1,er.toString(t))}setLimit(e,t,n,i){return new Uf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:er.toString(i)}]})}_addCheck(e){return new Uf({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:er.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:er.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:er.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:er.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:er.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Uf({checks:[],typeName:ar.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...xr(r)})};class J3 extends kr{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Nt.boolean){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.boolean,received:n.parsedType}),dr}return oo(e.data)}}J3.create=r=>new J3({typeName:ar.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...xr(r)});class Mp extends kr{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Nt.date){const s=this._getOrReturnCtx(e);return Bt(s,{code:at.invalid_type,expected:Nt.date,received:s.parsedType}),dr}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Bt(s,{code:at.invalid_date}),dr}const n=new Ds;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()s.value&&(i=this._getOrReturnCtx(e,i),Bt(i,{code:at.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Xr.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mp({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:er.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:er.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Mp({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:ar.ZodDate,...xr(r)});class d6 extends kr{_parse(e){if(this._getType(e)!==Nt.symbol){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.symbol,received:n.parsedType}),dr}return oo(e.data)}}d6.create=r=>new d6({typeName:ar.ZodSymbol,...xr(r)});class X3 extends kr{_parse(e){if(this._getType(e)!==Nt.undefined){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.undefined,received:n.parsedType}),dr}return oo(e.data)}}X3.create=r=>new X3({typeName:ar.ZodUndefined,...xr(r)});class ev extends kr{_parse(e){if(this._getType(e)!==Nt.null){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.null,received:n.parsedType}),dr}return oo(e.data)}}ev.create=r=>new ev({typeName:ar.ZodNull,...xr(r)});class tw extends kr{constructor(){super(...arguments),this._any=!0}_parse(e){return oo(e.data)}}tw.create=r=>new tw({typeName:ar.ZodAny,...xr(r)});class Sp extends kr{constructor(){super(...arguments),this._unknown=!0}_parse(e){return oo(e.data)}}Sp.create=r=>new Sp({typeName:ar.ZodUnknown,...xr(r)});class nd extends kr{_parse(e){const t=this._getOrReturnCtx(e);return Bt(t,{code:at.invalid_type,expected:Nt.never,received:t.parsedType}),dr}}nd.create=r=>new nd({typeName:ar.ZodNever,...xr(r)});class f6 extends kr{_parse(e){if(this._getType(e)!==Nt.undefined){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.void,received:n.parsedType}),dr}return oo(e.data)}}f6.create=r=>new f6({typeName:ar.ZodVoid,...xr(r)});class cl extends kr{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Nt.array)return Bt(t,{code:at.invalid_type,expected:Nt.array,received:t.parsedType}),dr;if(i.exactLength!==null){const o=t.data.length>i.exactLength.value,a=t.data.lengthi.maxLength.value&&(Bt(t,{code:at.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,a)=>i.type._parseAsync(new Ru(t,o,t.path,a)))).then(o=>Ds.mergeArray(n,o));const s=[...t.data].map((o,a)=>i.type._parseSync(new Ru(t,o,t.path,a)));return Ds.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new cl({...this._def,minLength:{value:e,message:er.toString(t)}})}max(e,t){return new cl({...this._def,maxLength:{value:e,message:er.toString(t)}})}length(e,t){return new cl({...this._def,exactLength:{value:e,message:er.toString(t)}})}nonempty(e){return this.min(1,e)}}cl.create=(r,e)=>new cl({type:r,minLength:null,maxLength:null,exactLength:null,typeName:ar.ZodArray,...xr(e)});function _g(r){if(r instanceof Yn){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=ed.create(_g(n))}return new Yn({...r._def,shape:()=>e})}else return r instanceof cl?new cl({...r._def,type:_g(r.element)}):r instanceof ed?ed.create(_g(r.unwrap())):r instanceof $p?$p.create(_g(r.unwrap())):r instanceof ku?ku.create(r.items.map(e=>_g(e))):r}class Yn extends kr{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Xr.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Nt.object){const l=this._getOrReturnCtx(e);return Bt(l,{code:at.invalid_type,expected:Nt.object,received:l.parsedType}),dr}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof nd&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const h=s[l],f=i.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Ru(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof nd){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of a)c.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(l==="strict")a.length>0&&(Bt(i,{code:at.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of a){const f=i.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new Ru(i,f,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const f=await h.key;l.push({key:f,value:await h.value,alwaysSet:h.alwaysSet})}return l}).then(l=>Ds.mergeObjectSync(n,l)):Ds.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return er.errToObj,new Yn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,s,o,a;const c=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(a=er.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Yn({...this._def,unknownKeys:"strip"})}passthrough(){return new Yn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Yn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Yn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ar.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Yn({...this._def,catchall:e})}pick(e){const t={};return Xr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Yn({...this._def,shape:()=>t})}omit(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Yn({...this._def,shape:()=>t})}deepPartial(){return _g(this)}partial(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new Yn({...this._def,shape:()=>t})}required(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof ed;)s=s._def.innerType;t[n]=s}}),new Yn({...this._def,shape:()=>t})}keyof(){return ZU(Xr.objectKeys(this.shape))}}Yn.create=(r,e)=>new Yn({shape:()=>r,unknownKeys:"strip",catchall:nd.create(),typeName:ar.ZodObject,...xr(e)});Yn.strictCreate=(r,e)=>new Yn({shape:()=>r,unknownKeys:"strict",catchall:nd.create(),typeName:ar.ZodObject,...xr(e)});Yn.lazycreate=(r,e)=>new Yn({shape:r,unknownKeys:"strip",catchall:nd.create(),typeName:ar.ZodObject,...xr(e)});class tv extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return t.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new al(a.ctx.common.issues));return Bt(t,{code:at.invalid_union,unionErrors:o}),dr}if(t.common.async)return Promise.all(n.map(async s=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const c of n){const l={...t,common:{...t.common,issues:[]},parent:null},h=c._parseSync({data:t.data,path:t.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(c=>new al(c));return Bt(t,{code:at.invalid_union,unionErrors:a}),dr}}get options(){return this._def.options}}tv.create=(r,e)=>new tv({options:r,typeName:ar.ZodUnion,...xr(e)});const C4=r=>r instanceof iv?C4(r.schema):r instanceof hl?C4(r.innerType()):r instanceof sv?[r.value]:r instanceof Ff?r.options:r instanceof ov?Object.keys(r.enum):r instanceof av?C4(r._def.innerType):r instanceof X3?[void 0]:r instanceof ev?[null]:null;class s_ extends kr{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Nt.object)return Bt(t,{code:at.invalid_type,expected:Nt.object,received:t.parsedType}),dr;const n=this.discriminator,i=t.data[n],s=this.optionsMap.get(i);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(Bt(t,{code:at.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),dr)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const s of t){const o=C4(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new s_({typeName:ar.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...xr(n)})}}function T9(r,e){const t=ef(r),n=ef(e);if(r===e)return{valid:!0,data:r};if(t===Nt.object&&n===Nt.object){const i=Xr.objectKeys(e),s=Xr.objectKeys(r).filter(a=>i.indexOf(a)!==-1),o={...r,...e};for(const a of s){const c=T9(r[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(t===Nt.array&&n===Nt.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let s=0;s{if(S9(s)||S9(o))return dr;const a=T9(s.value,o.value);return a.valid?((I9(s)||I9(o))&&t.dirty(),{status:t.value,value:a.data}):(Bt(n,{code:at.invalid_intersection_types}),dr)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}rv.create=(r,e,t)=>new rv({left:r,right:e,typeName:ar.ZodIntersection,...xr(t)});class ku extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.array)return Bt(n,{code:at.invalid_type,expected:Nt.array,received:n.parsedType}),dr;if(n.data.lengththis._def.items.length&&(Bt(n,{code:at.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Ru(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>Ds.mergeArray(t,o)):Ds.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ku({...this._def,rest:e})}}ku.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ku({items:r,typeName:ar.ZodTuple,rest:null,...xr(e)})};class nv extends kr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.object)return Bt(n,{code:at.invalid_type,expected:Nt.object,received:n.parsedType}),dr;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new Ru(n,a,n.path,a)),value:o._parse(new Ru(n,n.data[a],n.path,a))});return n.common.async?Ds.mergeObjectAsync(t,i):Ds.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof kr?new nv({keyType:e,valueType:t,typeName:ar.ZodRecord,...xr(n)}):new nv({keyType:el.create(),valueType:e,typeName:ar.ZodRecord,...xr(t)})}}class p6 extends kr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.map)return Bt(n,{code:at.invalid_type,expected:Nt.map,received:n.parsedType}),dr;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,c],l)=>({key:i._parse(new Ru(n,a,n.path,[l,"key"])),value:s._parse(new Ru(n,c,n.path,[l,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return dr;(l.status==="dirty"||h.status==="dirty")&&t.dirty(),a.set(l.value,h.value)}return{status:t.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return dr;(l.status==="dirty"||h.status==="dirty")&&t.dirty(),a.set(l.value,h.value)}return{status:t.value,value:a}}}}p6.create=(r,e,t)=>new p6({valueType:e,keyType:r,typeName:ar.ZodMap,...xr(t)});class Dp extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.set)return Bt(n,{code:at.invalid_type,expected:Nt.set,received:n.parsedType}),dr;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(Bt(n,{code:at.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const s=this._def.valueType;function o(c){const l=new Set;for(const h of c){if(h.status==="aborted")return dr;h.status==="dirty"&&t.dirty(),l.add(h.value)}return{status:t.value,value:l}}const a=[...n.data.values()].map((c,l)=>s._parse(new Ru(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,t){return new Dp({...this._def,minSize:{value:e,message:er.toString(t)}})}max(e,t){return new Dp({...this._def,maxSize:{value:e,message:er.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Dp.create=(r,e)=>new Dp({valueType:r,minSize:null,maxSize:null,typeName:ar.ZodSet,...xr(e)});class Zg extends kr{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Nt.function)return Bt(t,{code:at.invalid_type,expected:Nt.function,received:t.parsedType}),dr;function n(a,c){return u6({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l6(),Y3].filter(l=>!!l),issueData:{code:at.invalid_arguments,argumentsError:c}})}function i(a,c){return u6({data:a,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l6(),Y3].filter(l=>!!l),issueData:{code:at.invalid_return_type,returnTypeError:c}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof rw){const a=this;return oo(async function(...c){const l=new al([]),h=await a._def.args.parseAsync(c,s).catch(y=>{throw l.addIssue(n(c,y)),l}),f=await Reflect.apply(o,this,h);return await a._def.returns._def.type.parseAsync(f,s).catch(y=>{throw l.addIssue(i(f,y)),l})})}else{const a=this;return oo(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new al([n(c,l.error)]);const h=Reflect.apply(o,this,l.data),f=a._def.returns.safeParse(h,s);if(!f.success)throw new al([i(h,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Zg({...this._def,args:ku.create(e).rest(Sp.create())})}returns(e){return new Zg({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Zg({args:e||ku.create([]).rest(Sp.create()),returns:t||Sp.create(),typeName:ar.ZodFunction,...xr(n)})}}class iv extends kr{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}iv.create=(r,e)=>new iv({getter:r,typeName:ar.ZodLazy,...xr(e)});class sv extends kr{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Bt(t,{received:t.data,code:at.invalid_literal,expected:this._def.value}),dr}return{status:"valid",value:e.data}}get value(){return this._def.value}}sv.create=(r,e)=>new sv({value:r,typeName:ar.ZodLiteral,...xr(e)});function ZU(r,e){return new Ff({values:r,typeName:ar.ZodEnum,...xr(e)})}class Ff extends kr{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return Bt(t,{expected:Xr.joinValues(n),received:t.parsedType,code:at.invalid_type}),dr}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return Bt(t,{received:t.data,code:at.invalid_enum_value,options:n}),dr}return oo(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return Ff.create(e)}exclude(e){return Ff.create(this.options.filter(t=>!e.includes(t)))}}Ff.create=ZU;class ov extends kr{_parse(e){const t=Xr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Nt.string&&n.parsedType!==Nt.number){const i=Xr.objectValues(t);return Bt(n,{expected:Xr.joinValues(i),received:n.parsedType,code:at.invalid_type}),dr}if(t.indexOf(e.data)===-1){const i=Xr.objectValues(t);return Bt(n,{received:n.data,code:at.invalid_enum_value,options:i}),dr}return oo(e.data)}get enum(){return this._def.values}}ov.create=(r,e)=>new ov({values:r,typeName:ar.ZodNativeEnum,...xr(e)});class rw extends kr{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Nt.promise&&t.common.async===!1)return Bt(t,{code:at.invalid_type,expected:Nt.promise,received:t.parsedType}),dr;const n=t.parsedType===Nt.promise?t.data:Promise.resolve(t.data);return oo(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}rw.create=(r,e)=>new rw({type:r,typeName:ar.ZodPromise,...xr(e)});class hl extends kr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ar.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{Bt(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){const o=a=>{const c=i.refinement(a,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?dr:(a.status==="dirty"&&t.dirty(),o(a.value),{status:t.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?dr:(a.status==="dirty"&&t.dirty(),o(a.value).then(()=>({status:t.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Q3(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Q3(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:t.value,value:a})):o);Xr.assertNever(i)}}hl.create=(r,e,t)=>new hl({schema:r,typeName:ar.ZodEffects,effect:e,...xr(t)});hl.createWithPreprocess=(r,e,t)=>new hl({schema:e,effect:{type:"preprocess",transform:r},typeName:ar.ZodEffects,...xr(t)});class ed extends kr{_parse(e){return this._getType(e)===Nt.undefined?oo(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ed.create=(r,e)=>new ed({innerType:r,typeName:ar.ZodOptional,...xr(e)});class $p extends kr{_parse(e){return this._getType(e)===Nt.null?oo(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$p.create=(r,e)=>new $p({innerType:r,typeName:ar.ZodNullable,...xr(e)});class av extends kr{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Nt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}av.create=(r,e)=>new av({innerType:r,typeName:ar.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xr(e)});class g6 extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return h6(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new al(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new al(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}g6.create=(r,e)=>new g6({innerType:r,typeName:ar.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xr(e)});class m6 extends kr{_parse(e){if(this._getType(e)!==Nt.nan){const n=this._getOrReturnCtx(e);return Bt(n,{code:at.invalid_type,expected:Nt.nan,received:n.parsedType}),dr}return{status:"valid",value:e.data}}}m6.create=r=>new m6({typeName:ar.ZodNaN,...xr(r)});const Mie=Symbol("zod_brand");class YU extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ey extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?dr:s.status==="dirty"?(t.dirty(),GU(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?dr:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new Ey({in:e,out:t,typeName:ar.ZodPipeline})}}class w6 extends kr{_parse(e){const t=this._def.innerType._parse(e);return Q3(t)&&(t.value=Object.freeze(t.value)),t}}w6.create=(r,e)=>new w6({innerType:r,typeName:ar.ZodReadonly,...xr(e)});const QU=(r,e={},t)=>r?tw.create().superRefine((n,i)=>{var s,o;if(!r(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(o=(s=a.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:c})}}):tw.create(),Die={object:Yn.lazycreate};var ar;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(ar||(ar={}));const $ie=(r,e={message:`Input not instance of ${r.name}`})=>QU(t=>t instanceof r,e),JU=el.create,XU=Lf.create,Bie=m6.create,Lie=Uf.create,eF=J3.create,Uie=Mp.create,Fie=d6.create,jie=X3.create,Hie=ev.create,Wie=tw.create,zie=Sp.create,Vie=nd.create,qie=f6.create,Kie=cl.create,Gie=Yn.create,Zie=Yn.strictCreate,Yie=tv.create,Qie=s_.create,Jie=rv.create,Xie=ku.create,ese=nv.create,tse=p6.create,rse=Dp.create,nse=Zg.create,ise=iv.create,sse=sv.create,ose=Ff.create,ase=ov.create,cse=rw.create,fP=hl.create,lse=ed.create,use=$p.create,hse=hl.createWithPreprocess,dse=Ey.create,fse=()=>JU().optional(),pse=()=>XU().optional(),gse=()=>eF().optional(),mse={string:r=>el.create({...r,coerce:!0}),number:r=>Lf.create({...r,coerce:!0}),boolean:r=>J3.create({...r,coerce:!0}),bigint:r=>Uf.create({...r,coerce:!0}),date:r=>Mp.create({...r,coerce:!0})},wse=dr;var ce=Object.freeze({__proto__:null,defaultErrorMap:Y3,setErrorMap:_ie,getErrorMap:l6,makeIssue:u6,EMPTY_PATH:xie,addIssueToContext:Bt,ParseStatus:Ds,INVALID:dr,DIRTY:GU,OK:oo,isAborted:S9,isDirty:I9,isValid:Q3,isAsync:h6,get util(){return Xr},get objectUtil(){return C9},ZodParsedType:Nt,getParsedType:ef,ZodType:kr,ZodString:el,ZodNumber:Lf,ZodBigInt:Uf,ZodBoolean:J3,ZodDate:Mp,ZodSymbol:d6,ZodUndefined:X3,ZodNull:ev,ZodAny:tw,ZodUnknown:Sp,ZodNever:nd,ZodVoid:f6,ZodArray:cl,ZodObject:Yn,ZodUnion:tv,ZodDiscriminatedUnion:s_,ZodIntersection:rv,ZodTuple:ku,ZodRecord:nv,ZodMap:p6,ZodSet:Dp,ZodFunction:Zg,ZodLazy:iv,ZodLiteral:sv,ZodEnum:Ff,ZodNativeEnum:ov,ZodPromise:rw,ZodEffects:hl,ZodTransformer:hl,ZodOptional:ed,ZodNullable:$p,ZodDefault:av,ZodCatch:g6,ZodNaN:m6,BRAND:Mie,ZodBranded:YU,ZodPipeline:Ey,ZodReadonly:w6,custom:QU,Schema:kr,ZodSchema:kr,late:Die,get ZodFirstPartyTypeKind(){return ar},coerce:mse,any:Wie,array:Kie,bigint:Lie,boolean:eF,date:Uie,discriminatedUnion:Qie,effect:fP,enum:ose,function:nse,instanceof:$ie,intersection:Jie,lazy:ise,literal:sse,map:tse,nan:Bie,nativeEnum:ase,never:Vie,null:Hie,nullable:use,number:XU,object:Gie,oboolean:gse,onumber:pse,optional:lse,ostring:fse,pipeline:dse,preprocess:hse,promise:cse,record:ese,set:rse,strictObject:Zie,string:JU,symbol:Fie,transformer:fP,tuple:Xie,undefined:jie,union:Yie,unknown:zie,void:qie,NEVER:wse,ZodIssueCode:at,quotelessJson:bie,ZodError:al});const li=ce.object({message:ce.string()});function Wt(r){return ce.literal(Xt[r])}ce.object({accessList:ce.array(ce.string()),blockHash:ce.string().nullable(),blockNumber:ce.string().nullable(),chainId:ce.string().or(ce.number()),from:ce.string(),gas:ce.string(),hash:ce.string(),input:ce.string().nullable(),maxFeePerGas:ce.string(),maxPriorityFeePerGas:ce.string(),nonce:ce.string(),r:ce.string(),s:ce.string(),to:ce.string(),transactionIndex:ce.string().nullable(),type:ce.string(),v:ce.string(),value:ce.string()});const vse=ce.object({chainId:ce.string().or(ce.number())}),yse=ce.object({email:ce.string().email()}),bse=ce.object({otp:ce.string()}),_se=ce.object({uri:ce.string()}),xse=ce.object({chainId:ce.optional(ce.string().or(ce.number())),preferredAccountType:ce.optional(ce.string())}),Ase=ce.object({provider:ce.enum(["google","github","apple","facebook","x","discord"])}),Ese=ce.object({email:ce.string().email()}),Cse=ce.object({otp:ce.string()}),Sse=ce.object({otp:ce.string()}),Ise=ce.object({themeMode:ce.optional(ce.enum(["light","dark"])),themeVariables:ce.optional(ce.record(ce.string(),ce.string().or(ce.number()))),w3mThemeVariables:ce.optional(ce.record(ce.string(),ce.string()))}),Tse=ce.object({metadata:ce.object({name:ce.string(),description:ce.string(),url:ce.string(),icons:ce.array(ce.string())}).optional(),sdkVersion:ce.string(),projectId:ce.string()}),Rse=ce.object({type:ce.string()}),kse=ce.object({action:ce.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),Nse=ce.object({url:ce.string()}),Pse=ce.object({userName:ce.string()}),Ose=ce.object({email:ce.string(),address:ce.string(),chainId:ce.string().or(ce.number()),accounts:ce.array(ce.object({address:ce.string(),type:ce.enum([_r.ACCOUNT_TYPES.EOA,_r.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),userName:ce.string().optional()}),Mse=ce.object({action:ce.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),Dse=ce.object({email:ce.string().email().optional().nullable(),address:ce.string(),chainId:ce.string().or(ce.number()),smartAccountDeployed:ce.optional(ce.boolean()),accounts:ce.array(ce.object({address:ce.string(),type:ce.enum([_r.ACCOUNT_TYPES.EOA,_r.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),preferredAccountType:ce.optional(ce.string())}),$se=ce.object({uri:ce.string()}),Bse=ce.object({isConnected:ce.boolean()}),Lse=ce.object({chainId:ce.string().or(ce.number())}),Use=ce.object({chainId:ce.string().or(ce.number())}),Fse=ce.object({newEmail:ce.string().email()}),jse=ce.object({smartAccountEnabledNetworks:ce.array(ce.number())});ce.object({address:ce.string(),isDeployed:ce.boolean()});const Hse=ce.object({type:ce.string(),address:ce.string()}),Wse=ce.any(),zse=ce.object({method:ce.literal("eth_accounts")}),Vse=ce.object({method:ce.literal("eth_blockNumber")}),qse=ce.object({method:ce.literal("eth_call"),params:ce.array(ce.any())}),Kse=ce.object({method:ce.literal("eth_chainId")}),Gse=ce.object({method:ce.literal("eth_estimateGas"),params:ce.array(ce.any())}),Zse=ce.object({method:ce.literal("eth_feeHistory"),params:ce.array(ce.any())}),Yse=ce.object({method:ce.literal("eth_gasPrice")}),Qse=ce.object({method:ce.literal("eth_getAccount"),params:ce.array(ce.any())}),Jse=ce.object({method:ce.literal("eth_getBalance"),params:ce.array(ce.any())}),Xse=ce.object({method:ce.literal("eth_getBlockByHash"),params:ce.array(ce.any())}),eoe=ce.object({method:ce.literal("eth_getBlockByNumber"),params:ce.array(ce.any())}),toe=ce.object({method:ce.literal("eth_getBlockReceipts"),params:ce.array(ce.any())}),roe=ce.object({method:ce.literal("eth_getBlockTransactionCountByHash"),params:ce.array(ce.any())}),noe=ce.object({method:ce.literal("eth_getBlockTransactionCountByNumber"),params:ce.array(ce.any())}),ioe=ce.object({method:ce.literal("eth_getCode"),params:ce.array(ce.any())}),soe=ce.object({method:ce.literal("eth_getFilterChanges"),params:ce.array(ce.any())}),ooe=ce.object({method:ce.literal("eth_getFilterLogs"),params:ce.array(ce.any())}),aoe=ce.object({method:ce.literal("eth_getLogs"),params:ce.array(ce.any())}),coe=ce.object({method:ce.literal("eth_getProof"),params:ce.array(ce.any())}),loe=ce.object({method:ce.literal("eth_getStorageAt"),params:ce.array(ce.any())}),uoe=ce.object({method:ce.literal("eth_getTransactionByBlockHashAndIndex"),params:ce.array(ce.any())}),hoe=ce.object({method:ce.literal("eth_getTransactionByBlockNumberAndIndex"),params:ce.array(ce.any())}),doe=ce.object({method:ce.literal("eth_getTransactionByHash"),params:ce.array(ce.any())}),foe=ce.object({method:ce.literal("eth_getTransactionCount"),params:ce.array(ce.any())}),poe=ce.object({method:ce.literal("eth_getTransactionReceipt"),params:ce.array(ce.any())}),goe=ce.object({method:ce.literal("eth_getUncleCountByBlockHash"),params:ce.array(ce.any())}),moe=ce.object({method:ce.literal("eth_getUncleCountByBlockNumber"),params:ce.array(ce.any())}),woe=ce.object({method:ce.literal("eth_maxPriorityFeePerGas")}),voe=ce.object({method:ce.literal("eth_newBlockFilter")}),yoe=ce.object({method:ce.literal("eth_newFilter"),params:ce.array(ce.any())}),boe=ce.object({method:ce.literal("eth_newPendingTransactionFilter")}),_oe=ce.object({method:ce.literal("eth_sendRawTransaction"),params:ce.array(ce.any())}),xoe=ce.object({method:ce.literal("eth_syncing"),params:ce.array(ce.any())}),Aoe=ce.object({method:ce.literal("eth_uninstallFilter"),params:ce.array(ce.any())}),pP=ce.object({method:ce.literal("personal_sign"),params:ce.array(ce.any())}),Eoe=ce.object({method:ce.literal("eth_signTypedData_v4"),params:ce.array(ce.any())}),gP=ce.object({method:ce.literal("eth_sendTransaction"),params:ce.array(ce.any())}),Coe=ce.object({method:ce.literal("solana_signMessage"),params:ce.object({message:ce.string(),pubkey:ce.string()})}),Soe=ce.object({method:ce.literal("solana_signTransaction"),params:ce.object({transaction:ce.string()})}),Ioe=ce.object({method:ce.literal("solana_signAllTransactions"),params:ce.object({transactions:ce.array(ce.string())})}),Toe=ce.object({method:ce.literal("solana_signAndSendTransaction"),params:ce.object({transaction:ce.string(),options:ce.object({skipPreflight:ce.boolean().optional(),preflightCommitment:ce.enum(["processed","confirmed","finalized","recent","single","singleGossip","root","max"]).optional(),maxRetries:ce.number().optional(),minContextSlot:ce.number().optional()}).optional()})}),Roe=ce.object({method:ce.literal("wallet_sendCalls"),params:ce.array(ce.object({chainId:ce.string().or(ce.number()).optional(),from:ce.string().optional(),version:ce.string().optional(),capabilities:ce.any().optional(),calls:ce.array(ce.object({to:ce.string().startsWith("0x"),data:ce.string().startsWith("0x").optional(),value:ce.string().optional()}))}))}),koe=ce.object({method:ce.literal("wallet_getCallsStatus"),params:ce.array(ce.string())}),Noe=ce.object({method:ce.literal("wallet_getCapabilities")}),Poe=ce.object({method:ce.literal("wallet_grantPermissions"),params:ce.array(ce.any())}),mP=ce.object({token:ce.string()}),zt=ce.object({id:ce.string().optional()}),U2={appEvent:zt.extend({type:Wt("APP_SWITCH_NETWORK"),payload:vse}).or(zt.extend({type:Wt("APP_CONNECT_EMAIL"),payload:yse})).or(zt.extend({type:Wt("APP_CONNECT_DEVICE")})).or(zt.extend({type:Wt("APP_CONNECT_OTP"),payload:bse})).or(zt.extend({type:Wt("APP_CONNECT_SOCIAL"),payload:_se})).or(zt.extend({type:Wt("APP_GET_FARCASTER_URI")})).or(zt.extend({type:Wt("APP_CONNECT_FARCASTER")})).or(zt.extend({type:Wt("APP_GET_USER"),payload:ce.optional(xse)})).or(zt.extend({type:Wt("APP_GET_SOCIAL_REDIRECT_URI"),payload:Ase})).or(zt.extend({type:Wt("APP_SIGN_OUT")})).or(zt.extend({type:Wt("APP_IS_CONNECTED"),payload:ce.optional(mP)})).or(zt.extend({type:Wt("APP_GET_CHAIN_ID")})).or(zt.extend({type:Wt("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(zt.extend({type:Wt("APP_INIT_SMART_ACCOUNT")})).or(zt.extend({type:Wt("APP_SET_PREFERRED_ACCOUNT"),payload:Rse})).or(zt.extend({type:Wt("APP_RPC_REQUEST"),payload:pP.or(gP).or(zse).or(Vse).or(qse).or(Kse).or(Gse).or(Zse).or(Yse).or(Qse).or(Jse).or(Xse).or(eoe).or(toe).or(roe).or(noe).or(ioe).or(soe).or(ooe).or(aoe).or(coe).or(loe).or(uoe).or(hoe).or(doe).or(foe).or(poe).or(goe).or(moe).or(woe).or(voe).or(yoe).or(boe).or(_oe).or(xoe).or(Aoe).or(pP).or(Eoe).or(gP).or(Coe).or(Soe).or(Ioe).or(Toe).or(koe).or(Roe).or(Noe).or(Poe)})).or(zt.extend({type:Wt("APP_UPDATE_EMAIL"),payload:Ese})).or(zt.extend({type:Wt("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:Cse})).or(zt.extend({type:Wt("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:Sse})).or(zt.extend({type:Wt("APP_SYNC_THEME"),payload:Ise})).or(zt.extend({type:Wt("APP_SYNC_DAPP_DATA"),payload:Tse})),frameEvent:zt.extend({type:Wt("FRAME_SWITCH_NETWORK_ERROR"),payload:li}).or(zt.extend({type:Wt("FRAME_SWITCH_NETWORK_SUCCESS"),payload:Use})).or(zt.extend({type:Wt("FRAME_CONNECT_EMAIL_SUCCESS"),payload:kse})).or(zt.extend({type:Wt("FRAME_CONNECT_EMAIL_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_GET_FARCASTER_URI_SUCCESS"),payload:Nse})).or(zt.extend({type:Wt("FRAME_GET_FARCASTER_URI_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_CONNECT_FARCASTER_SUCCESS"),payload:Pse})).or(zt.extend({type:Wt("FRAME_CONNECT_FARCASTER_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_CONNECT_OTP_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_CONNECT_OTP_SUCCESS")})).or(zt.extend({type:Wt("FRAME_CONNECT_DEVICE_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_CONNECT_DEVICE_SUCCESS")})).or(zt.extend({type:Wt("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:Ose})).or(zt.extend({type:Wt("FRAME_CONNECT_SOCIAL_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_GET_USER_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_GET_USER_SUCCESS"),payload:Dse})).or(zt.extend({type:Wt("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:$se})).or(zt.extend({type:Wt("FRAME_SIGN_OUT_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_SIGN_OUT_SUCCESS")})).or(zt.extend({type:Wt("FRAME_IS_CONNECTED_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_IS_CONNECTED_SUCCESS"),payload:Bse})).or(zt.extend({type:Wt("FRAME_GET_CHAIN_ID_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_GET_CHAIN_ID_SUCCESS"),payload:Lse})).or(zt.extend({type:Wt("FRAME_RPC_REQUEST_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_RPC_REQUEST_SUCCESS"),payload:Wse})).or(zt.extend({type:Wt("FRAME_SESSION_UPDATE"),payload:mP})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_SUCCESS"),payload:Mse})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:Fse})).or(zt.extend({type:Wt("FRAME_SYNC_THEME_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_SYNC_THEME_SUCCESS")})).or(zt.extend({type:Wt("FRAME_SYNC_DAPP_DATA_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(zt.extend({type:Wt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:jse})).or(zt.extend({type:Wt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:li})).or(zt.extend({type:Wt("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:Hse})).or(zt.extend({type:Wt("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:li}))},is={set(r,e){Ys.isClient&&localStorage.setItem(`${Xt.STORAGE_KEY}${r}`,e)},get(r){return Ys.isClient?localStorage.getItem(`${Xt.STORAGE_KEY}${r}`):null},delete(r,e){Ys.isClient&&(e?localStorage.removeItem(r):localStorage.removeItem(`${Xt.STORAGE_KEY}${r}`))}},wP={address:/^0x(?:[A-Fa-f0-9]{40})$/u,transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[a-fA-F0-9]{62,})$/u},D5=30*1e3,Ys={checkIfAllowedToTriggerEmail(){const r=is.get(Xt.LAST_EMAIL_LOGIN_TIME);if(r){const e=Date.now()-Number(r);if(e{function a({data:c}){var h;if(!((h=c.type)!=null&&h.includes(Xt.FRAME_EVENT_KEY)))return;const l=U2.frameEvent.parse(c);l.id===i&&(s(l),window.removeEventListener("message",a))}Ys.isClient&&(window.addEventListener("message",a),o.addEventListener("abort",()=>{window.removeEventListener("message",a)}))},onFrameEvent:i=>{Ys.isClient&&window.addEventListener("message",({data:s})=>{var a;if(!((a=s.type)!=null&&a.includes(Xt.FRAME_EVENT_KEY)))return;const o=U2.frameEvent.parse(s);i(o)})},onAppEvent:i=>{Ys.isClient&&window.addEventListener("message",({data:s})=>{var a;if(!((a=s.type)!=null&&a.includes(Xt.APP_EVENT_KEY)))return;const o=U2.appEvent.parse(s);i(o)})},postAppEvent:i=>{var s;if(Ys.isClient){if(!((s=this.iframe)!=null&&s.contentWindow))throw new Error("W3mFrame: iframe is not set");U2.appEvent.parse(i),this.iframe.contentWindow.postMessage(i,"*")}},postFrameEvent:i=>{if(Ys.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");U2.frameEvent.parse(i),parent.postMessage(i,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((i,s)=>{this.frameLoadPromiseResolver={resolve:i,reject:s}}),t&&(this.frameLoadPromise=new Promise((i,s)=>{this.frameLoadPromiseResolver={resolve:i,reject:s}}),Ys.isClient)){const i=document.createElement("iframe");i.id="w3m-iframe",i.src=`${vie}?projectId=${e}&chainId=${n}`,i.name="w3m-secure-iframe",i.style.position="fixed",i.style.zIndex="999999",i.style.display="none",i.style.animationDelay="0s, 50ms",i.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",i.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(i),this.iframe=i,this.iframe.onload=()=>{var s;(s=this.frameLoadPromiseResolver)==null||s.resolve(void 0)},this.iframe.onerror=()=>{var s;(s=this.frameLoadPromiseResolver)==null||s.reject("Unable to load email login dependency")}}}get networks(){const e=["eip155:1","eip155:5","eip155:11155111","eip155:10","eip155:420","eip155:42161","eip155:421613","eip155:137","eip155:80001","eip155:42220","eip155:1313161554","eip155:1313161555","eip155:56","eip155:97","eip155:43114","eip155:43113","eip155:324","eip155:280","eip155:100","eip155:8453","eip155:84531","eip155:7777777","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"].map(t=>({[t]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=${t}&projectId=${this.projectId}`,chainId:t}}));return Object.assign({},...e)}}function Moe(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}var Doe=$oe;function $oe(r,e,t){var n=t&&t.stringify||Moe,i=1;if(typeof r=="object"&&r!==null){var s=e.length+i;if(s===1)return r;var o=new Array(s);o[0]=n(r);for(var a=1;a-1?f:0,r.charCodeAt(y+1)){case 100:case 102:if(h>=c||e[h]==null)break;f=c||e[h]==null)break;f=c||e[h]===void 0)break;f",f=y+2,y++;break}l+=n(e[h]),f=y+2,y++;break;case 115:if(h>=c)break;f-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof t=="function"&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),r.enabled===!1&&(r.level="silent");const a=r.level||"info",c=Object.create(t);c.log||(c.log=lv),Object.defineProperty(c,"levelVal",{get:h}),Object.defineProperty(c,"level",{get:f,set:v});const l={transmit:e,serialize:i,asObject:r.browser.asObject,levels:o,timestamp:Woe(r)};c.levels=gu.levels,c.level=a,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=lv,c.serializers=n,c._serialize=i,c._stdErrSerialize=s,c.child=y,e&&(c._logEvent=R9());function h(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function v(A){if(A!=="silent"&&!this.levels.values[A])throw Error("unknown level "+A);this._level=A,og(l,c,"error","log"),og(l,c,"fatal","error"),og(l,c,"warn","error"),og(l,c,"info","log"),og(l,c,"debug","log"),og(l,c,"trace","log")}function y(A,M){if(!A)throw new Error("missing bindings for child Pino");M=M||{},i&&A.serializers&&(M.serializers=A.serializers);const $=M.serializers;if(i&&$){var L=Object.assign({},n,$),P=r.browser.serialize===!0?Object.keys(L):i;delete A.serializers,o_([A],P,L,this._stdErrSerialize)}function H(F){this._childLevel=(F._childLevel|0)+1,this.error=ag(F,A,"error"),this.fatal=ag(F,A,"fatal"),this.warn=ag(F,A,"warn"),this.info=ag(F,A,"info"),this.debug=ag(F,A,"debug"),this.trace=ag(F,A,"trace"),L&&(this.serializers=L,this._serialize=P),e&&(this._logEvent=R9([].concat(F._logEvent.bindings,A)))}return H.prototype=this,new H(this)}return c}gu.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};gu.stdSerializers=Boe;gu.stdTimeFunctions=Object.assign({},{nullTime:tF,epochTime:rF,unixTime:zoe,isoTime:Voe});function og(r,e,t,n){const i=Object.getPrototypeOf(e);e[t]=e.levelVal>e.levels.values[t]?lv:i[t]?i[t]:cv[t]||cv[n]||lv,Uoe(r,e,t)}function Uoe(r,e,t){!r.transmit&&e[t]===lv||(e[t]=function(n){return function(){const s=r.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===cv?cv:this;for(var c=0;c-1&&s in t&&(r[i][s]=t[s](r[i][s]))}function ag(r,e,t){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;iJSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Goe=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Sy(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Goe(r)}catch{return r}}function id(r){return typeof r=="string"?r:Koe(r)||""}const Zoe={level:"info"},Iy="custom_context",oI=1e3*1024;let Yoe=class{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},yP=class{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const t=new Yoe(e);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}},nF=class{constructor(e,t=oI){this.level=e??"error",this.levelValue=xg.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new yP(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===xg.levels.values.error?console.error(e):t===xg.levels.values.warn?console.warn(e):t===xg.levels.values.debug?console.debug(e):t===xg.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(id({timestamp:new Date().toISOString(),log:e}));const t=typeof e=="string"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new yP(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(id({extraMetadata:e})),new Blob(t,{type:"application/json"})}},Qoe=class{constructor(e,t=oI){this.baseChunkLogger=new nF(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=t,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}},Joe=class{constructor(e,t=oI){this.baseChunkLogger=new nF(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var Xoe=Object.defineProperty,eae=Object.defineProperties,tae=Object.getOwnPropertyDescriptors,bP=Object.getOwnPropertySymbols,rae=Object.prototype.hasOwnProperty,nae=Object.prototype.propertyIsEnumerable,_P=(r,e,t)=>e in r?Xoe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v6=(r,e)=>{for(var t in e||(e={}))rae.call(e,t)&&_P(r,t,e[t]);if(bP)for(var t of bP(e))nae.call(e,t)&&_P(r,t,e[t]);return r},y6=(r,e)=>eae(r,tae(e));function Ty(r){return y6(v6({},r),{level:(r==null?void 0:r.level)||Zoe.level})}function iae(r,e=Iy){return r[e]||""}function sae(r,e,t=Iy){return r[t]=e,r}function zo(r,e=Iy){let t="";return typeof r.bindings>"u"?t=iae(r,e):t=r.bindings().context||"",t}function oae(r,e,t=Iy){const n=zo(r,t);return n.trim()?`${n}/${e}`:e}function go(r,e,t=Iy){const n=oae(r,e,t),i=r.child({context:n});return sae(i,n,t)}function aae(r){var e,t;const n=new Qoe((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:Cy(y6(v6({},r.opts),{level:"trace",browser:y6(v6({},(t=r.opts)==null?void 0:t.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function cae(r){var e;const t=new Joe((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:Cy(y6(v6({},r.opts),{level:"trace"}),t),chunkLoggerController:t}}function iF(r){return typeof r.loggerOverride<"u"&&typeof r.loggerOverride!="string"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<"u"?aae(r):cae(r)}class lae{constructor(e){var s;const t=Ty({level:yie}),{logger:n,chunkLoggerController:i}=iF({opts:t});this.logger=go(n,this.constructor.name),this.chunkLoggerController=i,typeof window<"u"&&((s=this.chunkLoggerController)!=null&&s.downloadLogsBlobInBrowser)&&(window.downloadAppKitLogsBlob||(window.downloadAppKitLogsBlob={}),window.downloadAppKitLogsBlob.sdk=()=>{var o;(o=this.chunkLoggerController)!=null&&o.downloadLogsBlobInBrowser&&this.chunkLoggerController.downloadLogsBlobInBrowser({projectId:e})})}}class uae{constructor(e,t){this.openRpcRequests=[],this.w3mLogger=new lae(e),this.w3mFrame=new Ooe(e,!0,t)}getLoginEmailUsed(){return!!is.get(Xt.EMAIL_LOGIN_USED_KEY)}getEmail(){return is.get(Xt.EMAIL)}async connectEmail(e){try{Ys.checkIfAllowedToTriggerEmail();const t=await this.appEvent({type:Xt.APP_CONNECT_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(t){throw this.w3mLogger.logger.error({error:t},"Error connecting email"),t}}async connectDevice(){try{return this.appEvent({type:Xt.APP_CONNECT_DEVICE})}catch(e){throw this.w3mLogger.logger.error({error:e},"Error connecting device"),e}}async connectOtp(e){try{return this.appEvent({type:Xt.APP_CONNECT_OTP,payload:e})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error connecting otp"),t}}async isConnected(){try{const e=await this.appEvent({type:Xt.APP_IS_CONNECTED});return e.isConnected||this.deleteAuthLoginCache(),e}catch(e){throw this.deleteAuthLoginCache(),this.w3mLogger.logger.error({error:e},"Error checking connection"),e}}async getChainId(){try{const e=await this.appEvent({type:Xt.APP_GET_CHAIN_ID});return this.setLastUsedChainId(e.chainId),e}catch(e){throw this.w3mLogger.logger.error({error:e},"Error getting chain id"),e}}async getSocialRedirectUri(e){try{return this.appEvent({type:Xt.APP_GET_SOCIAL_REDIRECT_URI,payload:e})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error getting social redirect uri"),t}}async updateEmail(e){try{const t=await this.appEvent({type:Xt.APP_UPDATE_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(t){throw this.w3mLogger.logger.error({error:t},"Error updating email"),t}}async updateEmailPrimaryOtp(e){try{return this.appEvent({type:Xt.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error updating email primary otp"),t}}async updateEmailSecondaryOtp(e){try{const t=await this.appEvent({type:Xt.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e});return this.setLoginSuccess(t.newEmail),t}catch(t){throw this.w3mLogger.logger.error({error:t},"Error updating email secondary otp"),t}}async syncTheme(e){try{return this.appEvent({type:Xt.APP_SYNC_THEME,payload:e})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error syncing theme"),t}}async syncDappData(e){try{return this.appEvent({type:Xt.APP_SYNC_DAPP_DATA,payload:e})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error syncing dapp data"),t}}async getSmartAccountEnabledNetworks(){try{const e=await this.appEvent({type:Xt.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS});return this.persistSmartAccountEnabledNetworks(e.smartAccountEnabledNetworks),e}catch(e){throw this.persistSmartAccountEnabledNetworks([]),this.w3mLogger.logger.error({error:e},"Error getting smart account enabled networks"),e}}async setPreferredAccount(e){try{return this.appEvent({type:Xt.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}})}catch(t){throw this.w3mLogger.logger.error({error:t},"Error setting preferred account"),t}}async connect(e){try{const t=(e==null?void 0:e.chainId)??this.getLastUsedChainId()??1,n=await this.appEvent({type:Xt.APP_GET_USER,payload:{...e,chainId:t}});return this.setLoginSuccess(n.email),this.setLastUsedChainId(n.chainId),n}catch(t){throw this.w3mLogger.logger.error({error:t},"Error connecting"),t}}async connectSocial(e){try{const t=await this.appEvent({type:Xt.APP_CONNECT_SOCIAL,payload:{uri:e}});return t.userName&&this.setSocialLoginSuccess(t.userName),t}catch(t){throw this.w3mLogger.logger.error({error:t},"Error connecting social"),t}}async getFarcasterUri(){try{return await this.appEvent({type:Xt.APP_GET_FARCASTER_URI})}catch(e){throw this.w3mLogger.logger.error({error:e},"Error getting farcaster uri"),e}}async connectFarcaster(){try{const e=await this.appEvent({type:Xt.APP_CONNECT_FARCASTER});return e.userName&&this.setSocialLoginSuccess(e.userName),e}catch(e){throw this.w3mLogger.logger.error({error:e},"Error connecting farcaster"),e}}async switchNetwork(e){try{const t=await this.appEvent({type:Xt.APP_SWITCH_NETWORK,payload:{chainId:e}});return this.setLastUsedChainId(t.chainId),t}catch(t){throw this.w3mLogger.logger.error({error:t},"Error switching network"),t}}async disconnect(){try{const e=await this.appEvent({type:Xt.APP_SIGN_OUT});return this.deleteAuthLoginCache(),e}catch(e){throw this.w3mLogger.logger.error({error:e},"Error disconnecting"),e}}async request(e){var t,n,i;try{if(_r.GET_CHAIN_ID===e.method)return this.getLastUsedChainId();(t=this.rpcRequestHandler)==null||t.call(this,e);const s=await this.appEvent({type:Xt.APP_RPC_REQUEST,payload:e});return(n=this.rpcSuccessHandler)==null||n.call(this,s),s}catch(s){throw(i=this.rpcErrorHandler)==null||i.call(this,s),this.w3mLogger.logger.error({error:s},"Error requesting"),s}}onRpcRequest(e){this.rpcRequestHandler=e}onRpcSuccess(e){this.rpcSuccessHandler=e}onRpcError(e){this.rpcErrorHandler=e}onIsConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Xt.FRAME_GET_USER_SUCCESS&&e(t.payload)})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Xt.FRAME_IS_CONNECTED_ERROR&&e(),t.type===Xt.FRAME_IS_CONNECTED_SUCCESS&&!t.payload.isConnected&&e()})}async getCapabilities(){try{return await this.request({method:"wallet_getCapabilities"})||{}}catch{return{}}}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Xt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===Xt.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:_r.ACCOUNT_TYPES.EOA})})}onGetSmartAccountEnabledNetworks(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===Xt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS?e(t.payload.smartAccountEnabledNetworks):t.type===Xt.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR&&e([])})}getAvailableChainIds(){return Object.keys(this.w3mFrame.networks)}rejectRpcRequests(){try{this.openRpcRequests.forEach(({abortController:e,method:t})=>{_r.SAFE_RPC_METHODS.includes(t)||e.abort()}),this.openRpcRequests=[]}catch(e){this.w3mLogger.logger.error({error:e},"Error aborting RPC request")}}async appEvent(e){await this.w3mFrame.frameLoadPromise;const t=e.type.replace("@w3m-app/","");return new Promise((n,i)=>{var c,l;const s=Math.random().toString(36).substring(7);(l=(c=this.w3mLogger.logger).info)==null||l.call(c,{event:e,id:s},"Sending app event"),this.w3mFrame.events.postAppEvent({...e,id:s});const o=new AbortController;if(t==="RPC_REQUEST"){const h=e;this.openRpcRequests=[...this.openRpcRequests,{...h.payload,abortController:o}]}o.signal.addEventListener("abort",()=>{t==="RPC_REQUEST"&&i(new Error("Request was aborted"))});function a(h){var f;h.type===`@w3m-frame/${t}_SUCCESS`?("payload"in h&&n(h.payload),n(void 0)):h.type===`@w3m-frame/${t}_ERROR`&&("payload"in h&&i(new Error(((f=h.payload)==null?void 0:f.message)||"An error occurred")),i(new Error("An error occurred")))}this.w3mFrame.events.registerFrameEventHandler(s,a,o.signal)})}setNewLastEmailLoginTime(){is.set(Xt.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){is.set(Xt.SOCIAL_USERNAME,e)}setLoginSuccess(e){e&&is.set(Xt.EMAIL,e),is.set(Xt.EMAIL_LOGIN_USED_KEY,"true"),is.delete(Xt.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){is.delete(Xt.EMAIL_LOGIN_USED_KEY),is.delete(Xt.EMAIL),is.delete(Xt.LAST_USED_CHAIN_KEY),is.delete(Xt.SOCIAL_USERNAME),is.delete(Xt.SOCIAL,!0)}setLastUsedChainId(e){is.set(Xt.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(is.get(Xt.LAST_USED_CHAIN_KEY))}persistSmartAccountEnabledNetworks(e){is.set(Xt.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}}const Rn=ei({transactions:[],coinbaseTransactions:{},transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),Pi={state:Rn,subscribe(r){return Ms(Rn,()=>r(Rn))},setLastNetworkInView(r){Rn.lastNetworkInView=r},async fetchTransactions(r,e){var n;const{projectId:t}=bt.state;if(!t||!r)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");Rn.loading=!0;try{const i=await Hn.fetchTransactions({account:r,projectId:t,cursor:Rn.next,onramp:e,cache:e==="coinbase"?"no-cache":void 0,chainId:(n=it.state.caipNetwork)==null?void 0:n.id}),s=this.filterSpamTransactions(i.data),o=this.filterByConnectedChain(s),a=[...Rn.transactions,...o];Rn.loading=!1,e==="coinbase"?Rn.coinbaseTransactions=this.groupTransactionsByYearAndMonth(Rn.coinbaseTransactions,i.data):(Rn.transactions=a,Rn.transactionsByYear=this.groupTransactionsByYearAndMonth(Rn.transactionsByYear,o)),Rn.empty=a.length===0,Rn.next=i.next?i.next:void 0}catch{It.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:r,projectId:t,cursor:Rn.next,isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Vt.showError("Failed to fetch transactions"),Rn.loading=!1,Rn.empty=!0,Rn.next=void 0}},groupTransactionsByYearAndMonth(r={},e=[]){const t=r;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=t[i]??{},c=(o[s]??[]).filter(l=>l.id!==n.id);t[i]={...o,[s]:[...c,n].sort((l,h)=>new Date(h.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),t},filterSpamTransactions(r){return r.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},filterByConnectedChain(r){var n;const e=(n=it.state.caipNetwork)==null?void 0:n.id;return r.filter(i=>i.metadata.chain===e)},clearCursor(){Rn.next=void 0},resetTransactions(){Rn.transactions=[],Rn.transactionsByYear={},Rn.lastNetworkInView=void 0,Rn.loading=!1,Rn.empty=!1,Rn.next=void 0}},xo=ei({wcError:!1,buffering:!1}),or={state:xo,subscribeKey(r,e){return po(xo,r,e)},_getClient(r){return st.getConnectionControllerClient(r)},setClient(r){xo._client=oa(r)},async connectWalletConnect(){en.setConnectedConnector("WALLET_CONNECT"),await this._getClient().connectWalletConnect(r=>{xo.wcUri=r,xo.wcPairingExpiry=ot.getPairingExpiry()})},async connectExternal(r,e){var t,n;await((n=(t=this._getClient(e)).connectExternal)==null?void 0:n.call(t,r)),st.setActiveChain(e),en.setConnectedConnector(r.type)},async reconnectExternal(r){var e,t;await((t=(e=this._getClient()).reconnectExternal)==null?void 0:t.call(e,r)),en.setConnectedConnector(r.type)},async setPreferredAccountType(r){var t;nr.setLoading(!0);const e=Mt.getAuthConnector();e&&(await(e==null?void 0:e.provider.setPreferredAccount(r)),await this.reconnectExternal(e),nr.setLoading(!1),It.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:r,network:((t=it.state.caipNetwork)==null?void 0:t.id)||""}}))},async signMessage(r){return this._getClient().signMessage(r)},parseUnits(r,e){return this._getClient().parseUnits(r,e)},formatUnits(r,e){return this._getClient().formatUnits(r,e)},async sendTransaction(r){return this._getClient().sendTransaction(r)},async estimateGas(r){return this._getClient().estimateGas(r)},async writeContract(r){return this._getClient().writeContract(r)},async getEnsAddress(r){return this._getClient().getEnsAddress(r)},async getEnsAvatar(r){return this._getClient().getEnsAvatar(r)},checkInstalled(r,e){var t,n;return((n=(t=this._getClient(e)).checkInstalled)==null?void 0:n.call(t,r))||!1},resetWcConnection(){xo.wcUri=void 0,xo.wcPairingExpiry=void 0,xo.wcLinking=void 0,xo.recentWallet=void 0,Pi.resetTransactions(),en.deleteWalletConnectDeepLink()},setWcLinking(r){xo.wcLinking=r},setWcError(r){xo.wcError=r,xo.buffering=!1},setRecentWallet(r){xo.recentWallet=r},setBuffering(r){xo.buffering=r},async disconnect(){const r=this._getClient();try{await r.disconnect(),this.resetWcConnection()}catch{throw new Error("Failed to disconnect")}}},s3={async getTokenList(){var n;const r=it.state.caipNetwork,e=await Hn.fetchSwapTokens({chainId:r==null?void 0:r.id,projectId:bt.state.projectId});return((n=e==null?void 0:e.tokens)==null?void 0:n.map(i=>({...i,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0})))||[]},async fetchGasPrice(){const r=bt.state.projectId,e=it.state.caipNetwork;return e?await Hn.fetchGasPrice({projectId:r,chainId:e.id}):null},async fetchSwapAllowance({tokenAddress:r,userAddress:e,sourceTokenAmount:t,sourceTokenDecimals:n}){const i=bt.state.projectId,s=await Hn.fetchSwapAllowance({projectId:i,tokenAddress:r,userAddress:e});if(s!=null&&s.allowance&&t&&n){const o=or.parseUnits(t,n)||0;return BigInt(s.allowance)>=o}return!1},async getMyTokensWithBalance(r){const e=De.state.address,t=it.state.caipNetwork;if(!e||!t)return[];const i=(await Hn.getBalance(e,t.id,r)).balances.filter(s=>s.quantity.decimals!=="0");return De.setTokenBalance(i,st.state.activeChain),this.mapBalancesToSwapTokens(i)},mapBalancesToSwapTokens(r){return(r==null?void 0:r.map(e=>({...e,address:e!=null&&e.address?e.address:`${e.chainId}:${Ci.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]}},Ln=ei({view:"Connect",history:["Connect"],transactionStack:[]}),Te={state:Ln,subscribeKey(r,e){return po(Ln,r,e)},pushTransactionStack(r){Ln.transactionStack.push(r)},popTransactionStack(r){var t,n;const e=Ln.transactionStack.pop();e&&(r?(this.goBack(),(t=e==null?void 0:e.onCancel)==null||t.call(e)):(e.goBack?this.goBack():e.view&&this.reset(e.view),(n=e==null?void 0:e.onSuccess)==null||n.call(e)))},push(r,e){r!==Ln.view&&(Ln.view=r,Ln.history.push(r),Ln.data=e)},reset(r){Ln.view=r,Ln.history=[r]},replace(r,e){Ln.history.length>=1&&Ln.history.at(-1)!==r&&(Ln.view=r,Ln.history[Ln.history.length-1]=r,Ln.data=e)},goBack(){if(Ln.history.length>1){Ln.history.pop();const[r]=Ln.history.slice(-1);r&&(Ln.view=r)}},goBackToIndex(r){if(Ln.history.length>1){Ln.history=Ln.history.slice(0,r+1);const[e]=Ln.history.slice(-1);e&&(Ln.view=e)}}},xh={getGasPriceInEther(r,e){const t=e*r;return Number(t)/1e18},getGasPriceInUSD(r,e,t){const n=xh.getGasPriceInEther(e,t);return qr.bigNumber(r).multipliedBy(n).toNumber()},getPriceImpact({sourceTokenAmount:r,sourceTokenPriceInUSD:e,toTokenPriceInUSD:t,toTokenAmount:n}){const i=qr.bigNumber(r).multipliedBy(e),s=qr.bigNumber(n).multipliedBy(t);return i.minus(s).dividedBy(i).multipliedBy(100).toNumber()},getMaxSlippage(r,e){const t=qr.bigNumber(r).dividedBy(100);return qr.multiply(e,t).toNumber()},getProviderFee(r,e=.0085){return qr.bigNumber(r).multipliedBy(e).toString()},isInsufficientNetworkTokenForGas(r,e){const t=e||"0";return qr.bigNumber(r).isZero()?!0:qr.bigNumber(qr.bigNumber(t)).isGreaterThan(r)},isInsufficientSourceTokenForSwap(r,e,t){var s,o;const n=(o=(s=t==null?void 0:t.find(a=>a.address===e))==null?void 0:s.quantity)==null?void 0:o.numeric;return qr.bigNumber(n||"0").isLessThan(r)},getToTokenAmount({sourceToken:r,toToken:e,sourceTokenPrice:t,toTokenPrice:n,sourceTokenAmount:i}){if(i==="0"||!r||!e)return"0";const s=r.decimals,o=t,a=e.decimals,c=n;if(c<=0)return"0";const l=qr.bigNumber(i).multipliedBy(.0085),f=qr.bigNumber(i).minus(l).multipliedBy(qr.bigNumber(10).pow(s)),v=qr.bigNumber(o).dividedBy(c),y=s-a;return f.multipliedBy(v).dividedBy(qr.bigNumber(10).pow(y)).dividedBy(qr.bigNumber(10).pow(a)).toFixed(a).toString()}},xP=15e4,hae=6,Co={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:Ci.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},Fe=ei(Co),yt={state:Fe,subscribe(r){return Ms(Fe,()=>r(Fe))},subscribeKey(r,e){return po(Fe,r,e)},getParams(){var l,h,f,v,y,A,M,$;const r=it.state.caipNetwork,e=De.state.address,t=`${r==null?void 0:r.id}:${Ci.NATIVE_TOKEN_ADDRESS}`,n=en.getConnectedConnector(),i=Mt.getAuthConnector();if(!e)throw new Error("No address found to swap the tokens from.");const s=De.state.caipAddress,o=!((l=Fe.toToken)!=null&&l.address)||!((h=Fe.toToken)!=null&&h.decimals),a=!((f=Fe.sourceToken)!=null&&f.address)||!((v=Fe.sourceToken)!=null&&v.decimals)||!qr.bigNumber(Fe.sourceTokenAmount).isGreaterThan(0),c=!Fe.sourceTokenAmount;return{networkAddress:t,fromAddress:e,fromCaipAddress:De.state.caipAddress,sourceTokenAddress:(y=Fe.sourceToken)==null?void 0:y.address,toTokenAddress:(A=Fe.toToken)==null?void 0:A.address,toTokenAmount:Fe.toTokenAmount,toTokenDecimals:(M=Fe.toToken)==null?void 0:M.decimals,sourceTokenAmount:Fe.sourceTokenAmount,sourceTokenDecimals:($=Fe.sourceToken)==null?void 0:$.decimals,invalidToToken:o,invalidSourceToken:a,invalidSourceTokenAmount:c,availableToSwap:s&&!o&&!a&&!c,isAuthConnector:(i==null?void 0:i.walletFeatures)&&n==="AUTH"}},setSourceToken(r){if(!r){Fe.sourceToken=r,Fe.sourceTokenAmount="",Fe.sourceTokenPriceInUSD=0;return}Fe.sourceToken=r,this.setTokenPrice(r.address,"sourceToken")},setSourceTokenAmount(r){Fe.sourceTokenAmount=r},setToToken(r){if(!r){Fe.toToken=r,Fe.toTokenAmount="",Fe.toTokenPriceInUSD=0;return}Fe.toToken=r,this.setTokenPrice(r.address,"toToken")},setToTokenAmount(r){Fe.toTokenAmount=r?qr.formatNumberToLocalString(r,hae):""},async setTokenPrice(r,e){const{availableToSwap:t}=this.getParams();let n=Fe.tokensPriceMap[r]||0;n||(Fe.loadingPrices=!0,n=await this.getAddressPrice(r)),e==="sourceToken"?Fe.sourceTokenPriceInUSD=n:e==="toToken"&&(Fe.toTokenPriceInUSD=n),Fe.loadingPrices&&(Fe.loadingPrices=!1,t&&this.swapTokens())},switchTokens(){if(Fe.initializing||!Fe.initialized)return;const r=Fe.toToken?{...Fe.toToken}:void 0,e=Fe.sourceToken?{...Fe.sourceToken}:void 0,t=r&&Fe.toTokenAmount===""?"1":Fe.toTokenAmount;this.setSourceToken(r),this.setToToken(e),this.setSourceTokenAmount(t),this.setToTokenAmount(""),this.swapTokens()},resetState(){Fe.myTokensWithBalance=Co.myTokensWithBalance,Fe.tokensPriceMap=Co.tokensPriceMap,Fe.initialized=Co.initialized,Fe.sourceToken=Co.sourceToken,Fe.sourceTokenAmount=Co.sourceTokenAmount,Fe.sourceTokenPriceInUSD=Co.sourceTokenPriceInUSD,Fe.toToken=Co.toToken,Fe.toTokenAmount=Co.toTokenAmount,Fe.toTokenPriceInUSD=Co.toTokenPriceInUSD,Fe.networkPrice=Co.networkPrice,Fe.networkTokenSymbol=Co.networkTokenSymbol,Fe.networkBalanceInUSD=Co.networkBalanceInUSD,Fe.inputError=Co.inputError},resetValues(){var t;const{networkAddress:r}=this.getParams(),e=(t=Fe.tokens)==null?void 0:t.find(n=>n.address===r);this.setSourceToken(e),this.setToToken(void 0)},getApprovalLoadingState(){return Fe.loadingApprovalTransaction},clearError(){Fe.transactionError=void 0},async initializeState(){if(!Fe.initializing){if(Fe.initializing=!0,!Fe.initialized)try{await this.fetchTokens(),Fe.initialized=!0}catch{Fe.initialized=!1,Vt.showError("Failed to initialize swap"),Te.goBack()}Fe.initializing=!1}},async fetchTokens(){var t;const{networkAddress:r}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();const e=(t=Fe.tokens)==null?void 0:t.find(n=>n.address===r);e&&(Fe.networkTokenSymbol=e.symbol,this.setSourceToken(e),this.setSourceTokenAmount("1"))},async getTokenList(){const r=await s3.getTokenList();Fe.tokens=r,Fe.popularTokens=r.sort((e,t)=>e.symbolt.symbol?1:0),Fe.suggestedTokens=r.filter(e=>!!Ci.SWAP_SUGGESTED_TOKENS.includes(e.symbol),{})},async getAddressPrice(r){var c,l;const e=Fe.tokensPriceMap[r];if(e)return e;const n=(await Hn.fetchTokenPrice({projectId:bt.state.projectId,addresses:[r]})).fungibles||[],i=[...Fe.tokens||[],...Fe.myTokensWithBalance||[]],s=(c=i==null?void 0:i.find(h=>h.address===r))==null?void 0:c.symbol,o=((l=n.find(h=>h.symbol.toLowerCase()===(s==null?void 0:s.toLowerCase())))==null?void 0:l.price)||0,a=parseFloat(o.toString());return Fe.tokensPriceMap[r]=a,a},async getNetworkTokenPrice(){var i;const{networkAddress:r}=this.getParams(),t=(i=(await Hn.fetchTokenPrice({projectId:bt.state.projectId,addresses:[r]})).fungibles)==null?void 0:i[0],n=(t==null?void 0:t.price.toString())||"0";Fe.tokensPriceMap[r]=parseFloat(n),Fe.networkTokenSymbol=(t==null?void 0:t.symbol)||"",Fe.networkPrice=n},async getMyTokensWithBalance(r){const e=await s3.getMyTokensWithBalance(r);e&&(await this.getInitialGasPrice(),this.setBalances(e))},setBalances(r){const{networkAddress:e}=this.getParams(),t=it.state.caipNetwork;if(!t)return;const n=r.find(i=>i.address===e);r.forEach(i=>{Fe.tokensPriceMap[i.address]=i.price||0}),Fe.myTokensWithBalance=r.filter(i=>i.address.startsWith(t.id)),Fe.networkBalanceInUSD=n?qr.multiply(n.quantity.numeric,n.price).toString():"0"},async getInitialGasPrice(){const r=await s3.fetchGasPrice();if(!r)return{gasPrice:null,gasPriceInUsd:null};const e=r.standard,t=BigInt(e),n=BigInt(xP),i=xh.getGasPriceInUSD(Fe.networkPrice,n,t);return Fe.gasFee=e,Fe.gasPriceInUSD=i,{gasPrice:t,gasPriceInUSD:Fe.gasPriceInUSD}},async swapTokens(){var l,h;const r=De.state.address,e=Fe.sourceToken,t=Fe.toToken,n=qr.bigNumber(Fe.sourceTokenAmount).isGreaterThan(0);if(!t||!e||Fe.loadingPrices||!n)return;Fe.loadingQuote=!0;const i=qr.bigNumber(Fe.sourceTokenAmount).multipliedBy(10**e.decimals),s=await Hn.fetchSwapQuote({userAddress:r,projectId:bt.state.projectId,from:e.address,to:t.address,gasPrice:Fe.gasFee,amount:i.toString()});Fe.loadingQuote=!1;const o=(h=(l=s==null?void 0:s.quotes)==null?void 0:l[0])==null?void 0:h.toAmount;if(!o)return;const a=qr.bigNumber(o).dividedBy(10**t.decimals).toString();this.setToTokenAmount(a),this.hasInsufficientToken(Fe.sourceTokenAmount,e.address)?Fe.inputError="Insufficient balance":(Fe.inputError=void 0,this.setTransactionDetails())},async getTransaction(){const{fromCaipAddress:r,availableToSwap:e}=this.getParams(),t=Fe.sourceToken,n=Fe.toToken;if(!(!r||!e||!t||!n||Fe.loadingQuote))try{Fe.loadingBuildTransaction=!0;const i=await s3.fetchSwapAllowance({userAddress:r,tokenAddress:t.address,sourceTokenAmount:Fe.sourceTokenAmount,sourceTokenDecimals:t.decimals});let s;return i?s=await this.createSwapTransaction():s=await this.createAllowanceTransaction(),Fe.loadingBuildTransaction=!1,Fe.fetchError=!1,s}catch{Te.goBack(),Vt.showError("Failed to check allowance"),Fe.loadingBuildTransaction=!1,Fe.approvalTransaction=void 0,Fe.swapTransaction=void 0,Fe.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:r,fromAddress:e,sourceTokenAddress:t,toTokenAddress:n}=this.getParams();if(!(!r||!n)){if(!t)throw new Error("createAllowanceTransaction - No source token address found.");try{const i=await Hn.generateApproveCalldata({projectId:bt.state.projectId,from:t,to:n,userAddress:r}),s=await or.estimateGas({address:e,to:ot.getPlainAddress(i.tx.to),data:i.tx.data}),o={data:i.tx.data,to:ot.getPlainAddress(i.tx.from),gas:s,gasPrice:BigInt(i.tx.eip155.gasPrice),value:BigInt(i.tx.value),toAmount:Fe.toTokenAmount};return Fe.swapTransaction=void 0,Fe.approvalTransaction=o,o}catch{Te.goBack(),Vt.showError("Failed to create approval transaction"),Fe.approvalTransaction=void 0,Fe.swapTransaction=void 0,Fe.fetchError=!0;return}}},async createSwapTransaction(){const{networkAddress:r,fromCaipAddress:e,sourceTokenAmount:t}=this.getParams(),n=Fe.sourceToken,i=Fe.toToken;if(!e||!t||!n||!i)return;const s=or.parseUnits(t,n.decimals).toString();try{const o=await Hn.generateSwapCalldata({projectId:bt.state.projectId,userAddress:e,from:n.address,to:i.address,amount:s}),a=n.address===r,c=BigInt(o.tx.eip155.gas),l=BigInt(o.tx.eip155.gasPrice),h={data:o.tx.data,to:ot.getPlainAddress(o.tx.to),gas:c,gasPrice:l,value:BigInt(a?s:"0"),toAmount:Fe.toTokenAmount};return Fe.gasPriceInUSD=xh.getGasPriceInUSD(Fe.networkPrice,c,l),Fe.approvalTransaction=void 0,Fe.swapTransaction=h,h}catch{Te.goBack(),Vt.showError("Failed to create transaction"),Fe.approvalTransaction=void 0,Fe.swapTransaction=void 0,Fe.fetchError=!0;return}},async sendTransactionForApproval(r){const{fromAddress:e,isAuthConnector:t}=this.getParams();Fe.loadingApprovalTransaction=!0;const n="Approve limit increase in your wallet";t?Te.pushTransactionStack({view:null,goBack:!0,onSuccess(){Vt.showLoading(n)}}):Vt.showLoading(n);try{await or.sendTransaction({address:e,to:r.to,data:r.data,value:BigInt(r.value),gasPrice:BigInt(r.gasPrice)}),await this.swapTokens(),await this.getTransaction(),Fe.approvalTransaction=void 0,Fe.loadingApprovalTransaction=!1}catch(i){const s=i;Fe.transactionError=s==null?void 0:s.shortMessage,Fe.loadingApprovalTransaction=!1,Vt.showError((s==null?void 0:s.shortMessage)||"Transaction error")}},async sendTransactionForSwap(r){var o,a,c,l,h,f,v,y,A,M,$,L;if(!r)return;const{fromAddress:e,toTokenAmount:t,isAuthConnector:n}=this.getParams();Fe.loadingTransaction=!0;const i=`Swapping ${(o=Fe.sourceToken)==null?void 0:o.symbol} to ${qr.formatNumberToLocalString(t,3)} ${(a=Fe.toToken)==null?void 0:a.symbol}`,s=`Swapped ${(c=Fe.sourceToken)==null?void 0:c.symbol} to ${qr.formatNumberToLocalString(t,3)} ${(l=Fe.toToken)==null?void 0:l.symbol}`;n?Te.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){Vt.showLoading(i),yt.resetState()}}):Vt.showLoading("Confirm transaction in your wallet");try{const P=[(h=Fe.sourceToken)==null?void 0:h.address,(f=Fe.toToken)==null?void 0:f.address].join(","),H=await or.sendTransaction({address:e,to:r.to,data:r.data,gas:r.gas,gasPrice:BigInt(r.gasPrice),value:r.value});return Fe.loadingTransaction=!1,Vt.showSuccess(s),It.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((v=it.state.caipNetwork)==null?void 0:v.id)||"",swapFromToken:((y=this.state.sourceToken)==null?void 0:y.symbol)||"",swapToToken:((A=this.state.toToken)==null?void 0:A.symbol)||"",swapFromAmount:this.state.sourceTokenAmount||"",swapToAmount:this.state.toTokenAmount||"",isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),yt.resetState(),n||Te.replace("Account"),yt.getMyTokensWithBalance(P),H}catch(P){const H=P;Fe.transactionError=H==null?void 0:H.shortMessage,Fe.loadingTransaction=!1,Vt.showError((H==null?void 0:H.shortMessage)||"Transaction error"),It.sendEvent({type:"track",event:"SWAP_ERROR",properties:{network:((M=it.state.caipNetwork)==null?void 0:M.id)||"",swapFromToken:(($=this.state.sourceToken)==null?void 0:$.symbol)||"",swapToToken:((L=this.state.toToken)==null?void 0:L.symbol)||"",swapFromAmount:this.state.sourceTokenAmount||"",swapToAmount:this.state.toTokenAmount||"",isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(r,e){const t=xh.isInsufficientSourceTokenForSwap(r,e,Fe.myTokensWithBalance);return xh.isInsufficientNetworkTokenForGas(Fe.networkBalanceInUSD,Fe.gasPriceInUSD)||t},setTransactionDetails(){const{toTokenAddress:r,toTokenDecimals:e}=this.getParams();!r||!e||(Fe.gasPriceInUSD=xh.getGasPriceInUSD(Fe.networkPrice,BigInt(Fe.gasFee),BigInt(xP)),Fe.priceImpact=xh.getPriceImpact({sourceTokenAmount:Fe.sourceTokenAmount,sourceTokenPriceInUSD:Fe.sourceTokenPriceInUSD,toTokenPriceInUSD:Fe.toTokenPriceInUSD,toTokenAmount:Fe.toTokenAmount}),Fe.maxSlippage=xh.getMaxSlippage(Fe.slippage,Fe.toTokenAmount),Fe.providerFee=xh.getProviderFee(Fe.sourceTokenAmount))}},AP=ei({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]}),De={state:AP,replaceState(r){r&&Object.assign(AP,oa(r))},subscribe(r){return st.subscribeChainProp("accountState",e=>{if(e)return r(e)})},subscribeKey(r,e){let t;return st.subscribeChainProp("accountState",n=>{if(n){const i=n[r];t!==i&&(t=i,e(i))}})},setIsConnected(r,e){st.setAccountProp("isConnected",r,e)},getChainIsConnected(r){return st.getAccountProp("isConnected",r)},setCaipAddress(r,e){const t=r?ot.getPlainAddress(r):void 0;st.setAccountProp("caipAddress",r,e),st.setAccountProp("address",t,e)},setBalance(r,e,t){st.setAccountProp("balance",r,t),st.setAccountProp("balanceSymbol",e,t)},setProfileName(r,e){st.setAccountProp("profileName",r,e)},setProfileImage(r,e){st.setAccountProp("profileImage",r,e)},setAddressExplorerUrl(r,e){st.setAccountProp("addressExplorerUrl",r,e)},setSmartAccountDeployed(r,e){st.setAccountProp("smartAccountDeployed",r,e)},setCurrentTab(r){st.setAccountProp("currentTab",r,st.state.activeChain)},setTokenBalance(r,e){r&&st.setAccountProp("tokenBalance",r,e)},setShouldUpdateToAddress(r,e){st.setAccountProp("shouldUpdateToAddress",r,e)},setAllAccounts(r,e){st.setAccountProp("allAccounts",r,e)},addAddressLabel(r,e,t){const n=st.getAccountProp("addressLabels",t)||new Map;n.set(r,e),st.setAccountProp("addressLabels",n,st.state.activeChain)},removeAddressLabel(r,e){const t=st.getAccountProp("addressLabels",e)||new Map;t.delete(r),st.setAccountProp("addressLabels",t,st.state.activeChain)},setConnectedWalletInfo(r,e){st.setAccountProp("connectedWalletInfo",r,e)},setPreferredAccountType(r,e){st.setAccountProp("preferredAccountType",r,e)},setSocialProvider(r,e){r&&st.setAccountProp("socialProvider",r,e)},setSocialWindow(r,e){r&&st.setAccountProp("socialWindow",oa(r),e)},setFarcasterUrl(r,e){r&&st.setAccountProp("farcasterUrl",r,e)},async fetchTokenBalance(){var n,i;const r=(n=it.state.caipNetwork)==null?void 0:n.id,e=(i=it.state.caipNetwork)==null?void 0:i.chain,t=De.state.address;try{if(t&&r&&e){const s=await Hn.getBalance(t,r),o=s.balances.filter(a=>a.quantity.decimals!=="0");this.setTokenBalance(o,e),yt.setBalances(s3.mapBalancesToSwapTokens(s.balances))}}catch{Vt.showError("Failed to fetch token balance")}},resetAccount(r){st.resetAccount(r)}},Ml=ei({loading:!1,open:!1,shake:!1}),nr={state:Ml,subscribe(r){return Ms(Ml,()=>r(Ml))},subscribeKey(r,e){return po(Ml,r,e)},async open(r){await Yt.state.prefetchPromise;const e=De.state.isConnected;r!=null&&r.view?Te.reset(r.view):e?Te.reset("Account"):Te.reset("Connect"),Ml.open=!0,pu.set({open:!0}),It.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:e}})},close(){const r=De.state.isConnected||!1;Ml.open=!1,pu.set({open:!1}),It.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:r}})},setLoading(r){Ml.loading=r,pu.set({loading:r})},shake(){Ml.shake||(Ml.shake=!0,setTimeout(()=>{Ml.shake=!1},500))}},A3={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},k9={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},dae={providers:WU,selectedProvider:null,error:null,purchaseCurrency:A3,paymentCurrency:k9,purchaseCurrencies:[A3],paymentCurrencies:[],quotesLoading:!1},nn=ei(dae),on={state:nn,subscribe(r){return Ms(nn,()=>r(nn))},subscribeKey(r,e){return po(nn,r,e)},setSelectedProvider(r){nn.selectedProvider=r},setPurchaseCurrency(r){nn.purchaseCurrency=r},setPaymentCurrency(r){nn.paymentCurrency=r},setPurchaseAmount(r){this.state.purchaseAmount=r},setPaymentAmount(r){this.state.paymentAmount=r},async getAvailableCurrencies(){const r=await Hn.getOnrampOptions();nn.purchaseCurrencies=r.purchaseCurrencies,nn.paymentCurrencies=r.paymentCurrencies,nn.paymentCurrency=r.paymentCurrencies[0]||k9,nn.purchaseCurrency=r.purchaseCurrencies[0]||A3,await Yt.fetchCurrencyImages(r.paymentCurrencies.map(e=>e.id)),await Yt.fetchTokenImages(r.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var r,e;nn.quotesLoading=!0;try{const t=await Hn.getOnrampQuote({purchaseCurrency:nn.purchaseCurrency,paymentCurrency:nn.paymentCurrency,amount:((r=nn.paymentAmount)==null?void 0:r.toString())||"0",network:(e=nn.purchaseCurrency)==null?void 0:e.symbol});return nn.quotesLoading=!1,nn.purchaseAmount=Number(t.purchaseAmount.amount),t}catch(t){return nn.error=t.message,nn.quotesLoading=!1,null}finally{nn.quotesLoading=!1}},resetState(){nn.providers=WU,nn.selectedProvider=null,nn.error=null,nn.purchaseCurrency=A3,nn.paymentCurrency=k9,nn.purchaseCurrencies=[A3],nn.paymentCurrencies=[],nn.paymentAmount=void 0,nn.purchaseAmount=void 0,nn.quotesLoading=!1}},Wi=ei({loading:!1}),an={state:Wi,subscribe(r){return Ms(Wi,()=>r(Wi))},subscribeKey(r,e){return po(Wi,r,e)},setToken(r){r&&(Wi.token=oa(r))},setTokenAmount(r){Wi.sendTokenAmount=r},setReceiverAddress(r){Wi.receiverAddress=r},setReceiverProfileImageUrl(r){Wi.receiverProfileImageUrl=r},setReceiverProfileName(r){Wi.receiverProfileName=r},setGasPrice(r){Wi.gasPrice=r},setGasPriceInUsd(r){Wi.gasPriceInUSD=r},setLoading(r){Wi.loading=r},sendToken(){var r,e,t,n,i;(r=this.state.token)!=null&&r.address&&this.state.sendTokenAmount&&this.state.receiverAddress?(It.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,token:this.state.token.address,amount:this.state.sendTokenAmount,network:((e=it.state.caipNetwork)==null?void 0:e.id)||""}}),this.sendERC20Token({receiverAddress:this.state.receiverAddress,tokenAddress:this.state.token.address,sendTokenAmount:this.state.sendTokenAmount,decimals:this.state.token.quantity.decimals})):this.state.receiverAddress&&this.state.sendTokenAmount&&this.state.gasPrice&&((t=this.state.token)!=null&&t.quantity.decimals)&&(It.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,token:(n=this.state.token)==null?void 0:n.symbol,amount:this.state.sendTokenAmount,network:((i=it.state.caipNetwork)==null?void 0:i.id)||""}}),this.sendNativeToken({receiverAddress:this.state.receiverAddress,sendTokenAmount:this.state.sendTokenAmount,gasPrice:this.state.gasPrice,decimals:this.state.token.quantity.decimals}))},async sendNativeToken(r){var s,o,a,c;Te.pushTransactionStack({view:"Account",goBack:!1});const e=r.receiverAddress,t=De.state.address,n=or.parseUnits(r.sendTokenAmount.toString(),Number(r.decimals)),i="0x";try{await or.sendTransaction({to:e,address:t,data:i,value:n,gasPrice:r.gasPrice}),Vt.showSuccess("Transaction started"),It.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,token:((s=this.state.token)==null?void 0:s.symbol)||"",amount:r.sendTokenAmount,network:((o=it.state.caipNetwork)==null?void 0:o.id)||""}}),this.resetSend()}catch{It.sendEvent({type:"track",event:"SEND_ERROR",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,token:((a=this.state.token)==null?void 0:a.symbol)||"",amount:r.sendTokenAmount,network:((c=it.state.caipNetwork)==null?void 0:c.id)||""}}),Vt.showError("Something went wrong")}},async sendERC20Token(r){Te.pushTransactionStack({view:"Account",goBack:!1});const e=or.parseUnits(r.sendTokenAmount.toString(),Number(r.decimals));try{De.state.address&&r.sendTokenAmount&&r.receiverAddress&&r.tokenAddress&&(await or.writeContract({fromAddress:De.state.address,tokenAddress:ot.getPlainAddress(r.tokenAddress),receiverAddress:r.receiverAddress,tokenAmount:e,method:"transfer",abi:Xne}),Vt.showSuccess("Transaction started"),this.resetSend())}catch{Vt.showError("Something went wrong")}},resetSend(){Wi.token=void 0,Wi.sendTokenAmount=void 0,Wi.receiverAddress=void 0,Wi.receiverProfileImageUrl=void 0,Wi.receiverProfileName=void 0,Wi.loading=!1}},Rc=ei({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),aa={state:Rc,subscribe(r){return Ms(Rc,()=>r(Rc))},subscribeKey(r,e){return po(Rc,r,e)},showTooltip({message:r,triggerRect:e,variant:t}){Rc.open=!0,Rc.message=r,Rc.triggerRect=e,Rc.variant=t},hide(){Rc.open=!1,Rc.message="",Rc.triggerRect={width:0,height:0,top:0,left:0}}},EP=2147483648,fae={convertEVMChainIdToCoinType(r){if(r>=EP)throw new Error("Invalid chainId");return(EP|r)>>>0}},Ba=ei({suggestions:[],loading:!1}),Ul={state:Ba,subscribe(r){return Ms(Ba,()=>r(Ba))},subscribeKey(r,e){return po(Ba,r,e)},async resolveName(r){var e,t;try{return await Hn.lookupEnsName(r)}catch(n){const i=n;throw new Error(((t=(e=i==null?void 0:i.reasons)==null?void 0:e[0])==null?void 0:t.description)||"Error resolving name")}},async isNameRegistered(r){try{return await Hn.lookupEnsName(r),!0}catch{return!1}},async getSuggestions(r){try{Ba.loading=!0,Ba.suggestions=[];const e=await Hn.getEnsNameSuggestions(r);return Ba.suggestions=e.suggestions.map(t=>({...t,name:t.name.replace(vn.WC_NAME_SUFFIX,"")}))||[],Ba.suggestions}catch(e){const t=this.parseEnsApiError(e,"Error fetching name suggestions");throw new Error(t)}finally{Ba.loading=!1}},async getNamesForAddress(r){try{return it.state.caipNetwork?await Hn.reverseLookupEnsName({address:r}):[]}catch(e){const t=this.parseEnsApiError(e,"Error fetching names for address");throw new Error(t)}},async registerName(r){const e=it.state.caipNetwork;if(!e)throw new Error("Network not found");const t=De.state.address,n=Mt.getAuthConnector();if(!t||!n)throw new Error("Address or auth connector not found");Ba.loading=!0;try{const i=JSON.stringify({name:`${r}${vn.WC_NAME_SUFFIX}`,attributes:{},timestamp:Math.floor(Date.now()/1e3)});Te.pushTransactionStack({view:"RegisterAccountNameSuccess",goBack:!1,replace:!0,onCancel(){Ba.loading=!1}});const s=await or.signMessage(i),o=$c.caipNetworkIdToNumber(e.id);if(!o)throw new Error("Network not found");const a=fae.convertEVMChainIdToCoinType(o);await Hn.registerEnsName({coinType:a,address:t,signature:s,message:i}),De.setProfileName(`${r}${vn.WC_NAME_SUFFIX}`,st.state.activeChain),Te.replace("RegisterAccountNameSuccess")}catch(i){const s=this.parseEnsApiError(i,`Error registering name ${r}`);throw Te.replace("RegisterAccountName"),new Error(s)}finally{Ba.loading=!1}},validateName(r){return/^[a-zA-Z0-9-]{4,}$/u.test(r)},parseEnsApiError(r,e){var n,i;const t=r;return((i=(n=t==null?void 0:t.reasons)==null?void 0:n[0])==null?void 0:i.description)||e}},pae={evm:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700"},Lr={async fetchWalletImage(r){if(r)return await Yt._fetchWalletImage(r),this.getWalletImageById(r)},getWalletImageById(r){if(r)return Jn.state.walletImages[r]},getWalletImage(r){if(r!=null&&r.image_url)return r==null?void 0:r.image_url;if(r!=null&&r.image_id)return Jn.state.walletImages[r.image_id]},getNetworkImage(r){if(r!=null&&r.imageUrl)return r==null?void 0:r.imageUrl;if(r!=null&&r.imageId)return Jn.state.networkImages[r.imageId]},getNetworkImageById(r){if(r)return Jn.state.networkImages[r]},getConnectorImage(r){if(r!=null&&r.imageUrl)return r.imageUrl;if(r!=null&&r.imageId)return Jn.state.connectorImages[r.imageId]},getChainImage(r){return Jn.state.networkImages[pae[r]]}},N9={goBackOrCloseModal(){Te.state.history.length>1?Te.goBack():nr.close()},navigateAfterNetworkSwitch(){const{history:r}=Te.state,e=r.findIndex(t=>t==="Networks");e>=1?Te.goBackToIndex(e-1):nr.close()},navigateAfterPreferredAccountTypeSelect(){const{isSiweEnabled:r}=bt.state;r&&st.state.activeChain===vn.CHAIN.EVM?Te.push("ConnectingSiwe"):Te.push("Account")}};/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const S4=globalThis,aI=S4.ShadowRoot&&(S4.ShadyCSS===void 0||S4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,cI=Symbol(),CP=new WeakMap;let sF=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==cI)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(aI&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=CP.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&CP.set(t,e))}return e}toString(){return this.cssText}};const Ka=r=>new sF(typeof r=="string"?r:r+"",void 0,cI),dt=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new sF(t,r,cI)},gae=(r,e)=>{if(aI)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const n=document.createElement("style"),i=S4.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},SP=aI?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Ka(t)})(r):r;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:mae,defineProperty:wae,getOwnPropertyDescriptor:vae,getOwnPropertyNames:yae,getOwnPropertySymbols:bae,getPrototypeOf:_ae}=Object,Nf=globalThis,IP=Nf.trustedTypes,xae=IP?IP.emptyScript:"",pE=Nf.reactiveElementPolyfillSupport,E3=(r,e)=>r,b6={toAttribute(r,e){switch(e){case Boolean:r=r?xae:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},lI=(r,e)=>!mae(r,e),TP={attribute:!0,type:String,converter:b6,reflect:!1,hasChanged:lI};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Nf.litPropertyMetadata??(Nf.litPropertyMetadata=new WeakMap);let Ag=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=TP){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&wae(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:s}=vae(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const a=i==null?void 0:i.call(this);s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??TP}static _$Ei(){if(this.hasOwnProperty(E3("elementProperties")))return;const e=_ae(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E3("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E3("properties"))){const t=this.properties,n=[...yae(t),...bae(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(SP(i))}else e!==void 0&&t.push(SP(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return gae(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const o=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:b6).toAttribute(t,n.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:b6;this._$Em=i,this[i]=a.fromAttribute(t,o.type),this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??lI)(this[e],t))return;this.P(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};Ag.elementStyles=[],Ag.shadowRootOptions={mode:"open"},Ag[E3("elementProperties")]=new Map,Ag[E3("finalized")]=new Map,pE==null||pE({ReactiveElement:Ag}),(Nf.reactiveElementVersions??(Nf.reactiveElementVersions=[])).push("2.0.4");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const C3=globalThis,_6=C3.trustedTypes,RP=_6?_6.createPolicy("lit-html",{createHTML:r=>r}):void 0,oF="$lit$",tf=`lit$${Math.random().toFixed(9).slice(2)}$`,aF="?"+tf,Aae=`<${aF}>`,Bp=document,uv=()=>Bp.createComment(""),hv=r=>r===null||typeof r!="object"&&typeof r!="function",uI=Array.isArray,Eae=r=>uI(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",gE=`[ +\f\r]`,F2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kP=/-->/g,NP=/>/g,k0=RegExp(`>|${gE}(?:([^\\s"'>=/]+)(${gE}*=${gE}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),PP=/'/g,OP=/"/g,cF=/^(?:script|style|textarea|title)$/i,lF=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Pe=lF(1),tt=lF(2),Lp=Symbol.for("lit-noChange"),pi=Symbol.for("lit-nothing"),MP=new WeakMap,q0=Bp.createTreeWalker(Bp,129);function uF(r,e){if(!uI(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return RP!==void 0?RP.createHTML(e):e}const Cae=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":e===3?"":"",o=F2;for(let a=0;a"?(o=i??F2,f=-1):h[1]===void 0?f=-2:(f=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?k0:h[3]==='"'?OP:PP):o===OP||o===PP?o=k0:o===kP||o===NP?o=F2:(o=k0,i=void 0);const y=o===k0&&r[a+1].startsWith("/>")?" ":"";s+=o===F2?c+Aae:f>=0?(n.push(l),c.slice(0,f)+oF+c.slice(f)+tf+y):c+tf+(f===-2?a:y)}return[uF(r,s+(r[t]||"")+(e===2?"":e===3?"":"")),n]};let P9=class hF{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[l,h]=Cae(e,t);if(this.el=hF.createElement(l,n),q0.currentNode=this.el.content,t===2||t===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=q0.nextNode())!==null&&c.length0){i.textContent=_6?_6.emptyScript:"";for(let y=0;y2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=pi}_$AI(e,t=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=nw(this,e,t,0),o=!hv(e)||e!==this._$AH&&e!==Lp,o&&(this._$AH=e);else{const a=e;let c,l;for(e=s[0],c=0;c{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new hI(e.insertBefore(uv(),s),s,void 0,t??{})}return i._$AI(r),i};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let vt=class extends Ag{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=Nae(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return Lp}};var gL;vt._$litElement$=!0,vt.finalized=!0,(gL=globalThis.litElementHydrateSupport)==null||gL.call(globalThis,{LitElement:vt});const wE=globalThis.litElementPolyfillSupport;wE==null||wE({LitElement:vt});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");let S3,Pf,Of;function eke(r,e){S3=document.createElement("style"),Pf=document.createElement("style"),Of=document.createElement("style"),S3.textContent=Yg(r).core.cssText,Pf.textContent=Yg(r).dark.cssText,Of.textContent=Yg(r).light.cssText,document.head.appendChild(S3),document.head.appendChild(Pf),document.head.appendChild(Of),fF(e)}function fF(r){Pf&&Of&&(r==="light"?(Pf.removeAttribute("media"),Of.media="enabled"):(Of.removeAttribute("media"),Pf.media="enabled"))}function Pae(r){S3&&Pf&&Of&&(S3.textContent=Yg(r).core.cssText,Pf.textContent=Yg(r).dark.cssText,Of.textContent=Yg(r).light.cssText)}function Yg(r){return{core:dt` + @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); + @keyframes w3m-shake { + 0% { + transform: scale(1) rotate(0deg); + } + 20% { + transform: scale(1) rotate(-1deg); + } + 40% { + transform: scale(1) rotate(1.5deg); + } + 60% { + transform: scale(1) rotate(-1.5deg); + } + 80% { + transform: scale(1) rotate(1deg); + } + 100% { + transform: scale(1) rotate(0deg); + } + } + @keyframes w3m-iframe-fade-out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + @keyframes w3m-iframe-zoom-in { + 0% { + transform: translateY(50px); + opacity: 0; + } + 100% { + transform: translateY(0px); + opacity: 1; + } + } + @keyframes w3m-iframe-zoom-in-mobile { + 0% { + transform: scale(0.95); + opacity: 0; + } + 100% { + transform: scale(1); + opacity: 1; + } + } + :root { + --w3m-modal-width: 360px; + --w3m-color-mix-strength: ${Ka(r!=null&&r["--w3m-color-mix-strength"]?`${r["--w3m-color-mix-strength"]}%`:"0%")}; + --w3m-font-family: ${Ka((r==null?void 0:r["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; + --w3m-font-size-master: ${Ka((r==null?void 0:r["--w3m-font-size-master"])||"10px")}; + --w3m-border-radius-master: ${Ka((r==null?void 0:r["--w3m-border-radius-master"])||"4px")}; + --w3m-z-index: ${Ka((r==null?void 0:r["--w3m-z-index"])||999)}; + + --wui-font-family: var(--w3m-font-family); + + --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8); + --wui-font-size-micro: var(--w3m-font-size-master); + --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2); + --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4); + --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6); + --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8); + --wui-font-size-large: calc(var(--w3m-font-size-master) * 2); + --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2); + --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4); + --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4); + + --wui-border-radius-5xs: var(--w3m-border-radius-master); + --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5); + --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2); + --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3); + --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4); + --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5); + --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7); + --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9); + --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20); + + --wui-font-weight-light: 400; + --wui-font-weight-regular: 500; + --wui-font-weight-medium: 600; + --wui-font-weight-bold: 700; + + --wui-letter-spacing-2xl: -1.6px; + --wui-letter-spacing-medium-title: -0.96px; + --wui-letter-spacing-title-6: -0.88px; + --wui-letter-spacing-large: -0.8px; + --wui-letter-spacing-medium: -0.72px; + --wui-letter-spacing-paragraph: -0.64px; + --wui-letter-spacing-small: -0.56px; + --wui-letter-spacing-tiny: -0.48px; + --wui-letter-spacing-micro: -0.2px; + --wui-letter-spacing-mini: -0.16px; + + --wui-spacing-0: 0px; + --wui-spacing-4xs: 2px; + --wui-spacing-3xs: 4px; + --wui-spacing-xxs: 6px; + --wui-spacing-2xs: 7px; + --wui-spacing-xs: 8px; + --wui-spacing-1xs: 10px; + --wui-spacing-s: 12px; + --wui-spacing-m: 14px; + --wui-spacing-l: 16px; + --wui-spacing-2l: 18px; + --wui-spacing-xl: 20px; + --wui-spacing-xxl: 24px; + --wui-spacing-2xl: 32px; + --wui-spacing-3xl: 40px; + --wui-spacing-4xl: 90px; + --wui-spacing-5xl: 95px; + + --wui-icon-box-size-xxs: 14px; + --wui-icon-box-size-xs: 20px; + --wui-icon-box-size-sm: 24px; + --wui-icon-box-size-md: 32px; + --wui-icon-box-size-lg: 40px; + --wui-icon-box-size-2lg: 48px; + --wui-icon-box-size-xl: 64px; + + --wui-icon-size-inherit: inherit; + --wui-icon-size-xxs: 10px; + --wui-icon-size-xs: 12px; + --wui-icon-size-sm: 14px; + --wui-icon-size-md: 16px; + --wui-icon-size-mdl: 18px; + --wui-icon-size-lg: 20px; + --wui-icon-size-xl: 24px; + --wui-icon-size-xxl: 28px; + + --wui-wallet-image-size-inherit: inherit; + --wui-wallet-image-size-sm: 40px; + --wui-wallet-image-size-md: 56px; + --wui-wallet-image-size-lg: 80px; + + --wui-visual-size-size-inherit: inherit; + --wui-visual-size-sm: 40px; + --wui-visual-size-md: 55px; + --wui-visual-size-lg: 80px; + + --wui-box-size-md: 100px; + --wui-box-size-lg: 120px; + + --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1); + --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1); + + --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1); + --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1); + --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1); + + --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1); + + --wui-duration-lg: 200ms; + --wui-duration-md: 125ms; + --wui-duration-sm: 75ms; + + --wui-path-network-sm: path( + 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z' + ); + + --wui-path-network-md: path( + 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' + ); + + --wui-path-network-lg: path( + 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' + ); + + --wui-width-network-sm: 36px; + --wui-width-network-md: 48px; + --wui-width-network-lg: 86px; + + --wui-height-network-sm: 40px; + --wui-height-network-md: 54px; + --wui-height-network-lg: 96px; + + --wui-icon-size-network-xs: 12px; + --wui-icon-size-network-sm: 16px; + --wui-icon-size-network-md: 24px; + --wui-icon-size-network-lg: 42px; + + --wui-color-inherit: inherit; + + --wui-color-inverse-100: #fff; + --wui-color-inverse-000: #000; + + --wui-cover: rgba(20, 20, 20, 0.8); + + --wui-color-modal-bg: var(--wui-color-modal-bg-base); + + --wui-color-accent-100: var(--wui-color-accent-base-100); + --wui-color-accent-090: var(--wui-color-accent-base-090); + --wui-color-accent-080: var(--wui-color-accent-base-080); + + --wui-color-success-100: var(--wui-color-success-base-100); + + --wui-color-error-100: var(--wui-color-error-base-100); + + --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100); + --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100); + --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100); + --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100); + + --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100); + + --wui-avatar-border: var(--wui-avatar-border-base); + + --wui-thumbnail-border: var(--wui-thumbnail-border-base); + + --wui-box-shadow-blue: var(--wui-color-accent-glass-020); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :root { + --wui-color-modal-bg: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-modal-bg-base) + ); + + --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent); + + --wui-color-accent-100: color-mix( + in srgb, + var(--wui-color-accent-base-100) 100%, + transparent + ); + --wui-color-accent-090: color-mix( + in srgb, + var(--wui-color-accent-base-100) 90%, + transparent + ); + --wui-color-accent-080: color-mix( + in srgb, + var(--wui-color-accent-base-100) 80%, + transparent + ); + --wui-color-accent-glass-090: color-mix( + in srgb, + var(--wui-color-accent-base-100) 90%, + transparent + ); + --wui-color-accent-glass-080: color-mix( + in srgb, + var(--wui-color-accent-base-100) 80%, + transparent + ); + --wui-color-accent-glass-020: color-mix( + in srgb, + var(--wui-color-accent-base-100) 20%, + transparent + ); + --wui-color-accent-glass-015: color-mix( + in srgb, + var(--wui-color-accent-base-100) 15%, + transparent + ); + --wui-color-accent-glass-010: color-mix( + in srgb, + var(--wui-color-accent-base-100) 10%, + transparent + ); + --wui-color-accent-glass-005: color-mix( + in srgb, + var(--wui-color-accent-base-100) 5%, + transparent + ); + --wui-color-accent-002: color-mix( + in srgb, + var(--wui-color-accent-base-100) 2%, + transparent + ); + + --wui-color-fg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-100) + ); + --wui-color-fg-125: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-125) + ); + --wui-color-fg-150: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-150) + ); + --wui-color-fg-175: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-175) + ); + --wui-color-fg-200: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-200) + ); + --wui-color-fg-225: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-225) + ); + --wui-color-fg-250: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-250) + ); + --wui-color-fg-275: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-275) + ); + --wui-color-fg-300: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-fg-300) + ); + + --wui-color-bg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-100) + ); + --wui-color-bg-125: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-125) + ); + --wui-color-bg-150: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-150) + ); + --wui-color-bg-175: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-175) + ); + --wui-color-bg-200: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-200) + ); + --wui-color-bg-225: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-225) + ); + --wui-color-bg-250: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-250) + ); + --wui-color-bg-275: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-275) + ); + --wui-color-bg-300: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-bg-300) + ); + + --wui-color-success-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-success-base-100) + ); + --wui-color-error-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-color-error-base-100) + ); + + --wui-icon-box-bg-error-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-error-base-100) + ); + --wui-icon-box-bg-accent-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-blue-base-100) + ); + --wui-icon-box-bg-success-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-success-base-100) + ); + --wui-icon-box-bg-inverse-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-icon-box-bg-inverse-base-100) + ); + + --wui-all-wallets-bg-100: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-all-wallets-bg-100) + ); + + --wui-avatar-border: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-avatar-border-base) + ); + + --wui-thumbnail-border: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--wui-thumbnail-border-base) + ); + } + } + `,light:dt` + :root { + --w3m-color-mix: ${Ka((r==null?void 0:r["--w3m-color-mix"])||"#fff")}; + --w3m-accent: ${Ka(Rf(r,"dark")["--w3m-accent"])}; + --w3m-default: #fff; + + --wui-color-modal-bg-base: ${Ka(Rf(r,"dark")["--w3m-background"])}; + --wui-color-accent-base-100: var(--w3m-accent); + + --wui-color-blueberry-100: hsla(230, 100%, 67%, 1); + --wui-color-blueberry-090: hsla(231, 76%, 61%, 1); + --wui-color-blueberry-080: hsla(230, 59%, 55%, 1); + --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1); + + --wui-color-fg-100: #e4e7e7; + --wui-color-fg-125: #d0d5d5; + --wui-color-fg-150: #a8b1b1; + --wui-color-fg-175: #a8b0b0; + --wui-color-fg-200: #949e9e; + --wui-color-fg-225: #868f8f; + --wui-color-fg-250: #788080; + --wui-color-fg-275: #788181; + --wui-color-fg-300: #6e7777; + + --wui-color-bg-100: #141414; + --wui-color-bg-125: #191a1a; + --wui-color-bg-150: #1e1f1f; + --wui-color-bg-175: #222525; + --wui-color-bg-200: #272a2a; + --wui-color-bg-225: #2c3030; + --wui-color-bg-250: #313535; + --wui-color-bg-275: #363b3b; + --wui-color-bg-300: #3b4040; + + --wui-color-success-base-100: #26d962; + --wui-color-error-base-100: #f25a67; + + --wui-color-success-glass-001: rgba(38, 217, 98, 0.01); + --wui-color-success-glass-002: rgba(38, 217, 98, 0.02); + --wui-color-success-glass-005: rgba(38, 217, 98, 0.05); + --wui-color-success-glass-010: rgba(38, 217, 98, 0.1); + --wui-color-success-glass-015: rgba(38, 217, 98, 0.15); + --wui-color-success-glass-020: rgba(38, 217, 98, 0.2); + --wui-color-success-glass-025: rgba(38, 217, 98, 0.25); + --wui-color-success-glass-030: rgba(38, 217, 98, 0.3); + --wui-color-success-glass-060: rgba(38, 217, 98, 0.6); + --wui-color-success-glass-080: rgba(38, 217, 98, 0.8); + + --wui-color-error-glass-001: rgba(242, 90, 103, 0.01); + --wui-color-error-glass-002: rgba(242, 90, 103, 0.02); + --wui-color-error-glass-005: rgba(242, 90, 103, 0.05); + --wui-color-error-glass-010: rgba(242, 90, 103, 0.1); + --wui-color-error-glass-015: rgba(242, 90, 103, 0.15); + --wui-color-error-glass-020: rgba(242, 90, 103, 0.2); + --wui-color-error-glass-025: rgba(242, 90, 103, 0.25); + --wui-color-error-glass-030: rgba(242, 90, 103, 0.3); + --wui-color-error-glass-060: rgba(242, 90, 103, 0.6); + --wui-color-error-glass-080: rgba(242, 90, 103, 0.8); + + --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01); + --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02); + --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05); + --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1); + --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15); + --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2); + --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25); + --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3); + --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6); + --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8); + --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9); + + --wui-icon-box-bg-error-base-100: #3c2426; + --wui-icon-box-bg-blue-base-100: #20303f; + --wui-icon-box-bg-success-base-100: #1f3a28; + --wui-icon-box-bg-inverse-base-100: #243240; + + --wui-all-wallets-bg-100: #222b35; + + --wui-avatar-border-base: #252525; + + --wui-thumbnail-border-base: #252525; + } + `,dark:dt` + :root { + --w3m-color-mix: ${Ka((r==null?void 0:r["--w3m-color-mix"])||"#000")}; + --w3m-accent: ${Ka(Rf(r,"light")["--w3m-accent"])}; + --w3m-default: #000; + + --wui-color-modal-bg-base: ${Ka(Rf(r,"light")["--w3m-background"])}; + --wui-color-accent-base-100: var(--w3m-accent); + + --wui-color-blueberry-100: hsla(231, 100%, 70%, 1); + --wui-color-blueberry-090: hsla(231, 97%, 72%, 1); + --wui-color-blueberry-080: hsla(231, 92%, 74%, 1); + + --wui-color-fg-100: #141414; + --wui-color-fg-125: #2d3131; + --wui-color-fg-150: #474d4d; + --wui-color-fg-175: #636d6d; + --wui-color-fg-200: #798686; + --wui-color-fg-225: #828f8f; + --wui-color-fg-250: #8b9797; + --wui-color-fg-275: #95a0a0; + --wui-color-fg-300: #9ea9a9; + + --wui-color-bg-100: #ffffff; + --wui-color-bg-125: #f5fafa; + --wui-color-bg-150: #f3f8f8; + --wui-color-bg-175: #eef4f4; + --wui-color-bg-200: #eaf1f1; + --wui-color-bg-225: #e5eded; + --wui-color-bg-250: #e1e9e9; + --wui-color-bg-275: #dce7e7; + --wui-color-bg-300: #d8e3e3; + + --wui-color-success-base-100: #26b562; + --wui-color-error-base-100: #f05142; + + --wui-color-success-glass-001: rgba(38, 181, 98, 0.01); + --wui-color-success-glass-002: rgba(38, 181, 98, 0.02); + --wui-color-success-glass-005: rgba(38, 181, 98, 0.05); + --wui-color-success-glass-010: rgba(38, 181, 98, 0.1); + --wui-color-success-glass-015: rgba(38, 181, 98, 0.15); + --wui-color-success-glass-020: rgba(38, 181, 98, 0.2); + --wui-color-success-glass-025: rgba(38, 181, 98, 0.25); + --wui-color-success-glass-030: rgba(38, 181, 98, 0.3); + --wui-color-success-glass-060: rgba(38, 181, 98, 0.6); + --wui-color-success-glass-080: rgba(38, 181, 98, 0.8); + + --wui-color-error-glass-001: rgba(240, 81, 66, 0.01); + --wui-color-error-glass-002: rgba(240, 81, 66, 0.02); + --wui-color-error-glass-005: rgba(240, 81, 66, 0.05); + --wui-color-error-glass-010: rgba(240, 81, 66, 0.1); + --wui-color-error-glass-015: rgba(240, 81, 66, 0.15); + --wui-color-error-glass-020: rgba(240, 81, 66, 0.2); + --wui-color-error-glass-025: rgba(240, 81, 66, 0.25); + --wui-color-error-glass-030: rgba(240, 81, 66, 0.3); + --wui-color-error-glass-060: rgba(240, 81, 66, 0.6); + --wui-color-error-glass-080: rgba(240, 81, 66, 0.8); + + --wui-icon-box-bg-error-base-100: #f4dfdd; + --wui-icon-box-bg-blue-base-100: #d9ecfb; + --wui-icon-box-bg-success-base-100: #daf0e4; + --wui-icon-box-bg-inverse-base-100: #dcecfc; + + --wui-all-wallets-bg-100: #e8f1fa; + + --wui-avatar-border-base: #f3f4f4; + + --wui-thumbnail-border-base: #eaefef; + + --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01); + --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02); + --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05); + --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1); + --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15); + --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2); + --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25); + --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3); + --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6); + --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8); + --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9); + } + `}}const Rt=dt` + *, + *::after, + *::before, + :host { + margin: 0; + padding: 0; + box-sizing: border-box; + font-style: normal; + text-rendering: optimizeSpeed; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + font-family: var(--wui-font-family); + backface-visibility: hidden; + } +`,lr=dt` + button, + a { + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + position: relative; + transition: + color var(--wui-duration-lg) var(--wui-ease-out-power-1), + background-color var(--wui-duration-lg) var(--wui-ease-out-power-1), + border var(--wui-duration-lg) var(--wui-ease-out-power-1), + box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1); + will-change: background-color, color, border, box-shadow; + outline: none; + border: none; + column-gap: var(--wui-spacing-3xs); + background-color: transparent; + text-decoration: none; + } + + button:disabled > wui-wallet-image, + button:disabled > wui-all-wallets-image, + button:disabled > wui-network-image, + button:disabled > wui-image, + button:disabled > wui-transaction-visual, + button:disabled > wui-logo { + filter: grayscale(1); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-gray-glass-005); + } + + button:active:enabled { + background-color: var(--wui-color-gray-glass-010); + } + } + + button:disabled > wui-icon-box { + opacity: 0.5; + } + + input { + border: none; + outline: none; + appearance: none; + } +`,c_=dt` + .wui-color-inherit { + color: var(--wui-color-inherit); + } + + .wui-color-accent-100 { + color: var(--wui-color-accent-100); + } + + .wui-color-error-100 { + color: var(--wui-color-error-100); + } + + .wui-color-success-100 { + color: var(--wui-color-success-100); + } + + .wui-color-inverse-100 { + color: var(--wui-color-inverse-100); + } + + .wui-color-inverse-000 { + color: var(--wui-color-inverse-000); + } + + .wui-color-fg-100 { + color: var(--wui-color-fg-100); + } + + .wui-color-fg-200 { + color: var(--wui-color-fg-200); + } + + .wui-color-fg-300 { + color: var(--wui-color-fg-300); + } + + .wui-bg-color-inherit { + background-color: var(--wui-color-inherit); + } + + .wui-bg-color-blue-100 { + background-color: var(--wui-color-accent-100); + } + + .wui-bg-color-error-100 { + background-color: var(--wui-color-error-100); + } + + .wui-bg-color-success-100 { + background-color: var(--wui-color-success-100); + } + + .wui-bg-color-inverse-100 { + background-color: var(--wui-color-inverse-100); + } + + .wui-bg-color-inverse-000 { + background-color: var(--wui-color-inverse-000); + } + + .wui-bg-color-fg-100 { + background-color: var(--wui-color-fg-100); + } + + .wui-bg-color-fg-200 { + background-color: var(--wui-color-fg-200); + } + + .wui-bg-color-fg-300 { + background-color: var(--wui-color-fg-300); + } +`;function Oae(r,e){const{kind:t,elements:n}=e;return{kind:t,elements:n,finisher(i){customElements.get(r)||customElements.define(r,i)}}}function Mae(r,e){return customElements.get(r)||customElements.define(r,e),e}function Re(r){return function(t){return typeof t=="function"?Mae(r,t):Oae(r,t)}}const Dae=dt` + :host { + display: block; + border-radius: clamp(0px, var(--wui-border-radius-l), 44px); + box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005); + background-color: var(--wui-color-modal-bg); + overflow: hidden; + } +`;var $ae=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 O9=class extends vt{render(){return Pe``}};O9.styles=[Rt,Dae];O9=$ae([Re("wui-card")],O9);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Bae={attribute:!0,type:String,converter:b6,reflect:!1,hasChanged:lI},Lae=(r=Bae,e,t)=>{const{kind:n,metadata:i}=t;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(t.name,r),n==="accessor"){const{name:o}=t;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(n==="setter"){const{name:o}=t;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+n)};function he(r){return(e,t)=>typeof t=="object"?Lae(r,e,t):((n,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,o?{...n,wrapped:!0}:n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(r,e,t)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function Ry(r){return he({...r,state:!0,attribute:!1})}const Uae=dt` + :host { + display: flex; + aspect-ratio: 1 / 1; + color: var(--local-color); + width: var(--local-width); + } + + svg { + width: inherit; + height: inherit; + object-fit: contain; + object-position: center; + } +`,Fae=tt` + `,jae=tt` + +`,Hae=tt` + `,Wae=tt` + + + + + + + + + +`,zae=tt` + + + + + + + + + + + + + +`,Vae=tt` + +`,qae=tt` + +`,Kae=tt` + +`,Gae=tt` + +`,Zae=tt` + `,Yae=tt` + + +`,Qae=tt` + `,Jae=tt` + +`,Xae=tt` + + +`,ece=tt` + +`,tce=tt` + +`,rce=tt` + +`,nce=tt` + +`,ice=tt` + + + + + + + + + + + + + + + + + + + + + +`,sce=tt` + +`,oce=tt` + +`,ace=tt` + +`,cce=tt` + +`,lce=tt` + `,uce=tt` + +`,hce=tt` + + + + `,dce=tt` + + +`,fce=tt` + +`,pce=tt` + + + + + + + + + + +`,gce=tt` + +`,mce=tt` + +`,wce=tt` + +`,vce=tt` + + + + + + + + + + + + + + + +`,yce=tt` + + + + +`,bce=tt` + +`,_ce=tt` + + + + + + + + + + + + + +`,xce=tt` + + + + +`,Ace=tt` + + +`,Ece=tt` + + +`,Cce=tt` + + +`,Sce=tt` + +`,Ice=tt` + + +`,Tce=tt` + + +`,Rce=tt` + + +`,kce=tt` + +`,Nce=tt` + +`,Pce=tt` + + + + + + +`,Oce=tt` + `,Mce=tt` + +`,Dce=tt` + `,$ce=tt` + +`,Bce=tt` + +`,Lce=tt` + + `,Uce=tt` + +`,Fce=tt` + +`,jce=tt` + + + +`,Hce=tt` + +`,Wce=tt` + +`,zce=tt` + + + + + + + + + + + + + + +`,Vce=tt` + + + +`,qce=tt` + + + + + + + + + + + + + +`,Kce=tt` + +`,Gce=tt` + +`,Zce=tt` + +`,Yce=tt` + + + + +`,Qce=tt` + +`,Jce=tt` + + +`,Xce=tt` + + +`,ele=tt` + +`,tle=tt` + +`,DP=tt` + + + + + + + +`;var l_=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};const rle={add:Fae,allWallets:jae,arrowBottomCircle:Hae,appStore:Wae,apple:zae,arrowBottom:Vae,arrowLeft:qae,arrowRight:Kae,arrowTop:Gae,bank:Zae,browser:Yae,card:Qae,checkmark:Xae,checkmarkBold:Jae,chevronBottom:ece,chevronLeft:tce,chevronRight:rce,chevronTop:nce,chromeStore:ice,clock:sce,close:oce,compass:cce,coinPlaceholder:ace,copy:lce,cursor:uce,cursorTransparent:hce,desktop:dce,disconnect:fce,discord:pce,etherscan:gce,extension:mce,externalLink:wce,facebook:vce,farcaster:yce,filters:bce,github:_ce,google:xce,helpCircle:Ace,image:Ece,id:tle,infoCircle:Cce,lightbulb:ele,mail:Sce,mobile:Ice,more:Tce,networkPlaceholder:Rce,nftPlaceholder:kce,off:Nce,playStore:Pce,plus:Oce,qrCode:Mce,recycleHorizontal:Dce,refresh:$ce,search:Bce,send:Lce,swapHorizontal:Uce,swapHorizontalMedium:jce,swapHorizontalBold:Fce,swapHorizontalRoundedBold:Hce,swapVertical:Wce,telegram:zce,threeDots:Vce,twitch:qce,twitter:DP,twitterIcon:Kce,verify:Gce,verifyFilled:Zce,wallet:Qce,walletConnect:Jce,walletPlaceholder:Yce,warningCircle:Xce,x:DP};let iw=class extends vt{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=` + --local-color: ${`var(--wui-color-${this.color});`} + --local-width: ${`var(--wui-icon-size-${this.size});`} + `,Pe`${rle[this.name]}`}};iw.styles=[Rt,c_,Uae];l_([he()],iw.prototype,"size",void 0);l_([he()],iw.prototype,"name",void 0);l_([he()],iw.prototype,"color",void 0);iw=l_([Re("wui-icon")],iw);const nle=dt` + :host { + display: block; + width: var(--local-width); + height: var(--local-height); + } + + img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + object-position: center center; + border-radius: inherit; + } +`;var u_=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 sw=class extends vt{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=` + --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"}; + --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"}; + `,Pe`${this.alt}`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};sw.styles=[Rt,c_,nle];u_([he()],sw.prototype,"src",void 0);u_([he()],sw.prototype,"alt",void 0);u_([he()],sw.prototype,"size",void 0);sw=u_([Re("wui-image")],sw);const ile=dt` + :host { + display: block; + width: var(--wui-box-size-lg); + height: var(--wui-box-size-lg); + } + + svg { + width: var(--wui-box-size-lg); + height: var(--wui-box-size-lg); + fill: none; + stroke: transparent; + stroke-linecap: round; + } + + use { + stroke: var(--wui-color-accent-100); + stroke-width: 2px; + stroke-dasharray: 54, 118; + stroke-dashoffset: 172; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`;var sle=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 M9=class extends vt{render(){return Pe` + + + + + `}};M9.styles=[Rt,ile];M9=sle([Re("wui-loading-hexagon")],M9);const ole=dt` + :host { + display: flex; + } + + :host([data-size='sm']) > svg { + width: 12px; + height: 12px; + } + + :host([data-size='md']) > svg { + width: 16px; + height: 16px; + } + + :host([data-size='lg']) > svg { + width: 24px; + height: 24px; + } + + :host([data-size='xl']) > svg { + width: 32px; + height: 32px; + } + + svg { + animation: rotate 2s linear infinite; + } + + circle { + fill: none; + stroke: var(--local-color); + stroke-width: 4px; + stroke-dasharray: 1, 124; + stroke-dashoffset: 0; + stroke-linecap: round; + animation: dash 1.5s ease-in-out infinite; + } + + :host([data-size='md']) > svg > circle { + stroke-width: 6px; + } + + :host([data-size='sm']) > svg > circle { + stroke-width: 8px; + } + + @keyframes rotate { + 100% { + transform: rotate(360deg); + } + } + + @keyframes dash { + 0% { + stroke-dasharray: 1, 124; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 90, 124; + stroke-dashoffset: -35; + } + + 100% { + stroke-dashoffset: -125; + } + } +`;var dI=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 dv=class extends vt{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: ${this.color==="inherit"?"inherit":`var(--wui-color-${this.color})`}`,this.dataset.size=this.size,Pe` + + `}};dv.styles=[Rt,ole];dI([he()],dv.prototype,"color",void 0);dI([he()],dv.prototype,"size",void 0);dv=dI([Re("wui-loading-spinner")],dv);const ale=dt` + :host { + display: block; + width: var(--wui-box-size-md); + height: var(--wui-box-size-md); + } + + svg { + width: var(--wui-box-size-md); + height: var(--wui-box-size-md); + } + + rect { + fill: none; + stroke: var(--wui-color-accent-100); + stroke-width: 4px; + stroke-linecap: round; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`;var pF=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 x6=class extends vt{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,o=360+n*1.75;return Pe` + + + + `}};x6.styles=[Rt,ale];pF([he({type:Number})],x6.prototype,"radius",void 0);x6=pF([Re("wui-loading-thumbnail")],x6);const cle=dt` + :host { + display: block; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + background: linear-gradient( + 120deg, + var(--wui-color-bg-200) 5%, + var(--wui-color-bg-200) 48%, + var(--wui-color-bg-300) 55%, + var(--wui-color-bg-300) 60%, + var(--wui-color-bg-300) calc(60% + 10px), + var(--wui-color-bg-200) calc(60% + 12px), + var(--wui-color-bg-200) 100% + ); + background-size: 250%; + animation: shimmer 3s linear infinite reverse; + } + + :host([variant='light']) { + background: linear-gradient( + 120deg, + var(--wui-color-bg-150) 5%, + var(--wui-color-bg-150) 48%, + var(--wui-color-bg-200) 55%, + var(--wui-color-bg-200) 60%, + var(--wui-color-bg-200) calc(60% + 10px), + var(--wui-color-bg-150) calc(60% + 12px), + var(--wui-color-bg-150) 100% + ); + background-size: 250%; + } + + @keyframes shimmer { + from { + background-position: -250% 0; + } + to { + background-position: 250% 0; + } + } +`;var ky=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 Up=class extends vt{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=` + width: ${this.width}; + height: ${this.height}; + border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`}; + `,Pe``}};Up.styles=[cle];ky([he()],Up.prototype,"width",void 0);ky([he()],Up.prototype,"height",void 0);ky([he()],Up.prototype,"borderRadius",void 0);ky([he()],Up.prototype,"variant",void 0);Up=ky([Re("wui-shimmer")],Up);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const gF={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},mF=r=>(...e)=>({_$litDirective$:r,values:e});let wF=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this.t=e,this._$AM=t,this.i=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const vF=mF(class extends wF{constructor(r){var e;if(super(r),r.type!==gF.ATTRIBUTE||r.name!=="class"||((e=r.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){var n,i;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((n=this.nt)!=null&&n.has(s))&&this.st.add(s);return this.render(e)}const t=r.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const o=!!e[s];o===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(o?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return Lp}}),lle=dt` + :host { + display: inline-flex !important; + } + + slot { + width: 100%; + display: inline-block; + font-style: normal; + font-family: var(--wui-font-family); + font-feature-settings: + 'tnum' on, + 'lnum' on, + 'case' on; + line-height: 130%; + font-weight: var(--wui-font-weight-regular); + overflow: inherit; + text-overflow: inherit; + text-align: var(--local-align); + color: var(--local-color); + } + + .wui-line-clamp-1 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } + + .wui-line-clamp-2 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + } + + .wui-font-medium-400 { + font-size: var(--wui-font-size-medium); + font-weight: var(--wui-font-weight-light); + letter-spacing: var(--wui-letter-spacing-medium); + } + + .wui-font-medium-600 { + font-size: var(--wui-font-size-medium); + letter-spacing: var(--wui-letter-spacing-medium); + } + + .wui-font-title-600 { + font-size: var(--wui-font-size-title); + letter-spacing: var(--wui-letter-spacing-title); + } + + .wui-font-title-6-600 { + font-size: var(--wui-font-size-title-6); + letter-spacing: var(--wui-letter-spacing-title-6); + } + + .wui-font-mini-700 { + font-size: var(--wui-font-size-mini); + letter-spacing: var(--wui-letter-spacing-mini); + text-transform: uppercase; + } + + .wui-font-large-500, + .wui-font-large-600, + .wui-font-large-700 { + font-size: var(--wui-font-size-large); + letter-spacing: var(--wui-letter-spacing-large); + } + + .wui-font-2xl-500, + .wui-font-2xl-600, + .wui-font-2xl-700 { + font-size: var(--wui-font-size-2xl); + letter-spacing: var(--wui-letter-spacing-2xl); + } + + .wui-font-paragraph-400, + .wui-font-paragraph-500, + .wui-font-paragraph-600, + .wui-font-paragraph-700 { + font-size: var(--wui-font-size-paragraph); + letter-spacing: var(--wui-letter-spacing-paragraph); + } + + .wui-font-small-400, + .wui-font-small-500, + .wui-font-small-600 { + font-size: var(--wui-font-size-small); + letter-spacing: var(--wui-letter-spacing-small); + } + + .wui-font-tiny-400, + .wui-font-tiny-500, + .wui-font-tiny-600 { + font-size: var(--wui-font-size-tiny); + letter-spacing: var(--wui-letter-spacing-tiny); + } + + .wui-font-micro-700, + .wui-font-micro-600 { + font-size: var(--wui-font-size-micro); + letter-spacing: var(--wui-letter-spacing-micro); + text-transform: uppercase; + } + + .wui-font-tiny-400, + .wui-font-small-400, + .wui-font-medium-400, + .wui-font-paragraph-400 { + font-weight: var(--wui-font-weight-light); + } + + .wui-font-large-700, + .wui-font-paragraph-700, + .wui-font-micro-700, + .wui-font-mini-700 { + font-weight: var(--wui-font-weight-bold); + } + + .wui-font-medium-600, + .wui-font-medium-title-600, + .wui-font-title-6-600, + .wui-font-large-600, + .wui-font-paragraph-600, + .wui-font-small-600, + .wui-font-tiny-600, + .wui-font-micro-600 { + font-weight: var(--wui-font-weight-medium); + } + + :host([disabled]) { + opacity: 0.4; + } +`;var Ny=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 Fp=class extends vt{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left",this.lineClamp=void 0}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=` + --local-align: ${this.align}; + --local-color: var(--wui-color-${this.color}); + `,Pe``}};Fp.styles=[Rt,lle];Ny([he()],Fp.prototype,"variant",void 0);Ny([he()],Fp.prototype,"color",void 0);Ny([he()],Fp.prototype,"align",void 0);Ny([he()],Fp.prototype,"lineClamp",void 0);Fp=Ny([Re("wui-text")],Fp);const ule=tt` + + + + + + + + `,hle=tt` + + + + + + + + + + + + + + + + `,dle=tt` + + + + + + + + + + + + +`,fle=tt` + + + + + + + + + + + + + `,ple=tt` + + + + + + + + + + + + + + + `,gle=tt` + + + + + +`,mle=tt` + + + + + +`,wle=tt` + + + + + + + + + + `,vle=tt` + + + + + + + + + + + + + + + +`,yle=tt` + + + + + + + + + + `,ble=tt` + + + + + + + + +`,_le=tt` + + + + + + + + + + + + + + + `,xle=tt` + + + + + + + + + + + + + + `,Ale=tt` + + + + + + + + + +`,Ele=tt` + + + + + + + + + + +`,Cle=tt` + + + + + + + + + + +`,Sle=tt` + + + + + + + + + + + + +`,Ile=tt` + + + + + + + + + + + + +`,Tle=tt` + + + + + + + + + +`,Rle=tt` + + + + + + + + + + + + + + + + + + +`,kle=tt` + + + + + + + + + + + + + + + + +`,Nle=dt` + :host { + display: block; + width: var(--local-size); + height: var(--local-size); + } + + :host svg { + width: 100%; + height: 100%; + } +`;var fI=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};const Ple={browser:ule,dao:hle,defi:dle,defiAlt:fle,eth:ple,layers:gle,lock:mle,login:wle,network:vle,nft:yle,noun:ble,profile:_le,system:xle,coinbase:Ale,onrampCard:Ile,moonpay:Ele,stripe:Cle,paypal:Sle,google:Tle,pencil:Rle,lightbulb:kle};let fv=class extends vt{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=` + --local-size: var(--wui-visual-size-${this.size}); + `,Pe`${Ple[this.name]}`}};fv.styles=[Rt,Nle];fI([he()],fv.prototype,"name",void 0);fI([he()],fv.prototype,"size",void 0);fv=fI([Re("wui-visual")],fv);/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const mu=r=>r??pi,Qt={getSpacingStyles(r,e){if(Array.isArray(r))return r[e]?`var(--wui-spacing-${r[e]})`:void 0;if(typeof r=="string")return`var(--wui-spacing-${r})`},getFormattedDate(r){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(r)},getHostName(r){try{return new URL(r).hostname}catch{return""}},getTruncateString({string:r,charsStart:e,charsEnd:t,truncate:n}){return r.length<=e+t?r:n==="end"?`${r.substring(0,e)}...`:n==="start"?`...${r.substring(r.length-t)}`:`${r.substring(0,Math.floor(e))}...${r.substring(r.length-Math.floor(t))}`},generateAvatarColors(r){const t=r.toLowerCase().replace(/^0x/iu,"").substring(0,6),n=this.hexToRgb(t),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),o=100-3*Number(i==null?void 0:i.replace("px","")),a=`${o}% ${o}% at 65% 40%`,c=[];for(let l=0;l<5;l+=1){const h=this.tintColor(n,.15*l);c.push(`rgb(${h[0]}, ${h[1]}, ${h[2]})`)}return` + --local-color-1: ${c[0]}; + --local-color-2: ${c[1]}; + --local-color-3: ${c[2]}; + --local-color-4: ${c[3]}; + --local-color-5: ${c[4]}; + --local-radial-circle: ${a} + `},hexToRgb(r){const e=parseInt(r,16),t=e>>16&255,n=e>>8&255,i=e&255;return[t,n,i]},tintColor(r,e){const[t,n,i]=r,s=Math.round(t+(255-t)*e),o=Math.round(n+(255-n)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(r){return{number:/^[0-9]+$/u}.number.test(r)},getColorTheme(r){return r||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},splitBalance(r){const e=r.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(r,e,t){return r.toString().length>=e?Number(r).toFixed(t):r},formatNumberToLocalString(r,e=2){return r===void 0?"0.00":typeof r=="number"?r.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(r).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},Ole=dt` + :host { + display: flex; + width: inherit; + height: inherit; + } +`;var ba=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 ao=class extends vt{render(){return this.style.cssText=` + flex-direction: ${this.flexDirection}; + flex-wrap: ${this.flexWrap}; + flex-basis: ${this.flexBasis}; + flex-grow: ${this.flexGrow}; + flex-shrink: ${this.flexShrink}; + align-items: ${this.alignItems}; + justify-content: ${this.justifyContent}; + column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; + row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; + gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; + padding-top: ${this.padding&&Qt.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&Qt.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&Qt.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&Qt.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&Qt.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&Qt.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&Qt.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&Qt.getSpacingStyles(this.margin,3)}; + `,Pe``}};ao.styles=[Rt,Ole];ba([he()],ao.prototype,"flexDirection",void 0);ba([he()],ao.prototype,"flexWrap",void 0);ba([he()],ao.prototype,"flexBasis",void 0);ba([he()],ao.prototype,"flexGrow",void 0);ba([he()],ao.prototype,"flexShrink",void 0);ba([he()],ao.prototype,"alignItems",void 0);ba([he()],ao.prototype,"justifyContent",void 0);ba([he()],ao.prototype,"columnGap",void 0);ba([he()],ao.prototype,"rowGap",void 0);ba([he()],ao.prototype,"gap",void 0);ba([he()],ao.prototype,"padding",void 0);ba([he()],ao.prototype,"margin",void 0);ao=ba([Re("wui-flex")],ao);const Mle=dt` + :host { + display: block; + width: var(--local-width); + height: var(--local-height); + border-radius: var(--wui-border-radius-3xl); + box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); + overflow: hidden; + position: relative; + } + + :host([data-variant='generated']) { + --mixed-local-color-1: var(--local-color-1); + --mixed-local-color-2: var(--local-color-2); + --mixed-local-color-3: var(--local-color-3); + --mixed-local-color-4: var(--local-color-4); + --mixed-local-color-5: var(--local-color-5); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :host([data-variant='generated']) { + --mixed-local-color-1: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-1) + ); + --mixed-local-color-2: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-2) + ); + --mixed-local-color-3: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-3) + ); + --mixed-local-color-4: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-4) + ); + --mixed-local-color-5: color-mix( + in srgb, + var(--w3m-color-mix) var(--w3m-color-mix-strength), + var(--local-color-5) + ); + } + } + + :host([data-variant='generated']) { + box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); + background: radial-gradient( + var(--local-radial-circle), + #fff 0.52%, + var(--mixed-local-color-5) 31.25%, + var(--mixed-local-color-3) 51.56%, + var(--mixed-local-color-2) 65.63%, + var(--mixed-local-color-1) 82.29%, + var(--mixed-local-color-4) 100% + ); + } + + :host([data-variant='default']) { + box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005); + background: radial-gradient( + 75.29% 75.29% at 64.96% 24.36%, + #fff 0.52%, + #f5ccfc 31.25%, + #dba4f5 51.56%, + #9a8ee8 65.63%, + #6493da 82.29%, + #6ebdea 100% + ); + } +`;var Py=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 jp=class extends vt{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}render(){return this.style.cssText=` + --local-width: var(--wui-icon-box-size-${this.size}); + --local-height: var(--wui-icon-box-size-${this.size}); + `,Pe`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",Pe``;if(this.address){this.dataset.variant="generated";const e=Qt.generateAvatarColors(this.address);return this.style.cssText+=` + ${e}`,null}return this.dataset.variant="default",null}};jp.styles=[Rt,Mle];Py([he()],jp.prototype,"imageSrc",void 0);Py([he()],jp.prototype,"alt",void 0);Py([he()],jp.prototype,"address",void 0);Py([he()],jp.prototype,"size",void 0);jp=Py([Re("wui-avatar")],jp);const Dle=dt` + :host { + display: inline-flex; + justify-content: center; + align-items: center; + position: relative; + overflow: hidden; + background-color: var(--wui-color-gray-glass-020); + border-radius: var(--local-border-radius); + border: var(--local-border); + box-sizing: content-box; + width: var(--local-size); + height: var(--local-size); + min-height: var(--local-size); + min-width: var(--local-size); + } + + @supports (background: color-mix(in srgb, white 50%, black)) { + :host { + background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent); + } + } +`;var xd=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 dl=class extends vt{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,t=this.size==="lg",n=this.size==="xl",i=t?"12%":"16%",s=t?"xxs":n?"s":"3xl",o=this.background==="gray",a=this.background==="opaque",c=this.backgroundColor==="accent-100"&&a||this.backgroundColor==="success-100"&&a||this.backgroundColor==="error-100"&&a||this.backgroundColor==="inverse-100"&&a;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=` + --local-bg-value: ${l}; + --local-bg-mix: ${c||o?"100%":i}; + --local-border-radius: var(--wui-border-radius-${s}); + --local-size: var(--wui-icon-box-size-${this.size}); + --local-border: ${this.borderColor==="wui-color-bg-125"?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"} + `,Pe` `}};dl.styles=[Rt,lr,Dle];xd([he()],dl.prototype,"size",void 0);xd([he()],dl.prototype,"backgroundColor",void 0);xd([he()],dl.prototype,"iconColor",void 0);xd([he()],dl.prototype,"iconSize",void 0);xd([he()],dl.prototype,"background",void 0);xd([he({type:Boolean})],dl.prototype,"border",void 0);xd([he()],dl.prototype,"borderColor",void 0);xd([he()],dl.prototype,"icon",void 0);dl=xd([Re("wui-icon-box")],dl);const $le=dt` + :host { + display: block; + } + + button { + border-radius: var(--wui-border-radius-3xl); + background: var(--wui-color-gray-glass-002); + display: flex; + gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs) + var(--wui-spacing-xs); + border: 1px solid var(--wui-color-gray-glass-005); + } + + button:disabled { + background: var(--wui-color-gray-glass-015); + } + + button:disabled > wui-text { + color: var(--wui-color-gray-glass-015); + } + + button:disabled > wui-flex > wui-text { + color: var(--wui-color-gray-glass-015); + } + + button:disabled > wui-image, + button:disabled > wui-flex > wui-avatar { + filter: grayscale(1); + } + + button:has(wui-image) { + padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs) + var(--wui-spacing-xs); + } + + wui-text { + color: var(--wui-color-fg-100); + } + + wui-flex > wui-text { + color: var(--wui-color-fg-200); + } + + wui-image, + wui-icon-box { + border-radius: var(--wui-border-radius-3xl); + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + } + + wui-flex { + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-005); + background: var(--wui-color-gray-glass-005); + padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs); + } + + button.local-no-balance { + border-radius: 0px; + border: none; + background: transparent; + } + + wui-avatar { + width: 20px; + height: 20px; + box-shadow: 0 0 0 2px var(--wui-color-accent-glass-010); + } + + @media (max-width: 500px) { + button { + gap: 0px; + padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important; + height: 32px; + } + wui-image, + wui-icon-box, + button > wui-text { + visibility: hidden; + width: 0px; + height: 0px; + } + button { + border-radius: 0px; + border: none; + background: transparent; + padding: 0px; + } + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled > wui-flex > wui-text { + color: var(--wui-color-fg-175); + } + + button:active:enabled > wui-flex > wui-text { + color: var(--wui-color-fg-175); + } + } +`;var Wu=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 hc=class extends vt{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return Pe` + + `}balanceTemplate(){if(this.isUnsupportedChain)return Pe` + Switch Network`;if(this.balance){const e=this.networkSrc?Pe``:Pe` + + `;return Pe` + ${e} + ${this.balance} + `}return null}};hc.styles=[Rt,lr,$le];Wu([he()],hc.prototype,"networkSrc",void 0);Wu([he()],hc.prototype,"avatarSrc",void 0);Wu([he()],hc.prototype,"balance",void 0);Wu([he({type:Boolean})],hc.prototype,"isUnsupportedChain",void 0);Wu([he({type:Boolean})],hc.prototype,"disabled",void 0);Wu([he()],hc.prototype,"address",void 0);Wu([he()],hc.prototype,"profileName",void 0);Wu([he()],hc.prototype,"charsStart",void 0);Wu([he()],hc.prototype,"charsEnd",void 0);hc=Wu([Re("wui-account-button")],hc);const Ble=dt` + :host { + position: relative; + background-color: var(--wui-color-gray-glass-002); + display: flex; + justify-content: center; + align-items: center; + width: var(--local-size); + height: var(--local-size); + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host > wui-flex { + overflow: hidden; + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-color-gray-glass-010); + pointer-events: none; + } + + :host([name='Extension'])::after { + border: 1px solid var(--wui-color-accent-glass-010); + } + + :host([data-wallet-icon='allWallets']) { + background-color: var(--wui-all-wallets-bg-100); + } + + :host([data-wallet-icon='allWallets'])::after { + border: 1px solid var(--wui-color-accent-glass-010); + } + + wui-icon[data-parent-size='inherit'] { + width: 75%; + height: 75%; + align-items: center; + } + + wui-icon[data-parent-size='sm'] { + width: 18px; + height: 18px; + } + + wui-icon[data-parent-size='md'] { + width: 24px; + height: 24px; + } + + wui-icon[data-parent-size='lg'] { + width: 42px; + height: 42px; + } + + wui-icon[data-parent-size='full'] { + width: 100%; + height: 100%; + } + + :host > wui-icon-box { + position: absolute; + overflow: hidden; + right: -1px; + bottom: -2px; + z-index: 1; + border: 2px solid var(--wui-color-bg-150, #1e1f1f); + padding: 1px; + } +`;var g1=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 sd=class extends vt{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=` + --local-border-radius: var(--wui-border-radius-${e}); + --local-size: var(--wui-wallet-image-size-${this.size}); + `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),Pe` + ${this.templateVisual()} + `}templateVisual(){return this.imageSrc?Pe``:this.walletIcon?Pe``:Pe``}};sd.styles=[Rt,Ble];g1([he()],sd.prototype,"size",void 0);g1([he()],sd.prototype,"name",void 0);g1([he()],sd.prototype,"imageSrc",void 0);g1([he()],sd.prototype,"walletIcon",void 0);g1([he({type:Boolean})],sd.prototype,"installed",void 0);g1([he()],sd.prototype,"badgeSize",void 0);sd=g1([Re("wui-wallet-image")],sd);const Lle=dt` + :host { + position: relative; + border-radius: var(--wui-border-radius-xxs); + width: 40px; + height: 40px; + overflow: hidden; + background: var(--wui-color-gray-glass-002); + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + gap: var(--wui-spacing-4xs); + padding: 3.75px !important; + } + + :host::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-color-gray-glass-010); + pointer-events: none; + } + + :host > wui-wallet-image { + width: 14px; + height: 14px; + border-radius: var(--wui-border-radius-5xs); + } + + :host > wui-flex { + padding: 2px; + position: fixed; + overflow: hidden; + left: 34px; + bottom: 8px; + background: var(--dark-background-150, #1e1f1f); + border-radius: 50%; + z-index: 2; + display: flex; + } +`;var yF=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};const vE=4;let A6=class extends vt{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.lengthPe` + + `)} + ${e?[...Array(vE-this.walletImages.length)].map(()=>Pe` `):null} + + + `}};A6.styles=[Rt,Lle];yF([he({type:Array})],A6.prototype,"walletImages",void 0);A6=yF([Re("wui-all-wallets-image")],A6);const Ule=dt` + :host { + width: var(--local-width); + position: relative; + } + + button { + border: none; + border-radius: var(--local-border-radius); + width: var(--local-width); + white-space: nowrap; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='md'] { + padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l); + height: 36px; + } + + button[data-size='md'][data-icon-left='true'][data-icon-right='false'] { + padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s); + } + + button[data-size='md'][data-icon-right='true'][data-icon-left='false'] { + padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l); + } + + button[data-size='lg'] { + padding: var(--wui-spacing-m) var(--wui-spacing-2l); + height: 48px; + } + + /* -- Variants --------------------------------------------------------- */ + button[data-variant='main'] { + background-color: var(--wui-color-accent-100); + color: var(--wui-color-inverse-100); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + button[data-variant='inverse'] { + background-color: var(--wui-color-inverse-100); + color: var(--wui-color-inverse-000); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + button[data-variant='accent'] { + background-color: var(--wui-color-accent-glass-010); + color: var(--wui-color-accent-100); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + button[data-variant='accent-error'] { + background: var(--wui-color-error-glass-015); + color: var(--wui-color-error-100); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010); + } + + button[data-variant='accent-success'] { + background: var(--wui-color-success-glass-015); + color: var(--wui-color-success-100); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010); + } + + button[data-variant='neutral'] { + background: transparent; + color: var(--wui-color-fg-100); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + /* -- Focus states --------------------------------------------------- */ + button[data-variant='main']:focus-visible:enabled { + background-color: var(--wui-color-accent-090); + box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0 0 0 4px var(--wui-color-accent-glass-020); + } + button[data-variant='inverse']:focus-visible:enabled { + background-color: var(--wui-color-inverse-100); + box-shadow: + inset 0 0 0 1px var(--wui-color-gray-glass-010), + 0 0 0 4px var(--wui-color-accent-glass-020); + } + button[data-variant='accent']:focus-visible:enabled { + background-color: var(--wui-color-accent-glass-010); + box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0 0 0 4px var(--wui-color-accent-glass-020); + } + button[data-variant='accent-error']:focus-visible:enabled { + background: var(--wui-color-error-glass-015); + box-shadow: + inset 0 0 0 1px var(--wui-color-error-100), + 0 0 0 4px var(--wui-color-error-glass-020); + } + button[data-variant='accent-success']:focus-visible:enabled { + background: var(--wui-color-success-glass-015); + box-shadow: + inset 0 0 0 1px var(--wui-color-success-100), + 0 0 0 4px var(--wui-color-success-glass-020); + } + button[data-variant='neutral']:focus-visible:enabled { + background: var(--wui-color-gray-glass-005); + box-shadow: + inset 0 0 0 1px var(--wui-color-gray-glass-010), + 0 0 0 4px var(--wui-color-gray-glass-002); + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + button[data-variant='main']:hover:enabled { + background-color: var(--wui-color-accent-090); + } + + button[data-variant='main']:active:enabled { + background-color: var(--wui-color-accent-080); + } + + button[data-variant='accent']:hover:enabled { + background-color: var(--wui-color-accent-glass-015); + } + + button[data-variant='accent']:active:enabled { + background-color: var(--wui-color-accent-glass-020); + } + + button[data-variant='accent-error']:hover:enabled { + background: var(--wui-color-error-glass-020); + color: var(--wui-color-error-100); + } + + button[data-variant='accent-error']:active:enabled { + background: var(--wui-color-error-glass-030); + color: var(--wui-color-error-100); + } + + button[data-variant='accent-success']:hover:enabled { + background: var(--wui-color-success-glass-020); + color: var(--wui-color-success-100); + } + + button[data-variant='accent-success']:active:enabled { + background: var(--wui-color-success-glass-030); + color: var(--wui-color-success-100); + } + + button[data-variant='neutral']:hover:enabled { + background: var(--wui-color-gray-glass-002); + } + + button[data-variant='neutral']:active:enabled { + background: var(--wui-color-gray-glass-005); + } + + button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] { + padding-left: var(--wui-spacing-m); + } + + button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] { + padding-right: var(--wui-spacing-m); + } + } + + /* -- Disabled state --------------------------------------------------- */ + button:disabled { + background-color: var(--wui-color-gray-glass-002); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + color: var(--wui-color-gray-glass-020); + cursor: not-allowed; + } + + button > wui-text { + transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: opacity; + opacity: var(--local-opacity-100); + } + + ::slotted(*) { + transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: opacity; + opacity: var(--local-opacity-100); + } + + wui-loading-spinner { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + opacity: var(--local-opacity-000); + } +`;var zu=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};const $P={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},Fle={lg:"paragraph-600",md:"small-600"},jle={lg:"md",md:"md"};let dc=class extends vt{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=` + --local-width: ${this.fullWidth?"100%":"auto"}; + --local-opacity-100: ${this.loading?0:1}; + --local-opacity-000: ${this.loading?1:0}; + --local-border-radius: var(--wui-border-radius-${this.borderRadius}); + `;const e=this.textVariant??Fle[this.size];return Pe` + + `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=jle[this.size],t=this.disabled?$P.disabled:$P[this.variant];return Pe``}return Pe``}};dc.styles=[Rt,lr,Ule];zu([he()],dc.prototype,"size",void 0);zu([he({type:Boolean})],dc.prototype,"disabled",void 0);zu([he({type:Boolean})],dc.prototype,"fullWidth",void 0);zu([he({type:Boolean})],dc.prototype,"loading",void 0);zu([he()],dc.prototype,"variant",void 0);zu([he({type:Boolean})],dc.prototype,"hasIconLeft",void 0);zu([he({type:Boolean})],dc.prototype,"hasIconRight",void 0);zu([he()],dc.prototype,"borderRadius",void 0);zu([he()],dc.prototype,"textVariant",void 0);dc=zu([Re("wui-button")],dc);const bF=tt` + +`,Hle=dt` + :host { + display: flex; + flex-direction: column; + align-items: center; + width: 76px; + row-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xs) 10px; + background-color: var(--wui-color-gray-glass-002); + border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); + position: relative; + } + + wui-shimmer[data-type='network'] { + border: none; + -webkit-clip-path: var(--wui-path-network); + clip-path: var(--wui-path-network); + } + + svg { + position: absolute; + width: 48px; + height: 54px; + z-index: 1; + } + + svg > path { + stroke: var(--wui-color-gray-glass-010); + stroke-width: 1px; + } +`;var _F=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 E6=class extends vt{constructor(){super(...arguments),this.type="wallet"}render(){return Pe` + ${this.shimmerTemplate()} + + `}shimmerTemplate(){return this.type==="network"?Pe` + ${bF}`:Pe``}};E6.styles=[Rt,lr,Hle];_F([he()],E6.prototype,"type",void 0);E6=_F([Re("wui-card-select-loader")],E6);const Wle=tt` + + + +`,zle=tt` + +`,Vle=dt` + :host { + position: relative; + border-radius: inherit; + display: flex; + justify-content: center; + align-items: center; + width: var(--local-width); + height: var(--local-height); + } + + :host([data-round='true']) { + background: var(--wui-color-gray-glass-002); + border-radius: 100%; + outline: 1px solid var(--wui-color-gray-glass-005); + } + + svg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + fill: var(--wui-color-gray-glass-002); + } + + svg > path { + stroke: var(--local-stroke); + } + + wui-image { + width: 100%; + height: 100%; + -webkit-clip-path: var(--local-path); + clip-path: var(--local-path); + background: var(--wui-color-gray-glass-002); + } + + wui-icon { + transform: translateY(-5%); + width: var(--local-icon-size); + height: var(--local-icon-size); + } +`;var m1=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 od=class extends vt{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:Wle,md:bF,lg:zle},this.selected=!1,this.round=!1}render(){return this.round?(this.dataset.round="true",this.style.cssText=` + --local-width: var(--wui-spacing-3xl); + --local-height: var(--wui-spacing-3xl); + --local-icon-size: var(--wui-spacing-l); + `):this.style.cssText=` + + --local-path: var(--wui-path-network-${this.size}); + --local-width: var(--wui-width-network-${this.size}); + --local-height: var(--wui-height-network-${this.size}); + --local-icon-size: var(--wui-icon-size-network-${this.size}); + `,Pe`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?Pe``:Pe``}};od.styles=[Rt,Vle];m1([he()],od.prototype,"size",void 0);m1([he()],od.prototype,"name",void 0);m1([he({type:Object})],od.prototype,"networkImagesBySize",void 0);m1([he()],od.prototype,"imageSrc",void 0);m1([he({type:Boolean})],od.prototype,"selected",void 0);m1([he({type:Boolean})],od.prototype,"round",void 0);od=m1([Re("wui-network-image")],od);const qle=dt` + button { + flex-direction: column; + width: 76px; + row-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xs) var(--wui-spacing-0); + background-color: var(--wui-color-gray-glass-002); + border-radius: clamp(0px, var(--wui-border-radius-xs), 20px); + } + + button > wui-text { + color: var(--wui-color-fg-100); + max-width: var(--wui-icon-box-size-xl); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + justify-content: center; + } + + button:disabled > wui-text { + color: var(--wui-color-gray-glass-015); + } + + [data-selected='true'] { + background-color: var(--wui-color-accent-glass-020); + } + + @media (hover: hover) and (pointer: fine) { + [data-selected='true']:hover:enabled { + background-color: var(--wui-color-accent-glass-015); + } + } + + [data-selected='true']:active:enabled { + background-color: var(--wui-color-accent-glass-010); + } +`;var w1=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 ad=class extends vt{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return Pe` + + `}imageTemplate(){return this.type==="network"?Pe` + + + `:Pe` + + + `}};ad.styles=[Rt,lr,qle];w1([he()],ad.prototype,"name",void 0);w1([he()],ad.prototype,"type",void 0);w1([he()],ad.prototype,"imageSrc",void 0);w1([he({type:Boolean})],ad.prototype,"disabled",void 0);w1([he({type:Boolean})],ad.prototype,"selected",void 0);w1([he({type:Boolean})],ad.prototype,"installed",void 0);ad=w1([Re("wui-card-select")],ad);const Kle=dt` + a { + border: 1px solid var(--wui-color-gray-glass-010); + border-radius: var(--wui-border-radius-3xl); + } + + wui-image { + border-radius: var(--wui-border-radius-3xl); + overflow: hidden; + } + + a.disabled > wui-icon, + a.disabled > wui-image { + filter: grayscale(1); + } + + a[data-variant='fill'] { + color: var(--wui-color-inverse-100); + background-color: var(--wui-color-accent-100); + } + + a[data-variant='shade'], + a[data-variant='shadeSmall'] { + background-color: transparent; + background-color: var(--wui-color-gray-glass-010); + color: var(--wui-color-fg-200); + } + + a[data-variant='success'] { + column-gap: var(--wui-spacing-xxs); + border: 1px solid var(--wui-color-success-glass-010); + background-color: var(--wui-color-success-glass-010); + color: var(--wui-color-success-100); + } + + a[data-variant='error'] { + column-gap: var(--wui-spacing-xxs); + border: 1px solid var(--wui-color-error-glass-010); + background-color: var(--wui-color-error-glass-010); + color: var(--wui-color-error-100); + } + + a[data-variant='transparent'] { + column-gap: var(--wui-spacing-xxs); + background-color: transparent; + color: var(--wui-color-fg-150); + } + + a[data-variant='transparent'], + a[data-variant='success'], + a[data-variant='shadeSmall'], + a[data-variant='error'] { + padding: 7px var(--wui-spacing-s) 7px 10px; + } + + a[data-variant='transparent']:has(wui-text:first-child), + a[data-variant='success']:has(wui-text:first-child), + a[data-variant='shadeSmall']:has(wui-text:first-child), + a[data-variant='error']:has(wui-text:first-child) { + padding: 7px var(--wui-spacing-s); + } + + a[data-variant='fill'], + a[data-variant='shade'] { + column-gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs) + var(--wui-spacing-xs); + } + + a[data-variant='fill']:has(wui-text:first-child), + a[data-variant='shade']:has(wui-text:first-child) { + padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m); + } + + a[data-variant='fill'] > wui-image, + a[data-variant='shade'] > wui-image { + width: 24px; + height: 24px; + } + + a[data-variant='fill'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); + } + + a[data-variant='shade'] > wui-image, + a[data-variant='shadeSmall'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + a[data-variant='fill'] > wui-icon, + a[data-variant='shade'] > wui-icon { + width: 14px; + height: 14px; + } + + a[data-variant='transparent'] > wui-image, + a[data-variant='success'] > wui-image, + a[data-variant='shadeSmall'] > wui-image, + a[data-variant='error'] > wui-image { + width: 14px; + height: 14px; + } + + a[data-variant='transparent'] > wui-icon, + a[data-variant='success'] > wui-icon, + a[data-variant='shadeSmall'] > wui-icon, + a[data-variant='error'] > wui-icon { + width: 12px; + height: 12px; + } + + a[data-variant='fill']:focus-visible { + background-color: var(--wui-color-accent-090); + } + + a[data-variant='shade']:focus-visible, + a[data-variant='shadeSmall']:focus-visible { + background-color: var(--wui-color-gray-glass-015); + } + + a[data-variant='transparent']:focus-visible { + background-color: var(--wui-color-gray-glass-005); + } + + a[data-variant='success']:focus-visible { + background-color: var(--wui-color-success-glass-015); + } + + a[data-variant='error']:focus-visible { + background-color: var(--wui-color-error-glass-015); + } + + a.disabled { + color: var(--wui-color-gray-glass-015); + background-color: var(--wui-color-gray-glass-015); + pointer-events: none; + } + + @media (hover: hover) and (pointer: fine) { + a[data-variant='fill']:hover { + background-color: var(--wui-color-accent-090); + } + + a[data-variant='shade']:hover, + a[data-variant='shadeSmall']:hover { + background-color: var(--wui-color-gray-glass-015); + } + + a[data-variant='transparent']:hover { + background-color: var(--wui-color-gray-glass-005); + } + + a[data-variant='success']:hover { + background-color: var(--wui-color-success-glass-015); + } + + a[data-variant='error']:hover { + background-color: var(--wui-color-error-glass-015); + } + } + + a[data-variant='fill']:active { + background-color: var(--wui-color-accent-080); + } + + a[data-variant='shade']:active, + a[data-variant='shadeSmall']:active { + background-color: var(--wui-color-gray-glass-020); + } + + a[data-variant='transparent']:active { + background-color: var(--wui-color-gray-glass-010); + } + + a[data-variant='success']:active { + background-color: var(--wui-color-success-glass-020); + } + + a[data-variant='error']:active { + background-color: var(--wui-color-error-glass-020); + } +`;var v1=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 cd=class extends vt{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const t=this.variant==="success"||this.variant==="transparent"||this.variant==="shadeSmall"?"small-600":"paragraph-600";return Pe` + + ${this.imageTemplate()} + + ${this.title?this.title:Qt.getHostName(this.href)} + + + + `}imageTemplate(){return this.imageSrc?Pe``:null}};cd.styles=[Rt,lr,Kle];v1([he()],cd.prototype,"variant",void 0);v1([he()],cd.prototype,"imageSrc",void 0);v1([he({type:Boolean})],cd.prototype,"disabled",void 0);v1([he()],cd.prototype,"icon",void 0);v1([he()],cd.prototype,"href",void 0);v1([he()],cd.prototype,"text",void 0);cd=v1([Re("wui-chip")],cd);const Gle=dt` + :host { + position: relative; + display: block; + } + + button { + background: var(--wui-color-accent-100); + border: 1px solid var(--wui-color-gray-glass-010); + border-radius: var(--wui-border-radius-m); + gap: var(--wui-spacing-xs); + } + + button.loading { + background: var(--wui-color-gray-glass-010); + border: 1px solid var(--wui-color-gray-glass-010); + pointer-events: none; + } + + button:disabled { + background-color: var(--wui-color-gray-glass-015); + border: 1px solid var(--wui-color-gray-glass-010); + } + + button:disabled > wui-text { + color: var(--wui-color-gray-glass-015); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-accent-090); + } + + button:active:enabled { + background-color: var(--wui-color-accent-080); + } + } + + button:focus-visible { + border: 1px solid var(--wui-color-gray-glass-010); + background-color: var(--wui-color-accent-090); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + button[data-size='sm'] { + padding: 6.75px 10px 7.25px; + } + + ::slotted(*) { + transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: opacity; + opacity: var(--local-opacity-100); + } + + button > wui-text { + transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: opacity; + opacity: var(--local-opacity-100); + color: var(--wui-color-inverse-100); + } + + button[data-size='md'] { + padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l); + } + + button[data-size='md'] + wui-text { + padding-left: var(--wui-spacing-3xs); + } + + @media (max-width: 500px) { + button[data-size='md'] { + height: 32px; + padding: 5px 12px; + } + + button[data-size='md'] > wui-text > slot { + font-size: 14px !important; + } + } + + wui-loading-spinner { + width: 14px; + height: 14px; + } + + wui-loading-spinner::slotted(svg) { + width: 10px !important; + height: 10px !important; + } + + button[data-size='sm'] > wui-loading-spinner { + width: 12px; + height: 12px; + } +`;var pI=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 pv=class extends vt{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e=this.size==="md"?"paragraph-600":"small-600";return Pe` + + `}loadingTemplate(){return this.loading?Pe``:null}};pv.styles=[Rt,lr,Gle];pI([he()],pv.prototype,"size",void 0);pI([he({type:Boolean})],pv.prototype,"loading",void 0);pv=pI([Re("wui-connect-button")],pv);const Zle=dt` + wui-flex { + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } +`;var h_=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 ow=class extends vt{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return Pe` + + ${this.label} + + + + `}};ow.styles=[Rt,lr,Zle];h_([he({type:Boolean})],ow.prototype,"disabled",void 0);h_([he()],ow.prototype,"label",void 0);h_([he()],ow.prototype,"buttonLabel",void 0);ow=h_([Re("wui-cta-button")],ow);const Yle=dt` + :host { + display: block; + padding: var(--wui-spacing-l) var(--wui-spacing-m); + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + width: 100%; + } +`;var Qle=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 D9=class extends vt{render(){return Pe` + + + + `}};D9.styles=[Rt,lr,Yle];D9=Qle([Re("wui-details-group")],D9);const Jle=dt` + :host { + display: flex; + flex-direction: row; + gap: var(--wui-spacing-l); + width: 100%; + border-radius: var(--wui-border-radius-xs); + } +`;var xF=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 C6=class extends vt{constructor(){super(...arguments),this.name=""}render(){return Pe` + + ${this.name} + + + + + `}};C6.styles=[Rt,lr,Jle];xF([he()],C6.prototype,"name",void 0);C6=xF([Re("wui-details-group-item")],C6);const Xle=dt` + :host { + z-index: calc(var(--w3m-z-index) + 1); + width: 200px; + padding: var(--wui-spacing-3xs); + align-items: center; + display: inherit; + border-radius: var(--wui-border-radius-xs); + border: 1px solid var(--wui-color-gray-glass-002); + background: var(--wui-color-fg-base-125); + /* Dark/Elevation/L */ + box-shadow: + 0px 8px 22px -6px rgba(0, 0, 0, 0.12), + 0px 14px 64px -4px rgba(0, 0, 0, 0.12); + } +`;var gI=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 gv=class extends vt{constructor(){super(...arguments),this.actions=[],this.isOpen=!1}render(){return this.isOpen?Pe` + + ${this.actions.map(e=>Pe` + + ${e.label} + + `)} + + `:null}};gv.styles=[Rt,lr,Xle];gI([he({type:Array})],gv.prototype,"actions",void 0);gI([he({type:Boolean})],gv.prototype,"isOpen",void 0);gv=gI([Re("wui-dropdown-menu")],gv);/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const eue=r=>r.strings===void 0;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const I3=(r,e)=>{var n;const t=r._$AN;if(t===void 0)return!1;for(const i of t)(n=i._$AO)==null||n.call(i,e,!1),I3(i,e);return!0},S6=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while((t==null?void 0:t.size)===0)},AF=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),nue(e)}};function tue(r){this._$AN!==void 0?(S6(this),this._$AM=r,AF(this)):this._$AM=r}function rue(r,e=!1,t=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=t;s{r.type==gF.CHILD&&(r._$AP??(r._$AP=rue),r._$AQ??(r._$AQ=tue))};let iue=class extends wF{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),AF(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.call(this)),t&&(I3(this,e),S6(this))}setValue(e){if(eue(this.t))this.t._$AI(e,this);else{const t=[...this.t._$AH];t[this.i]=e,this.t._$AI(t,this,0)}}disconnected(){}reconnected(){}};/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const mI=()=>new sue;let sue=class{};const yE=new WeakMap,wI=mF(class extends iue{render(r){return pi}update(r,[e]){var n;const t=e!==this.Y;return t&&this.Y!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.Y=e,this.ht=(n=r.options)==null?void 0:n.host,this.rt(this.ct=r.element)),pi}rt(r){if(this.isConnected||(r=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let t=yE.get(e);t===void 0&&(t=new WeakMap,yE.set(e,t)),t.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),t.set(this.Y,r),r!==void 0&&this.Y.call(this.ht,r)}else this.Y.value=r}get lt(){var r,e;return typeof this.Y=="function"?(r=yE.get(this.ht??globalThis))==null?void 0:r.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),oue=dt` + :host { + position: relative; + width: 100%; + display: inline-block; + color: var(--wui-color-fg-275); + } + + input { + width: 100%; + border-radius: var(--wui-border-radius-xs); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + background: var(--wui-color-gray-glass-002); + font-size: var(--wui-font-size-paragraph); + letter-spacing: var(--wui-letter-spacing-paragraph); + color: var(--wui-color-fg-100); + transition: + background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), + border-color var(--wui-ease-inout-power-1) var(--wui-duration-md), + box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); + will-change: background-color, border-color, box-shadow; + caret-color: var(--wui-color-accent-100); + } + + input:disabled { + cursor: not-allowed; + border: 1px solid var(--wui-color-gray-glass-010); + } + + input:disabled::placeholder, + input:disabled + wui-icon { + color: var(--wui-color-fg-300); + } + + input::placeholder { + color: var(--wui-color-fg-275); + } + + input:focus:enabled { + background-color: var(--wui-color-gray-glass-005); + -webkit-box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + input:hover:enabled { + background-color: var(--wui-color-gray-glass-005); + } + + wui-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + pointer-events: none; + } + + .wui-size-sm { + padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s); + } + + wui-icon + .wui-size-sm { + padding: 9px var(--wui-spacing-m) 10px 36px; + } + + wui-icon[data-input='sm'] { + left: var(--wui-spacing-s); + } + + .wui-size-md { + padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m); + } + + wui-icon + .wui-size-md, + wui-loading-spinner + .wui-size-md { + padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl); + } + + wui-icon[data-input='md'] { + left: var(--wui-spacing-l); + } + + .wui-size-lg { + padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l); + letter-spacing: var(--wui-letter-spacing-medium-title); + font-size: var(--wui-font-size-medium-title); + font-weight: var(--wui-font-weight-light); + line-height: 130%; + color: var(--wui-color-fg-100); + height: 64px; + } + + .wui-padding-right-xs { + padding-right: var(--wui-spacing-xs); + } + + .wui-padding-right-s { + padding-right: var(--wui-spacing-s); + } + + .wui-padding-right-m { + padding-right: var(--wui-spacing-m); + } + + .wui-padding-right-l { + padding-right: var(--wui-spacing-l); + } + + .wui-padding-right-xl { + padding-right: var(--wui-spacing-xl); + } + + .wui-padding-right-2xl { + padding-right: var(--wui-spacing-2xl); + } + + .wui-padding-right-3xl { + padding-right: var(--wui-spacing-3xl); + } + + .wui-padding-right-4xl { + padding-right: var(--wui-spacing-4xl); + } + + .wui-padding-right-5xl { + padding-right: var(--wui-spacing-5xl); + } + + wui-icon + .wui-size-lg, + wui-loading-spinner + .wui-size-lg { + padding-left: 50px; + } + + wui-icon[data-input='lg'] { + left: var(--wui-spacing-l); + } + + .wui-size-mdl { + padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m); + } + wui-icon + .wui-size-mdl, + wui-loading-spinner + .wui-size-mdl { + padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px; + } + wui-icon[data-input='mdl'] { + left: var(--wui-spacing-m); + } + + input:placeholder-shown ~ ::slotted(wui-input-element), + input:placeholder-shown ~ ::slotted(wui-icon) { + opacity: 0; + pointer-events: none; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + ::slotted(wui-input-element), + ::slotted(wui-icon) { + position: absolute; + top: 50%; + transform: translateY(-50%); + } + + ::slotted(wui-input-element) { + right: var(--wui-spacing-m); + } + + ::slotted(wui-icon) { + right: 0px; + } +`;var Ad=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 fl=class extends vt{constructor(){super(...arguments),this.inputElementRef=mI(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,n={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return Pe`${this.templateIcon()} + + `}templateIcon(){return this.icon?Pe``:null}dispatchInputChangeEvent(){var e;this.dispatchEvent(new CustomEvent("inputChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.value,bubbles:!0,composed:!0}))}};fl.styles=[Rt,lr,oue];Ad([he()],fl.prototype,"size",void 0);Ad([he()],fl.prototype,"icon",void 0);Ad([he({type:Boolean})],fl.prototype,"disabled",void 0);Ad([he()],fl.prototype,"placeholder",void 0);Ad([he()],fl.prototype,"type",void 0);Ad([he()],fl.prototype,"keyHint",void 0);Ad([he()],fl.prototype,"value",void 0);Ad([he()],fl.prototype,"inputRightPadding",void 0);fl=Ad([Re("wui-input-text")],fl);const aue=dt` + :host { + position: relative; + display: inline-block; + } + + wui-text { + margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); + } +`;var d_=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 aw=class extends vt{constructor(){super(...arguments),this.disabled=!1}render(){return Pe` + + ${this.templateError()} + `}templateError(){return this.errorMessage?Pe`${this.errorMessage}`:null}};aw.styles=[Rt,aue];d_([he()],aw.prototype,"errorMessage",void 0);d_([he({type:Boolean})],aw.prototype,"disabled",void 0);d_([he()],aw.prototype,"value",void 0);aw=d_([Re("wui-email-input")],aw);const cue=dt` + :host { + position: relative; + width: 100%; + display: inline-block; + color: var(--wui-color-fg-275); + } + + .error { + margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m); + } + + .base-name { + position: absolute; + right: 45px; + top: 15px; + text-align: right; + } +`;var Oy=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 Hp=class extends vt{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return Pe` + + ${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()} + + `}baseNameTemplate(){return Pe` + ${vn.WC_NAME_SUFFIX} + `}loadingTemplate(){return this.loading?Pe``:null}errorTemplate(){return this.errorMessage?Pe`${this.errorMessage}`:null}};Hp.styles=[Rt,cue];Oy([he()],Hp.prototype,"errorMessage",void 0);Oy([he({type:Boolean})],Hp.prototype,"disabled",void 0);Oy([he()],Hp.prototype,"value",void 0);Oy([he({type:Boolean})],Hp.prototype,"loading",void 0);Hp=Oy([Re("wui-ens-input")],Hp);const lue=dt` + button { + border-radius: var(--local-border-radius); + color: var(--wui-color-fg-100); + padding: var(--local-padding); + } + + @media (max-width: 700px) { + button { + padding: var(--wui-spacing-s); + } + } + + button > wui-icon { + pointer-events: none; + } + + button:disabled > wui-icon { + color: var(--wui-color-bg-300) !important; + } + + button:disabled { + background-color: transparent; + } +`;var My=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 Wp=class extends vt{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){const e=this.size==="lg"?"--wui-border-radius-xs":"--wui-border-radius-xxs",t=this.size==="lg"?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=` + --local-border-radius: var(${e}); + --local-padding: var(${t}); +`,Pe` + + `}};Wp.styles=[Rt,lr,c_,lue];My([he()],Wp.prototype,"size",void 0);My([he({type:Boolean})],Wp.prototype,"disabled",void 0);My([he()],Wp.prototype,"icon",void 0);My([he()],Wp.prototype,"iconColor",void 0);Wp=My([Re("wui-icon-link")],Wp);const uue=dt` + button { + background-color: var(--wui-color-fg-300); + border-radius: var(--wui-border-radius-4xs); + width: 16px; + height: 16px; + } + + button:disabled { + background-color: var(--wui-color-bg-300); + } + + wui-icon { + color: var(--wui-color-bg-200) !important; + } + + button:focus-visible { + background-color: var(--wui-color-fg-250); + border: 1px solid var(--wui-color-accent-100); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-fg-250); + } + + button:active:enabled { + background-color: var(--wui-color-fg-225); + } + } +`;var EF=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 I6=class extends vt{constructor(){super(...arguments),this.icon="copy"}render(){return Pe` + + `}};I6.styles=[Rt,lr,uue];EF([he()],I6.prototype,"icon",void 0);I6=EF([Re("wui-input-element")],I6);const hue=dt` + :host { + position: relative; + display: inline-block; + } + + input { + width: 50px; + height: 50px; + background: var(--wui-color-gray-glass-010); + border-radius: var(--wui-border-radius-xs); + border: 1px solid var(--wui-color-gray-glass-005); + font-family: var(--wui-font-family); + font-size: var(--wui-font-size-large); + font-weight: var(--wui-font-weight-regular); + letter-spacing: var(--wui-letter-spacing-large); + text-align: center; + color: var(--wui-color-fg-100); + caret-color: var(--wui-color-accent-100); + transition: + background-color var(--wui-ease-inout-power-1) var(--wui-duration-md), + border-color var(--wui-ease-inout-power-1) var(--wui-duration-md), + box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md); + will-change: background-color, border-color, box-shadow; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + input:disabled { + cursor: not-allowed; + border: 1px solid var(--wui-color-gray-glass-010); + background: var(--wui-color-gray-glass-005); + } + + input:focus:enabled { + background-color: var(--wui-color-gray-glass-015); + border: 1px solid var(--wui-color-accent-100); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + @media (hover: hover) and (pointer: fine) { + input:hover:enabled { + background-color: var(--wui-color-gray-glass-015); + } + } +`;var vI=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 vt{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return Pe` `}};mv.styles=[Rt,lr,hue];vI([he({type:Boolean})],mv.prototype,"disabled",void 0);vI([he({type:String})],mv.prototype,"value",void 0);mv=vI([Re("wui-input-numeric")],mv);const due=dt` + button { + padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); + border-radius: var(--wui-border-radius-3xs); + background-color: transparent; + color: var(--wui-color-accent-100); + } + + button:disabled { + background-color: transparent; + color: var(--wui-color-gray-glass-015); + } + + button:hover { + background-color: var(--wui-color-gray-glass-005); + } +`;var yI=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 wv=class extends vt{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return Pe` + + `}};wv.styles=[Rt,lr,due];yI([he({type:Boolean})],wv.prototype,"disabled",void 0);yI([he()],wv.prototype,"color",void 0);wv=yI([Re("wui-link")],wv);const fue=dt` + button { + column-gap: var(--wui-spacing-s); + padding: 11px 18px 11px var(--wui-spacing-s); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + transition: + color var(--wui-ease-out-power-1) var(--wui-duration-md), + background-color var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: color, background-color; + } + + button[data-iconvariant='square'], + button[data-iconvariant='square-blue'] { + padding: 6px 18px 6px 9px; + } + + button > wui-flex { + flex: 1; + } + + button > wui-image { + width: 32px; + height: 32px; + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + border-radius: var(--wui-border-radius-3xl); + } + + button > wui-icon { + width: 36px; + height: 36px; + transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: opacity; + } + + button > wui-icon-box[data-variant='blue'] { + box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005); + } + + button > wui-icon-box[data-variant='overlay'] { + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + } + + button > wui-icon-box[data-variant='square-blue'] { + border-radius: var(--wui-border-radius-3xs); + position: relative; + border: none; + width: 36px; + height: 36px; + } + + button > wui-icon-box[data-variant='square-blue']::after { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: inherit; + border: 1px solid var(--wui-color-accent-glass-010); + pointer-events: none; + } + + button > wui-icon:last-child { + width: 14px; + height: 14px; + } + + button:disabled { + color: var(--wui-color-gray-glass-020); + } + + button[data-loading='true'] > wui-icon { + opacity: 0; + } + + wui-loading-spinner { + position: absolute; + right: 18px; + top: 50%; + transform: translateY(-50%); + } +`;var Vu=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 fc=class extends vt{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return Pe` + + `}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return Pe``;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return Pe``;if(this.variant==="icon"&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",t=this.iconVariant==="square-blue"?"mdl":"md",n=this.iconSize?this.iconSize:t;return Pe` + + `}return null}loadingTemplate(){return this.loading?Pe``:Pe``}chevronTemplate(){return this.chevron?Pe``:null}};fc.styles=[Rt,lr,fue];Vu([he()],fc.prototype,"icon",void 0);Vu([he()],fc.prototype,"iconSize",void 0);Vu([he()],fc.prototype,"variant",void 0);Vu([he()],fc.prototype,"iconVariant",void 0);Vu([he({type:Boolean})],fc.prototype,"disabled",void 0);Vu([he()],fc.prototype,"imageSrc",void 0);Vu([he()],fc.prototype,"alt",void 0);Vu([he({type:Boolean})],fc.prototype,"chevron",void 0);Vu([he({type:Boolean})],fc.prototype,"loading",void 0);fc=Vu([Re("wui-list-item")],fc);var $9;(function(r){r.approve="approved",r.bought="bought",r.borrow="borrowed",r.burn="burnt",r.cancel="canceled",r.claim="claimed",r.deploy="deployed",r.deposit="deposited",r.execute="executed",r.mint="minted",r.receive="received",r.repay="repaid",r.send="sent",r.sell="sold",r.stake="staked",r.trade="swapped",r.unstake="unstaked",r.withdraw="withdrawn"})($9||($9={}));const pue=dt` + :host > wui-flex { + display: flex; + justify-content: center; + align-items: center; + position: relative; + width: 40px; + height: 40px; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + background-color: var(--wui-color-gray-glass-005); + } + + :host > wui-flex wui-image { + display: block; + } + + :host > wui-flex, + :host > wui-flex wui-image, + .swap-images-container, + .swap-images-container.nft, + wui-image.nft { + border-top-left-radius: var(--local-left-border-radius); + border-top-right-radius: var(--local-right-border-radius); + border-bottom-left-radius: var(--local-left-border-radius); + border-bottom-right-radius: var(--local-right-border-radius); + } + + wui-icon { + width: 20px; + height: 20px; + } + + wui-icon-box { + position: absolute; + right: 0; + bottom: 0; + transform: translate(20%, 20%); + } + + .swap-images-container { + position: relative; + width: 40px; + height: 40px; + overflow: hidden; + } + + .swap-images-container wui-image:first-child { + position: absolute; + width: 40px; + height: 40px; + top: 0; + left: 0%; + clip-path: inset(0px calc(50% + 2px) 0px 0%); + } + + .swap-images-container wui-image:last-child { + clip-path: inset(0px 0px 0px calc(50% + 2px)); + } +`;var y1=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 ld=class extends vt{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,t]=this.images,n=(e==null?void 0:e.type)==="NFT",i=t!=null&&t.url?t.type==="NFT":n,s=n?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",o=i?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=` + --local-left-border-radius: ${s}; + --local-right-border-radius: ${o}; + `,Pe` ${this.templateVisual()} ${this.templateIcon()} `}templateVisual(){const[e,t]=this.images,n=e==null?void 0:e.type;return this.images.length===2&&(e!=null&&e.url||t!=null&&t.url)?Pe`
+ ${e!=null&&e.url?Pe``:null} + ${t!=null&&t.url?Pe``:null} +
`:e!=null&&e.url?Pe``:n==="NFT"?Pe``:Pe``}templateIcon(){let e="accent-100",t;return t=this.getIcon(),this.status&&(e=this.getStatusColor()),t?Pe` + + `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontalBold":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};ld.styles=[pue];y1([he()],ld.prototype,"type",void 0);y1([he()],ld.prototype,"status",void 0);y1([he()],ld.prototype,"direction",void 0);y1([he({type:Boolean})],ld.prototype,"onlyDirectionIcon",void 0);y1([he({type:Array})],ld.prototype,"images",void 0);y1([he({type:Object})],ld.prototype,"secondImage",void 0);ld=y1([Re("wui-transaction-visual")],ld);const gue=dt` + :host > wui-flex:first-child { + align-items: center; + column-gap: var(--wui-spacing-s); + padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs); + width: 100%; + } + + :host > wui-flex:first-child wui-text:nth-child(1) { + text-transform: capitalize; + } + + wui-transaction-visual { + width: 40px; + height: 40px; + } + + wui-flex { + flex: 1; + } + + :host wui-flex wui-flex { + overflow: hidden; + } + + :host .description-container wui-text span { + word-break: break-all; + } + + :host .description-container wui-text { + overflow: hidden; + } + + :host .description-separator-icon { + margin: 0px 6px; + } + + :host wui-text > span { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } +`;var yl=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 pa=class extends vt{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return Pe` + + + + + ${$9[this.type]||this.type} + + + ${this.templateDescription()} ${this.templateSecondDescription()} + + + ${this.date} + + `}templateDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[0];return e?Pe` + + ${e} + + `:null}templateSecondDescription(){var t;const e=(t=this.descriptions)==null?void 0:t[1];return e?Pe` + + + ${e} + + `:null}};pa.styles=[Rt,gue];yl([he()],pa.prototype,"type",void 0);yl([he({type:Array})],pa.prototype,"descriptions",void 0);yl([he()],pa.prototype,"date",void 0);yl([he({type:Boolean})],pa.prototype,"onlyDirectionIcon",void 0);yl([he()],pa.prototype,"status",void 0);yl([he()],pa.prototype,"direction",void 0);yl([he({type:Array})],pa.prototype,"images",void 0);yl([he({type:Array})],pa.prototype,"price",void 0);yl([he({type:Array})],pa.prototype,"amount",void 0);yl([he({type:Array})],pa.prototype,"symbol",void 0);pa=yl([Re("wui-transaction-list-item")],pa);const mue=dt` + :host > wui-flex:first-child { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + } + + wui-flex { + display: flex; + flex: 1; + } +`;var wue=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 B9=class extends vt{render(){return Pe` + + + + + + + + + `}};B9.styles=[Rt,mue];B9=wue([Re("wui-transaction-list-item-loader")],B9);const vue=dt` + :host { + display: flex; + justify-content: center; + align-items: center; + height: var(--wui-spacing-m); + padding: 0 var(--wui-spacing-3xs) !important; + border-radius: var(--wui-border-radius-5xs); + } + + :host > wui-text { + transform: translateY(5%); + } + + :host([data-variant='main']) { + background-color: var(--wui-color-accent-glass-015); + color: var(--wui-color-accent-100); + } + + :host([data-variant='shade']) { + background-color: var(--wui-color-gray-glass-010); + color: var(--wui-color-fg-200); + } + + :host([data-variant='success']) { + background-color: var(--wui-icon-box-bg-success-100); + color: var(--wui-color-success-100); + } + + :host([data-variant='error']) { + background-color: var(--wui-icon-box-bg-error-100); + color: var(--wui-color-error-100); + } + + :host([data-size='lg']) { + padding: 11px 5px !important; + } + + :host([data-size='lg']) > wui-text { + transform: translateY(2%); + } +`;var bI=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 vv=class extends vt{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"?"mini-700":"micro-700";return Pe` + + + + `}};vv.styles=[Rt,vue];bI([he()],vv.prototype,"variant",void 0);bI([he()],vv.prototype,"size",void 0);vv=bI([Re("wui-tag")],vv);const yue=dt` + button { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-100); + } + + button > wui-text:nth-child(2) { + display: flex; + flex: 1; + } + + button:disabled { + background-color: var(--wui-color-gray-glass-015); + color: var(--wui-color-gray-glass-015); + } + + button:disabled > wui-tag { + background-color: var(--wui-color-gray-glass-010); + color: var(--wui-color-fg-300); + } + + wui-icon { + color: var(--wui-color-fg-200) !important; + } +`;var bl=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 ga=class extends vt{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return Pe` + + `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?Pe` `:this.showAllWallets&&this.walletIcon?Pe` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?Pe``:!this.showAllWallets&&!this.imageSrc?Pe``:null}templateStatus(){return this.tagLabel&&this.tagVariant?Pe`${this.tagLabel}`:this.icon?Pe``:null}};ga.styles=[Rt,lr,yue];bl([he({type:Array})],ga.prototype,"walletImages",void 0);bl([he()],ga.prototype,"imageSrc",void 0);bl([he()],ga.prototype,"name",void 0);bl([he()],ga.prototype,"tagLabel",void 0);bl([he()],ga.prototype,"tagVariant",void 0);bl([he()],ga.prototype,"icon",void 0);bl([he()],ga.prototype,"walletIcon",void 0);bl([he({type:Boolean})],ga.prototype,"installed",void 0);bl([he({type:Boolean})],ga.prototype,"disabled",void 0);bl([he({type:Boolean})],ga.prototype,"showAllWallets",void 0);ga=bl([Re("wui-list-wallet")],ga);const bue=dt` + :host { + display: flex; + justify-content: center; + align-items: center; + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-005); + overflow: hidden; + } + + wui-icon { + width: 100%; + height: 100%; + } +`;var CF=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 T6=class extends vt{constructor(){super(...arguments),this.logo="google"}render(){return Pe` `}};T6.styles=[Rt,bue];CF([he()],T6.prototype,"logo",void 0);T6=CF([Re("wui-logo")],T6);const _ue=dt` + :host { + display: block; + width: 100%; + } + + button { + width: 100%; + height: 56px; + background: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } +`;var _I=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 yv=class extends vt{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return Pe` + + `}};yv.styles=[Rt,lr,_ue];_I([he()],yv.prototype,"logo",void 0);_I([he({type:Boolean})],yv.prototype,"disabled",void 0);yv=_I([Re("wui-logo-select")],yv);const xue=dt` + :host { + display: block; + } + + button { + border-radius: var(--wui-border-radius-3xl); + display: flex; + gap: var(--wui-spacing-xs); + padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs) + var(--wui-spacing-xs); + border: 1px solid var(--wui-color-gray-glass-010); + background-color: var(--wui-color-gray-glass-005); + color: var(--wui-color-fg-100); + } + + button:disabled { + border: 1px solid var(--wui-color-gray-glass-005); + background-color: var(--wui-color-gray-glass-015); + color: var(--wui-color-gray-glass-015); + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-gray-glass-010); + } + + button:active:enabled { + background-color: var(--wui-color-gray-glass-015); + } + } + + wui-image, + wui-icon-box { + border-radius: var(--wui-border-radius-3xl); + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + } +`;var f_=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 cw=class extends vt{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return Pe` + + `}visualTemplate(){return this.isUnsupportedChain?Pe` + + `:this.imageSrc?Pe``:Pe` + + `}};cw.styles=[Rt,lr,xue];f_([he()],cw.prototype,"imageSrc",void 0);f_([he({type:Boolean})],cw.prototype,"isUnsupportedChain",void 0);f_([he({type:Boolean})],cw.prototype,"disabled",void 0);cw=f_([Re("wui-network-button")],cw);const Aue=dt` + :host { + position: relative; + display: block; + } +`;var p_=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 lw=class extends vt{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(n=>n!==""),this.handleKeyDown=(e,t)=>{const n=e.target,i=this.getInputElement(n),s=["ArrowLeft","ArrowRight","Shift","Delete"];if(!i)return;s.includes(e.key)&&e.preventDefault();const o=i.selectionStart;switch(e.key){case"ArrowLeft":o&&i.setSelectionRange(o+1,o+1),this.focusInputField("prev",t);break;case"ArrowRight":this.focusInputField("next",t);break;case"Shift":this.focusInputField("next",t);break;case"Delete":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break;case"Backspace":i.value===""?this.focusInputField("prev",t):this.updateInput(i,t,"");break}},this.focusInputField=(e,t)=>{if(e==="next"){const n=t+1;if(!this.shouldInputBeEnabled(n))return;const i=this.numerics[n-1?n:t],s=i?this.getInputElement(i):void 0;s&&s.focus()}}}firstUpdated(){var t,n;this.otp&&(this.values=this.otp.split(""));const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),(n=this.numerics[0])==null||n.focus()}render(){return Pe` + + ${Array.from({length:this.length}).map((e,t)=>Pe` + this.handleInput(n,t)} + @click=${n=>this.selectInput(n)} + @keydown=${n=>this.handleKeyDown(n,t)} + .disabled=${!this.shouldInputBeEnabled(t)} + .value=${this.values[t]||""} + > + + `)} + + `}updateInput(e,t,n){const i=this.numerics[t],s=e||(i?this.getInputElement(i):void 0);s&&(s.value=n,this.values=this.values.map((o,a)=>a===t?n:o))}selectInput(e){const t=e.target;if(t){const n=this.getInputElement(t);n==null||n.select()}}handleInput(e,t){const n=e.target,i=this.getInputElement(n);if(i){const s=i.value;e.inputType==="insertFromPaste"?this.handlePaste(i,s,t):Qt.isNumber(s)&&e.data?(this.updateInput(i,t,e.data),this.focusInputField("next",t)):this.updateInput(i,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,n){const i=t[0];if(i&&Qt.isNumber(i)){this.updateInput(e,n,i);const o=t.substring(1);if(n+140)throw new Error('"version" should be in range from 1 to 40');return e*4+17};_a.getSymbolTotalCodewords=function(e){return Cue[e]};_a.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e};_a.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');xI=e};_a.isKanjiModeEnabled=function(){return typeof xI<"u"};_a.toSJIS=function(e){return xI(e)};var g_={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,i){if(r.isValid(n))return n;try{return e(n)}catch{return i}}})(g_);function IF(){this.buffer=[],this.length=0}IF.prototype={get:function(r){const e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(let t=0;t>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Sue=IF;function $y(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}$y.prototype.set=function(r,e,t,n){const i=r*this.size+e;this.data[i]=t,n&&(this.reservedBit[i]=!0)};$y.prototype.get=function(r,e){return this.data[r*this.size+e]};$y.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};$y.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var Iue=$y,TF={};(function(r){const e=_a.getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const i=Math.floor(n/7)+2,s=e(n),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c=0&&i<=7},r.from=function(i){return r.isValid(i)?parseInt(i,10):void 0},r.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,c=0,l=null,h=null;for(let f=0;f=5&&(o+=e.N1+(a-5)),l=y,a=1),y=i.get(v,f),y===h?c++:(c>=5&&(o+=e.N1+(c-5)),h=y,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},r.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,c=c<<1&2047|i.get(h,l),h>=10&&(c===1488||c===93)&&o++}return o*e.N3},r.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let c=0;c=0;){const o=s[0];for(let c=0;c0){const s=new Uint8Array(this.degree);return s.set(n,i),s}return n};var Rue=AI,OF={},e0={},EI={};EI.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var qu={};const MF="[0-9]+",kue="[A-Z $%*+\\-./:]+";let bv="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";bv=bv.replace(/u/g,"\\u");const Nue="(?:(?![A-Z0-9 $%*+\\-./:]|"+bv+`)(?:.|[\r +]))+`;qu.KANJI=new RegExp(bv,"g");qu.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");qu.BYTE=new RegExp(Nue,"g");qu.NUMERIC=new RegExp(MF,"g");qu.ALPHANUMERIC=new RegExp(kue,"g");const Pue=new RegExp("^"+bv+"$"),Oue=new RegExp("^"+MF+"$"),Mue=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");qu.testKanji=function(e){return Pue.test(e)};qu.testNumeric=function(e){return Oue.test(e)};qu.testAlphanumeric=function(e){return Mue.test(e)};(function(r){const e=EI,t=qu;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+i)}}r.from=function(s,o){if(r.isValid(s))return s;try{return n(s)}catch{return o}}})(e0);(function(r){const e=_a,t=m_,n=g_,i=e0,s=EI,o=7973,a=e.getBCHDigit(o);function c(v,y,A){for(let M=1;M<=40;M++)if(y<=r.getCapacity(M,A,v))return M}function l(v,y){return i.getCharCountIndicator(v,y)+4}function h(v,y){let A=0;return v.forEach(function(M){const $=l(M.mode,y);A+=$+M.getBitsLength()}),A}function f(v,y){for(let A=1;A<=40;A++)if(h(v,A)<=r.getCapacity(A,y,i.MIXED))return A}r.from=function(y,A){return s.isValid(y)?parseInt(y,10):A},r.getCapacity=function(y,A,M){if(!s.isValid(y))throw new Error("Invalid QR Code version");typeof M>"u"&&(M=i.BYTE);const $=e.getSymbolTotalCodewords(y),L=t.getTotalCodewordsCount(y,A),P=($-L)*8;if(M===i.MIXED)return P;const H=P-l(M,y);switch(M){case i.NUMERIC:return Math.floor(H/10*3);case i.ALPHANUMERIC:return Math.floor(H/11*2);case i.KANJI:return Math.floor(H/13);case i.BYTE:default:return Math.floor(H/8)}},r.getBestVersionForData=function(y,A){let M;const $=n.from(A,n.M);if(Array.isArray(y)){if(y.length>1)return f(y,$);if(y.length===0)return 1;M=y[0]}else M=y;return c(M.mode,M.getLength(),$)},r.getEncodedBits=function(y){if(!s.isValid(y)||y<7)throw new Error("Invalid QR Code version");let A=y<<12;for(;e.getBCHDigit(A)-a>=0;)A^=o<=0;)i^=$F<0&&(n=this.data.substr(t),i=parseInt(n,10),e.put(i,s*3+1))};var Bue=uw;const Lue=e0,bE=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function hw(r){this.mode=Lue.ALPHANUMERIC,this.data=r}hw.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};hw.prototype.getLength=function(){return this.data.length};hw.prototype.getBitsLength=function(){return hw.getBitsLength(this.data.length)};hw.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=bE.indexOf(this.data[t])*45;n+=bE.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(bE.indexOf(this.data[t]),6)};var Uue=hw,Fue=function(e){for(var t=[],n=e.length,i=0;i=55296&&s<=56319&&n>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){t.push(s);continue}if(s<2048){t.push(s>>6|192),t.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128);continue}if(s>=65536&&s<=1114111){t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const jue=Fue,Hue=e0;function dw(r){this.mode=Hue.BYTE,typeof r=="string"&&(r=jue(r)),this.data=new Uint8Array(r)}dw.getBitsLength=function(e){return e*8};dw.prototype.getLength=function(){return this.data.length};dw.prototype.getBitsLength=function(){return dw.getBitsLength(this.data.length)};dw.prototype.write=function(r){for(let e=0,t=this.data.length;e=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var que=fw,LF={exports:{}};(function(r){var e={single_source_shortest_paths:function(t,n,i){var s={},o={};o[n]=0;var a=e.PriorityQueue.make();a.push(n,0);for(var c,l,h,f,v,y,A,M,$;!a.empty();){c=a.pop(),l=c.value,f=c.cost,v=t[l]||{};for(h in v)v.hasOwnProperty(h)&&(y=v[h],A=f+y,M=o[h],$=typeof o[h]>"u",($||M>A)&&(o[h]=A,a.push(h,A),s[h]=l))}if(typeof i<"u"&&typeof o[i]>"u"){var L=["Could not find a path from ",n," to ",i,"."].join("");throw new Error(L)}return s},extract_shortest_path_from_predecessor_list:function(t,n){for(var i=[],s=n;s;)i.push(s),t[s],s=t[s];return i.reverse(),i},find_path:function(t,n,i){var s=e.single_source_shortest_paths(t,n,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(t){var n=e.PriorityQueue,i={},s;t=t||{};for(s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);return i.queue=[],i.sorter=t.sorter||n.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var i={value:t,cost:n};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e})(LF);var Kue=LF.exports;(function(r){const e=e0,t=Bue,n=Uue,i=Wue,s=que,o=qu,a=_a,c=Kue;function l(L){return unescape(encodeURIComponent(L)).length}function h(L,P,H){const F=[];let q;for(;(q=L.exec(H))!==null;)F.push({data:q[0],index:q.index,mode:P,length:q[0].length});return F}function f(L){const P=h(o.NUMERIC,e.NUMERIC,L),H=h(o.ALPHANUMERIC,e.ALPHANUMERIC,L);let F,q;return a.isKanjiModeEnabled()?(F=h(o.BYTE,e.BYTE,L),q=h(o.KANJI,e.KANJI,L)):(F=h(o.BYTE_KANJI,e.BYTE,L),q=[]),P.concat(H,F,q).sort(function(I,T){return I.index-T.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function v(L,P){switch(P){case e.NUMERIC:return t.getBitsLength(L);case e.ALPHANUMERIC:return n.getBitsLength(L);case e.KANJI:return s.getBitsLength(L);case e.BYTE:return i.getBitsLength(L)}}function y(L){return L.reduce(function(P,H){const F=P.length-1>=0?P[P.length-1]:null;return F&&F.mode===H.mode?(P[P.length-1].data+=H.data,P):(P.push(H),P)},[])}function A(L){const P=[];for(let H=0;H=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?r.set(s+a,o+c,!0,!0):r.set(s+a,o+c,!1,!0))}}function rhe(r){const e=r.size;for(let t=8;t>a&1)===1,r.set(i,s,o,!0),r.set(s,i,o,!0)}function AE(r,e,t){const n=r.size,i=Xue.getEncodedBits(e,t);let s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?r.set(s,8,o,!0):s<8?r.set(s+1,8,o,!0):r.set(n-15+s,8,o,!0),s<8?r.set(8,n-s-1,o,!0):s<9?r.set(8,15-s-1+1,o,!0):r.set(8,15-s-1,o,!0);r.set(n-8,8,1,!0)}function she(r,e){const t=r.size;let n=-1,i=t-1,s=7,o=0;for(let a=t-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!r.isReserved(i,a-c)){let l=!1;o>>s&1)===1),r.set(i,a-c,l),s--,s===-1&&(o++,s=7)}if(i+=n,i<0||t<=i){i-=n,n=-n;break}}}function ohe(r,e,t){const n=new Gue;t.forEach(function(c){n.put(c.mode.bit,4),n.put(c.getLength(),ehe.getCharCountIndicator(c.mode,r)),c.write(n)});const i=v_.getSymbolTotalCodewords(r),s=F9.getTotalCodewordsCount(r,e),o=(i-s)*8;for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const a=(o-n.getLengthInBits())/8;for(let c=0;c=7&&ihe(c,e),she(c,o),isNaN(n)&&(n=U9.getBestMask(c,AE.bind(null,c,t))),U9.applyMask(n,c),AE(c,t,n),{modules:c,version:e,errorCorrectionLevel:t,maskPattern:n,segments:i}}SF.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let n=_E.M,i,s;return typeof t<"u"&&(n=_E.from(t.errorCorrectionLevel,_E.M),i=k6.from(t.version),s=U9.from(t.maskPattern),t.toSJISFunc&&v_.setToSJISFunction(t.toSJISFunc)),che(e,i,n,s)};var UF={},CI={};(function(r){function e(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const i=parseInt(n.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+n.slice(0,6).join("")}}r.getOptions=function(n){n||(n={}),n.color||(n.color={});const i=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,o=n.scale||4;return{width:s,scale:s?4:o,margin:i,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},r.getScale=function(n,i){return i.width&&i.width>=n+i.margin*2?i.width/(n+i.margin*2):i.scale},r.getImageWidth=function(n,i){const s=r.getScale(n,i);return Math.floor((n+i.margin*2)*s)},r.qrToImageData=function(n,i,s){const o=i.modules.size,a=i.modules.data,c=r.getScale(o,s),l=Math.floor((o+s.margin*2)*c),h=s.margin*c,f=[s.color.light,s.color.dark];for(let v=0;v=h&&y>=h&&v"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=n()),c=e.getOptions(c);const h=e.getImageWidth(s.modules.size,c),f=l.getContext("2d"),v=f.createImageData(h,h);return e.qrToImageData(v.data,s,c),t(f,l,h),f.putImageData(v,0,0),l},r.renderToDataURL=function(s,o,a){let c=a;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=r.render(s,o,c),h=c.type||"image/png",f=c.rendererOpts||{};return l.toDataURL(h,f.quality)}})(UF);var FF={};const lhe=CI;function UP(r,e){const t=r.a/255,n=e+'="'+r.hex+'"';return t<1?n+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function EE(r,e,t){let n=r+e;return typeof t<"u"&&(n+=" "+t),n}function uhe(r,e,t){let n="",i=0,s=!1,o=0;for(let a=0;a0&&c>0&&r[a-1]||(n+=s?EE("M",c+t,.5+l+t):EE("m",i,0),i=0,s=!1),c+1':"",l="',h='viewBox="0 0 '+a+" "+a+'"',v=''+c+l+` +`;return typeof n=="function"&&n(null,v),v};const hhe=Eue,j9=SF,jF=UF,dhe=FF;function SI(r,e,t,n,i){const s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!hhe())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(i=t,t=e,e=n=void 0):o===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=t,t=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(t=e,e=n=void 0):o===2&&!e.getContext&&(n=t,t=e,e=void 0),new Promise(function(c,l){try{const h=j9.create(t,n);c(r(h,e,n))}catch(h){l(h)}})}try{const c=j9.create(t,n);i(null,r(c,e,n))}catch(c){i(c)}}Dy.create=j9.create;Dy.toCanvas=SI.bind(null,jF.render);Dy.toDataURL=SI.bind(null,jF.renderToDataURL);Dy.toString=SI.bind(null,function(r,e,t){return dhe.render(r,t)});const fhe=.1,FP=2.5,mh=7;function CE(r,e,t){return r===e?!1:(r-e<0?e-r:r-e)<=t+fhe}function phe(r,e){const t=Array.prototype.slice.call(Dy.create(r,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const ghe={generate(r,e,t){const n="#141414",i="transparent",o=[],a=phe(r,"Q"),c=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:M,y:$})=>{const L=(a.length-mh)*c*M,P=(a.length-mh)*c*$,H=.45;for(let F=0;F + `)}});const h=Math.floor((t+25)/c),f=a.length/2-h/2,v=a.length/2+h/2-1,y=[];a.forEach((M,$)=>{M.forEach((L,P)=>{if(a[$][P]&&!($a.length-(mh+1)&&Pa.length-(mh+1))&&!($>f&&$f&&P{var L;A[M]?(L=A[M])==null||L.push($):A[M]=[$]}),Object.entries(A).map(([M,$])=>{const L=$.filter(P=>$.every(H=>!CE(P,H,c)));return[Number(M),L]}).forEach(([M,$])=>{$.forEach(L=>{o.push(tt``)})}),Object.entries(A).filter(([M,$])=>$.length>1).map(([M,$])=>{const L=$.filter(P=>$.some(H=>CE(P,H,c)));return[Number(M),L]}).map(([M,$])=>{$.sort((P,H)=>PF.some(q=>CE(P,q,c)));H?H.push(P):L.push([P])}return[M,L.map(P=>[P[0],P[P.length-1]])]}).forEach(([M,$])=>{$.forEach(([L,P])=>{o.push(tt` + + `)})}),o}},mhe=dt` + :host { + position: relative; + user-select: none; + display: block; + overflow: hidden; + aspect-ratio: 1 / 1; + width: var(--local-size); + } + + :host([data-theme='dark']) { + border-radius: clamp(0px, var(--wui-border-radius-l), 40px); + background-color: var(--wui-color-inverse-100); + padding: var(--wui-spacing-l); + } + + :host([data-theme='light']) { + box-shadow: 0 0 0 1px var(--wui-color-bg-125); + background-color: var(--wui-color-bg-125); + } + + :host([data-clear='true']) > wui-icon { + display: none; + } + + svg:first-child, + wui-image, + wui-icon { + position: absolute; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); + } + + wui-image { + width: 25%; + height: 25%; + border-radius: var(--wui-border-radius-xs); + } + + wui-icon { + width: 100%; + height: 100%; + color: #3396ff !important; + transform: translateY(-50%) translateX(-50%) scale(0.25); + } +`;var t0=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 Nu=class extends vt{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,Pe`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return tt` + + ${ghe.generate(this.uri,e,this.arenaClear?0:e/4)} + + `}templateVisual(){return this.imageSrc?Pe``:this.farcaster?Pe``:Pe``}};Nu.styles=[Rt,mhe];t0([he()],Nu.prototype,"uri",void 0);t0([he({type:Number})],Nu.prototype,"size",void 0);t0([he()],Nu.prototype,"theme",void 0);t0([he()],Nu.prototype,"imageSrc",void 0);t0([he()],Nu.prototype,"alt",void 0);t0([he({type:Boolean})],Nu.prototype,"arenaClear",void 0);t0([he({type:Boolean})],Nu.prototype,"farcaster",void 0);Nu=t0([Re("wui-qr-code")],Nu);const whe=dt` + :host { + position: relative; + display: inline-block; + width: 100%; + } +`;var vhe=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 H9=class extends vt{constructor(){super(...arguments),this.inputComponentRef=mI()}render(){return Pe` + + + + `}clearValue(){const e=this.inputComponentRef.value,t=e==null?void 0:e.inputElementRef.value;t&&(t.value="",t.focus(),t.dispatchEvent(new Event("input")))}};H9.styles=[Rt,whe];H9=vhe([Re("wui-search-bar")],H9);const yhe=dt` + :host { + display: flex; + column-gap: var(--wui-spacing-xs); + align-items: center; + padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-005); + box-sizing: border-box; + max-height: 40px; + background-color: var(--wui-color-bg-175); + box-shadow: + 0px 14px 64px -4px rgba(0, 0, 0, 0.15), + 0px 8px 22px -6px rgba(0, 0, 0, 0.15); + } + + :host wui-loading-spinner { + margin-left: var(--wui-spacing-3xs); + } +`;var Vw=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 jf=class extends vt{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1}render(){return Pe` + ${this.loading?Pe``:Pe``} + ${this.message} + `}};jf.styles=[Rt,yhe];Vw([he()],jf.prototype,"backgroundColor",void 0);Vw([he()],jf.prototype,"iconColor",void 0);Vw([he()],jf.prototype,"icon",void 0);Vw([he()],jf.prototype,"message",void 0);Vw([he()],jf.prototype,"loading",void 0);jf=Vw([Re("wui-snackbar")],jf);const bhe=dt` + :host { + display: inline-flex; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-3xl); + padding: var(--wui-spacing-3xs); + position: relative; + height: 36px; + min-height: 36px; + overflow: hidden; + } + + :host::before { + content: ''; + position: absolute; + pointer-events: none; + top: 4px; + left: 4px; + display: block; + width: var(--local-tab-width); + height: 28px; + border-radius: var(--wui-border-radius-3xl); + background-color: var(--wui-color-gray-glass-002); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + transform: translateX(calc(var(--local-tab) * var(--local-tab-width))); + transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color, opacity; + } + + :host([data-type='flex'])::before { + left: 3px; + transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px))); + } + + :host([data-type='flex']) { + display: flex; + padding: 0px 0px 0px 12px; + gap: 4px; + } + + :host([data-type='flex']) > button > wui-text { + position: absolute; + left: 18px; + opacity: 0; + } + + button[data-active='true'] > wui-icon, + button[data-active='true'] > wui-text { + color: var(--wui-color-fg-100); + } + + button[data-active='false'] > wui-icon, + button[data-active='false'] > wui-text { + color: var(--wui-color-fg-200); + } + + button[data-active='true']:disabled, + button[data-active='false']:disabled { + background-color: transparent; + opacity: 0.5; + cursor: not-allowed; + } + + button[data-active='true']:disabled > wui-text { + color: var(--wui-color-fg-200); + } + + button[data-active='false']:disabled > wui-text { + color: var(--wui-color-fg-300); + } + + button > wui-icon, + button > wui-text { + pointer-events: none; + transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md); + will-change: color; + } + + button { + width: var(--local-tab-width); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color; + } + + :host([data-type='flex']) > button { + width: 34px; + position: relative; + display: flex; + justify-content: flex-start; + } + + button:hover:enabled, + button:active:enabled { + background-color: transparent !important; + } + + button:hover:enabled > wui-icon, + button:active:enabled > wui-icon { + transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); + color: var(--wui-color-fg-125); + } + + button:hover:enabled > wui-text, + button:active:enabled > wui-text { + transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg); + color: var(--wui-color-fg-125); + } + + button { + border-radius: var(--wui-border-radius-3xl); + } +`;var r0=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 Pu=class extends vt{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=` + --local-tab: ${this.activeTab}; + --local-tab-width: ${this.localTabWidth}; + `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,t)=>{var i;const n=t===this.activeTab;return Pe` + + `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?Pe``:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,t){const n=this.buttons[this.activeTab],i=this.buttons[e],s=n==null?void 0:n.querySelector("wui-text"),o=i==null?void 0:i.querySelector("wui-text"),a=i==null?void 0:i.getBoundingClientRect(),c=o==null?void 0:o.getBoundingClientRect();n&&s&&!t&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),n.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&c&&o&&(e!==this.activeTab||t)&&(this.localTabWidth=`${Math.round(a.width+c.width)+6}px`,i.animate([{width:`${a.width+c.width}px`}],{duration:t?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:t?0:125,delay:t?0:200,fill:"forwards",easing:"ease"}))}};Pu.styles=[Rt,lr,bhe];r0([he({type:Array})],Pu.prototype,"tabs",void 0);r0([he()],Pu.prototype,"onTabChange",void 0);r0([he({type:Array})],Pu.prototype,"buttons",void 0);r0([he({type:Boolean})],Pu.prototype,"disabled",void 0);r0([he()],Pu.prototype,"localTabWidth",void 0);r0([Ry()],Pu.prototype,"activeTab",void 0);r0([Ry()],Pu.prototype,"isDense",void 0);Pu=r0([Re("wui-tabs")],Pu);const _he=dt` + :host { + display: block; + } + + :host > button { + gap: var(--wui-spacing-xxs); + padding: var(--wui-spacing-xs); + padding-right: var(--wui-spacing-1xs); + height: 40px; + border-radius: var(--wui-border-radius-l); + background: var(--wui-color-gray-glass-002); + border-width: 0px; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + } + + :host > button wui-image { + width: 24px; + height: 24px; + border-radius: var(--wui-border-radius-s); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } +`;var II=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 _v=class extends vt{constructor(){super(...arguments),this.text=""}render(){return Pe` + + `}tokenTemplate(){return this.imageSrc?Pe``:Pe` + + `}};_v.styles=[Rt,lr,_he];II([he()],_v.prototype,"imageSrc",void 0);II([he()],_v.prototype,"text",void 0);_v=II([Re("wui-token-button")],_v);const xhe=dt` + :host { + display: block; + padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + + color: var(--wui-color-bg-100); + position: relative; + } + + :host([data-variant='shade']) { + background-color: var(--wui-color-bg-150); + border: 1px solid var(--wui-color-gray-glass-005); + } + + :host([data-variant='shade']) > wui-text { + color: var(--wui-color-fg-150); + } + + :host([data-variant='fill']) { + background-color: var(--wui-color-fg-100); + border: none; + } + + wui-icon { + position: absolute; + width: 12px !important; + height: 4px !important; + } + + wui-icon[data-placement='top'] { + bottom: 0px; + left: 50%; + transform: translate(-50%, 95%); + } + + wui-icon[data-placement='bottom'] { + top: 0; + left: 50%; + transform: translate(-50%, -95%) rotate(180deg); + } + + wui-icon[data-placement='right'] { + top: 50%; + left: 0; + transform: translate(-65%, -50%) rotate(90deg); + } + + wui-icon[data-placement='left'] { + top: 50%; + right: 0%; + transform: translate(65%, -50%) rotate(270deg); + } +`;var y_=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 pw=class extends vt{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,Pe` + ${this.message}`}};pw.styles=[Rt,lr,xhe];y_([he()],pw.prototype,"placement",void 0);y_([he()],pw.prototype,"variant",void 0);y_([he()],pw.prototype,"message",void 0);pw=y_([Re("wui-tooltip")],pw);const Ahe=dt` + :host { + height: 60px; + min-height: 60px; + } + + :host > wui-flex { + cursor: pointer; + height: 100%; + display: flex; + column-gap: var(--wui-spacing-s); + padding: var(--wui-spacing-xs); + padding-right: var(--wui-spacing-l); + width: 100%; + background-color: transparent; + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + transition: + background-color var(--wui-ease-out-power-1) var(--wui-duration-lg), + opacity var(--wui-ease-out-power-1) var(--wui-duration-lg); + will-change: background-color, opacity; + } + + @media (hover: hover) and (pointer: fine) { + :host > wui-flex:hover { + background-color: var(--wui-color-gray-glass-002); + } + + :host > wui-flex:active { + background-color: var(--wui-color-gray-glass-005); + } + } + + :host([disabled]) > wui-flex { + opacity: 0.6; + } + + :host([disabled]) > wui-flex:hover { + background-color: transparent; + } + + :host > wui-flex > wui-flex { + flex: 1; + } + + :host > wui-flex > wui-image, + :host > wui-flex > .token-item-image-placeholder { + width: 40px; + max-width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-3xl); + position: relative; + } + + :host > wui-flex > .token-item-image-placeholder { + display: flex; + align-items: center; + justify-content: center; + } + + :host > wui-flex > wui-image::after, + :host > wui-flex > .token-item-image-placeholder::after { + position: absolute; + content: ''; + inset: 0; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + border-radius: var(--wui-border-radius-l); + } + + button > wui-icon-box[data-variant='square-blue'] { + border-radius: var(--wui-border-radius-3xs); + position: relative; + border: none; + width: 36px; + height: 36px; + } +`;var n0=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 Ou=class extends vt{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0,this.visible=!1,this.imageError=!1,this.observer=new IntersectionObserver(e=>{e.forEach(t=>{t.isIntersecting?this.visible=!0:this.visible=!1})},{threshold:.1})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var t;if(!this.visible)return null;const e=this.amount&&this.price?(t=qr.multiply(this.price,this.amount))==null?void 0:t.toFixed(3):null;return Pe` + + ${this.visualTemplate()} + + + ${this.name} + ${e?Pe` + + $${Qt.formatNumberToLocalString(e,3)} + + `:null} + + + ${this.symbol} + ${this.amount?Pe` + ${Qt.formatNumberToLocalString(this.amount,4)} + `:null} + + + + `}visualTemplate(){return this.imageError?Pe` + + `:this.imageSrc?Pe``:null}imageLoadError(){this.imageError=!0}};Ou.styles=[Rt,lr,Ahe];n0([he()],Ou.prototype,"imageSrc",void 0);n0([he()],Ou.prototype,"name",void 0);n0([he()],Ou.prototype,"symbol",void 0);n0([he()],Ou.prototype,"price",void 0);n0([he()],Ou.prototype,"amount",void 0);n0([Ry()],Ou.prototype,"visible",void 0);n0([Ry()],Ou.prototype,"imageError",void 0);Ou=n0([Re("wui-token-list-item")],Ou);const Ehe=dt` + :host { + display: flex; + justify-content: center; + align-items: center; + width: var(--wui-icon-box-size-xl); + height: var(--wui-icon-box-size-xl); + box-shadow: 0 0 0 8px var(--wui-thumbnail-border); + border-radius: var(--local-border-radius); + overflow: hidden; + } + + wui-icon { + width: 32px; + height: 32px; + } +`;var b_=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 gw=class extends vt{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"}; background-color: var(--wui-color-modal-bg);`,Pe`${this.templateVisual()}`}templateVisual(){return this.imageSrc?Pe``:Pe``}};gw.styles=[Rt,Ehe];b_([he()],gw.prototype,"imageSrc",void 0);b_([he()],gw.prototype,"alt",void 0);b_([he({type:Boolean})],gw.prototype,"borderRadiusFull",void 0);gw=b_([Re("wui-visual-thumbnail")],gw);const Che=dt` + :host { + display: block; + } + + button { + width: 100%; + display: block; + padding-top: var(--wui-spacing-l); + padding-bottom: var(--wui-spacing-l); + padding-left: var(--wui-spacing-s); + padding-right: var(--wui-spacing-2l); + border-radius: var(--wui-border-radius-s); + background-color: var(--wui-color-accent-glass-010); + } + + button:hover { + background-color: var(--wui-color-accent-glass-015) !important; + } + + button:active { + background-color: var(--wui-color-accent-glass-020) !important; + } +`;var __=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 mw=class extends vt{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return Pe` + + `}};mw.styles=[Rt,lr,Che];__([he()],mw.prototype,"label",void 0);__([he()],mw.prototype,"description",void 0);__([he()],mw.prototype,"icon",void 0);mw=__([Re("wui-notice-card")],mw);const She=dt` + button { + height: auto; + position: relative; + flex-direction: column; + gap: var(--wui-spacing-s); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + .overflowedContent { + width: 100%; + overflow: hidden; + } + + .overflowedContent[data-active='false']:after { + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(to top, var(--wui-color-bg-150), transparent); + border-bottom-left-radius: var(--wui-border-radius-xs); + border-bottom-right-radius: var(--wui-border-radius-xs); + } + + .heightContent { + max-height: 100px; + } + + pre { + text-align: left; + white-space: pre-wrap; + height: auto; + overflow-x: auto; + overflow-wrap: anywhere; + } +`;var TI=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};const SE=100;let xv=class extends vt{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout(()=>{this.checkHeight()},1)}checkHeight(){this.updateComplete.then(()=>{var n,i;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(".heightContent"),t=(i=this.shadowRoot)==null?void 0:i.querySelector(".textContent");if(e&&t){this.scrollElement=e;const s=t==null?void 0:t.scrollHeight;s&&s>SE&&(this.enableAccordion=!0,this.scrollHeightElement=s,this.requestUpdate())}})}render(){return Pe` + + `}onClick(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?`${SE}px`:`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:`${SE}px`}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?Pe` `:null}};xv.styles=[Rt,lr,She];TI([he()],xv.prototype,"textTitle",void 0);TI([he()],xv.prototype,"overflowedContent",void 0);xv=TI([Re("wui-list-accordion")],xv);const Ihe=dt` + :host { + display: flex; + column-gap: var(--wui-spacing-s); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + wui-image { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + border-radius: var(--wui-border-radius-3xl); + } + + wui-icon { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + } +`;var x_=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 ww=class extends vt{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return Pe` + + + ${this.textTitle} + + ${this.templateContent()} + + `}templateContent(){return this.imageSrc?Pe``:this.textValue?Pe` ${this.textValue} `:Pe``}};ww.styles=[Rt,lr,Ihe];x_([he()],ww.prototype,"imageSrc",void 0);x_([he()],ww.prototype,"textTitle",void 0);x_([he()],ww.prototype,"textValue",void 0);ww=x_([Re("wui-list-content")],ww);const The=dt` + button { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-100); + } + + button > wui-text:nth-child(2) { + display: flex; + flex: 1; + } + + button[data-transparent='true'] { + pointer-events: none; + background-color: transparent; + } + + button:hover { + background-color: var(--wui-color-gray-glass-002); + } + + button:active { + background-color: var(--wui-color-gray-glass-005); + } + + wui-image { + width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + border-radius: 100%; + } + + button:disabled { + background-color: var(--wui-color-gray-glass-002); + opacity: 0.5; + cursor: not-allowed; + } + + button:disabled > wui-tag { + background-color: var(--wui-color-gray-glass-010); + color: var(--wui-color-fg-300); + } +`;var qw=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 Hf=class extends vt{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.selected=!1,this.transparent=!1}render(){return Pe` + + `}checkmarkTemplate(){return this.selected?Pe``:null}templateNetworkImage(){return this.imageSrc?Pe``:this.imageSrc?null:Pe``}};Hf.styles=[Rt,lr,The];qw([he()],Hf.prototype,"imageSrc",void 0);qw([he()],Hf.prototype,"name",void 0);qw([he({type:Boolean})],Hf.prototype,"disabled",void 0);qw([he({type:Boolean})],Hf.prototype,"selected",void 0);qw([he({type:Boolean})],Hf.prototype,"transparent",void 0);Hf=qw([Re("wui-list-network")],Hf);const Rhe=dt` + :host { + display: flex; + flex-direction: column; + gap: var(--wui-spacing-l); + padding: 17px 18px 17px var(--wui-spacing-m); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-250); + } + + wui-image { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + border-radius: var(--wui-border-radius-3xl); + } + + wui-icon { + width: var(--wui-icon-size-lg); + height: var(--wui-icon-size-lg); + } +`;var Kw=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 Wf=class extends vt{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return Pe` + + Sending + + + ${this.amount} ${this.networkCurreny} + + ${this.templateNetworkVisual()} + + + + To + + + `}templateNetworkVisual(){return this.networkImageUrl?Pe``:Pe``}};Wf.styles=[Rt,lr,Rhe];Kw([he()],Wf.prototype,"amount",void 0);Kw([he()],Wf.prototype,"networkCurreny",void 0);Kw([he()],Wf.prototype,"networkImageUrl",void 0);Kw([he()],Wf.prototype,"receiverAddress",void 0);Kw([he()],Wf.prototype,"addressExplorerUrl",void 0);Wf=Kw([Re("wui-list-wallet-transaction")],Wf);const khe=dt` + button { + display: flex; + gap: var(--wui-spacing-3xs); + align-items: center; + padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s); + background-color: var(--wui-color-gray-glass-090); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-060); + transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1); + will-change: background-color; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-gray-glass-080); + } + + button:active:enabled { + background-color: var(--wui-color-gray-glass-060); + } + } +`;var HF=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 N6=class extends vt{constructor(){super(...arguments),this.text=""}render(){return Pe``}};N6.styles=[Rt,lr,khe];HF([he()],N6.prototype,"text",void 0);N6=HF([Re("wui-promo")],N6);const Nhe=dt` + span { + font-weight: 500; + font-size: 40px; + color: var(--wui-color-fg-100); + line-height: 130%; /* 52px */ + letter-spacing: -1.6px; + text-align: center; + } + + .pennies { + color: var(--wui-color-fg-200); + } +`;var RI=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 Av=class extends vt{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return Pe`$${this.dollars}.${this.pennies}`}};Av.styles=[Rt,Nhe];RI([he()],Av.prototype,"dollars",void 0);RI([he()],Av.prototype,"pennies",void 0);Av=RI([Re("wui-balance")],Av);const Phe=dt` + button { + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-002); + padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs); + position: relative; + } + + wui-avatar { + width: 32px; + height: 32px; + box-shadow: 0 0 0 0; + outline: 3px solid var(--wui-color-gray-glass-005); + } + + wui-icon-box, + wui-image { + width: 16px; + height: 16px; + border-radius: var(--wui-border-radius-3xl); + position: absolute; + left: 26px; + top: 24px; + } + + wui-image { + outline: 2px solid var(--wui-color-bg-125); + } + + wui-icon-box { + outline: 2px solid var(--wui-color-bg-200); + background-color: var(--wui-color-bg-250); + } +`;var Gw=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 zf=class extends vt{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="chevronBottom"}render(){return Pe``}networkImageTemplate(){return this.networkSrc?Pe``:Pe` + + `}};zf.styles=[Rt,lr,Phe];Gw([he()],zf.prototype,"networkSrc",void 0);Gw([he()],zf.prototype,"avatarSrc",void 0);Gw([he()],zf.prototype,"profileName",void 0);Gw([he()],zf.prototype,"address",void 0);Gw([he()],zf.prototype,"icon",void 0);zf=Gw([Re("wui-profile-button")],zf);const Ohe=dt` + button { + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-002); + padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs); + position: relative; + } + + wui-avatar { + width: 32px; + height: 32px; + box-shadow: 0 0 0 0; + outline: 3px solid var(--wui-color-gray-glass-005); + } + + wui-icon-box, + wui-image { + width: 16px; + height: 16px; + border-radius: var(--wui-border-radius-3xl); + position: absolute; + left: 26px; + top: 24px; + } + + wui-image { + outline: 2px solid var(--wui-color-bg-125); + } + + wui-icon-box { + outline: 2px solid var(--wui-color-bg-200); + background-color: var(--wui-color-bg-250); + } +`;var b1=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 ud=class extends vt{constructor(){super(...arguments),this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="mail",this.connectedConnector=en.getConnectedConnector(),this.shouldShowIcon=this.connectedConnector==="AUTH"}render(){return Pe``}handleClick(e){var t,n;if(e.target instanceof HTMLElement&&e.target.id==="copy-address"){(t=this.onCopyClick)==null||t.call(this,e);return}(n=this.onProfileClick)==null||n.call(this,e)}getIconTemplate(e){return Pe` + + `}};ud.styles=[Rt,lr,Ohe];b1([he()],ud.prototype,"avatarSrc",void 0);b1([he()],ud.prototype,"profileName",void 0);b1([he()],ud.prototype,"address",void 0);b1([he()],ud.prototype,"icon",void 0);b1([he()],ud.prototype,"onProfileClick",void 0);b1([he()],ud.prototype,"onCopyClick",void 0);ud=b1([Re("wui-profile-button-v2")],ud);const Mhe=dt` + button { + border: none; + border-radius: var(--wui-border-radius-3xl); + } + + button[data-variant='main'] { + background-color: var(--wui-color-accent-100); + color: var(--wui-color-inverse-100); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + button[data-variant='accent'] { + background-color: var(--wui-color-accent-glass-010); + color: var(--wui-color-accent-100); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + button[data-variant='gray'] { + background-color: transparent; + color: var(--wui-color-fg-200); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + button[data-variant='shade'] { + background-color: transparent; + color: var(--wui-color-accent-100); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + button[data-size='sm'] { + height: 32px; + padding: 0 var(--wui-spacing-s); + } + + button[data-size='md'] { + height: 40px; + padding: 0 var(--wui-spacing-l); + } + + button[data-size='sm'] > wui-image { + width: 16px; + height: 16px; + } + + button[data-size='md'] > wui-image { + width: 24px; + height: 24px; + } + + button[data-size='sm'] > wui-icon { + width: 12px; + height: 12px; + } + + button[data-size='md'] > wui-icon { + width: 14px; + height: 14px; + } + + wui-image { + border-radius: var(--wui-border-radius-3xl); + overflow: hidden; + } + + button.disabled > wui-icon, + button.disabled > wui-image { + filter: grayscale(1); + } + + button[data-variant='main'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-color-accent-090); + } + + button[data-variant='shade'] > wui-image, + button[data-variant='gray'] > wui-image { + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + @media (hover: hover) and (pointer: fine) { + button[data-variant='main']:focus-visible { + background-color: var(--wui-color-accent-090); + } + + button[data-variant='main']:hover:enabled { + background-color: var(--wui-color-accent-090); + } + + button[data-variant='main']:active:enabled { + background-color: var(--wui-color-accent-080); + } + + button[data-variant='accent']:hover:enabled { + background-color: var(--wui-color-accent-glass-015); + } + + button[data-variant='accent']:active:enabled { + background-color: var(--wui-color-accent-glass-020); + } + + button[data-variant='shade']:focus-visible, + button[data-variant='gray']:focus-visible, + button[data-variant='shade']:hover, + button[data-variant='gray']:hover { + background-color: var(--wui-color-gray-glass-002); + } + + button[data-variant='gray']:active, + button[data-variant='shade']:active { + background-color: var(--wui-color-gray-glass-005); + } + } + + button.disabled { + color: var(--wui-color-gray-glass-020); + background-color: var(--wui-color-gray-glass-002); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + pointer-events: none; + } +`;var _1=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 hd=class extends vt{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e=this.size==="sm"?"small-600":"paragraph-600";return Pe` + + `}};hd.styles=[Rt,lr,Mhe];_1([he()],hd.prototype,"variant",void 0);_1([he()],hd.prototype,"imageSrc",void 0);_1([he({type:Boolean})],hd.prototype,"disabled",void 0);_1([he()],hd.prototype,"icon",void 0);_1([he()],hd.prototype,"size",void 0);_1([he()],hd.prototype,"text",void 0);hd=_1([Re("wui-chip-button")],hd);const Dhe=dt` + button { + display: flex; + gap: var(--wui-spacing-xl); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xxs); + padding: var(--wui-spacing-m) var(--wui-spacing-s); + } + + wui-text { + width: 100%; + } + + wui-flex { + width: auto; + } + + .network-icon { + width: var(--wui-spacing-2l); + height: var(--wui-spacing-2l); + border-radius: calc(var(--wui-spacing-2l) / 2); + overflow: hidden; + box-shadow: + 0 0 0 3px var(--wui-color-gray-glass-002), + 0 0 0 3px var(--wui-color-modal-bg); + } +`;var kI=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 Ev=class extends vt{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return Pe` + + `}networksTemplate(){const e=this.networkImages.slice(0,5);return Pe` + ${e==null?void 0:e.map(t=>Pe` `)} + `}};Ev.styles=[Rt,lr,Dhe];kI([he({type:Array})],Ev.prototype,"networkImages",void 0);kI([he()],Ev.prototype,"text",void 0);Ev=kI([Re("wui-compatible-network")],Ev);const $he=dt` + wui-flex { + width: 100%; + background-color: var(--wui-color-gray-glass-005); + border-radius: var(--wui-border-radius-s); + padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) + var(--wui-spacing-1xs); + } +`;var NI=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 Cv=class extends vt{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return Pe` + + + ${this.text} + + `}};Cv.styles=[Rt,lr,$he];NI([he()],Cv.prototype,"icon",void 0);NI([he()],Cv.prototype,"text",void 0);Cv=NI([Re("wui-banner")],Cv);const Bhe=dt` + wui-flex { + width: 100%; + background-color: var(--wui-color-gray-glass-005); + border-radius: var(--wui-border-radius-m); + padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs) + var(--wui-spacing-1xs); + } +`;var A_=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 vw=class extends vt{constructor(){super(...arguments),this.imageSrc="",this.text="",this.size=""}render(){return Pe` + + + ${this.text} + + `}};vw.styles=[Rt,lr,Bhe];A_([he()],vw.prototype,"imageSrc",void 0);A_([he()],vw.prototype,"text",void 0);A_([he()],vw.prototype,"size",void 0);vw=A_([Re("wui-banner-img")],vw);const Lhe=dt` + button { + padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); + display: flex; + justify-content: space-between; + width: 100%; + border-radius: var(--wui-border-radius-xs); + background-color: var(--wui-color-gray-glass-002); + } + + button[data-clickable='false'] { + pointer-events: none; + background-color: transparent; + } + + wui-image, + wui-icon { + width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + } + + wui-image { + border-radius: var(--wui-border-radius-3xl); + } +`;var x1=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 dd=class extends vt{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return Pe` + + `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?Pe``:Pe``}};dd.styles=[Rt,lr,Lhe];x1([he()],dd.prototype,"tokenName",void 0);x1([he()],dd.prototype,"tokenImageUrl",void 0);x1([he({type:Number})],dd.prototype,"tokenValue",void 0);x1([he()],dd.prototype,"tokenAmount",void 0);x1([he()],dd.prototype,"tokenCurrency",void 0);x1([he({type:Boolean})],dd.prototype,"clickable",void 0);dd=x1([Re("wui-list-token")],dd);const Uhe=dt` + button { + width: 100%; + display: flex; + gap: var(--wui-spacing-s); + align-items: center; + justify-content: flex-start; + padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s); + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } + + wui-icon-box { + width: var(--wui-spacing-2xl); + height: var(--wui-spacing-2xl); + } + + wui-flex { + width: auto; + } +`;var i0=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 Mu=class extends vt{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return Pe` + + `}titleTemplate(){return this.tag?Pe` ${this.text}${this.tag} + `:Pe`${this.text}`}};Mu.styles=[Rt,lr,Uhe];i0([he()],Mu.prototype,"icon",void 0);i0([he()],Mu.prototype,"text",void 0);i0([he()],Mu.prototype,"description",void 0);i0([he()],Mu.prototype,"tag",void 0);i0([he()],Mu.prototype,"iconBackgroundColor",void 0);i0([he()],Mu.prototype,"iconColor",void 0);i0([he({type:Boolean})],Mu.prototype,"disabled",void 0);Mu=i0([Re("wui-list-description")],Mu);const Fhe=dt` + :host { + position: relative; + display: inline-block; + } + + input { + background: transparent; + width: 100%; + height: auto; + font-family: var(--wui-font-family); + color: var(--wui-color-fg-100); + + font-feature-settings: 'case' on; + font-size: 32px; + font-weight: var(--wui-font-weight-light); + caret-color: var(--wui-color-accent-100); + line-height: 130%; + letter-spacing: -1.28px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input::placeholder { + color: var(--wui-color-fg-275); + } +`,jhe=/[.*+?^${}()|[\]\\]/gu,Hhe=/[0-9,.]/u;var E_=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 yw=class extends vt{constructor(){super(...arguments),this.inputElementRef=mI(),this.disabled=!1,this.value="",this.placeholder="0"}render(){var e;return(e=this.inputElementRef)!=null&&e.value&&this.value&&(this.inputElementRef.value.value=this.value),Pe` `}dispatchInputChangeEvent(e){var n,i;const t=e.data;if(t&&((n=this.inputElementRef)!=null&&n.value))if(t===","){const s=this.inputElementRef.value.value.replace(",",".");this.inputElementRef.value.value=s,this.value=`${this.value}${s}`}else Hhe.test(t)||(this.inputElementRef.value.value=this.value.replace(new RegExp(t.replace(jhe,"\\$&"),"gu"),""));this.dispatchEvent(new CustomEvent("inputChange",{detail:(i=this.inputElementRef.value)==null?void 0:i.value,bubbles:!0,composed:!0}))}};yw.styles=[Rt,lr,Fhe];E_([he({type:Boolean})],yw.prototype,"disabled",void 0);E_([he({type:String})],yw.prototype,"value",void 0);E_([he({type:String})],yw.prototype,"placeholder",void 0);yw=E_([Re("wui-input-amount")],yw);const Whe=dt` + :host { + display: flex; + gap: var(--wui-spacing-xs); + border-radius: var(--wui-border-radius-3xl); + border: 1px solid var(--wui-color-gray-glass-002); + background: var(--wui-color-gray-glass-002); + padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs) + var(--wui-spacing-s); + align-items: center; + } + + wui-avatar, + wui-icon, + wui-image { + width: 32px; + height: 32px; + border: 1px solid var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-3xl); + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-002); + } +`;var By=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 zp=class extends vt{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return Pe`${this.text} + ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?Pe``:this.imageSrc?Pe``:Pe``}};zp.styles=[Rt,lr,Whe];By([he()],zp.prototype,"text",void 0);By([he()],zp.prototype,"address",void 0);By([he()],zp.prototype,"imageSrc",void 0);By([he({type:Boolean})],zp.prototype,"isAddress",void 0);zp=By([Re("wui-preview-item")],zp);const zhe=dt` + button { + padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs); + display: flex; + justify-content: space-between; + width: 100%; + border-radius: var(--wui-border-radius-xs); + background-color: var(--wui-color-gray-glass-002); + } + + button[data-clickable='false'] { + pointer-events: none; + background-color: transparent; + } + + wui-image { + width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + border-radius: var(--wui-border-radius-3xl); + } + + wui-avatar { + width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + box-shadow: 0 0 0 0; + } + .address { + color: var(--wui-color-fg-base-100); + } + .address-description { + text-transform: capitalize; + color: var(--wui-color-fg-base-200); + } + + wui-icon-box { + position: relative; + right: 15px; + top: 15px; + border: 2px solid var(--wui-color-bg-150); + background-color: var(--wui-color-bg-125); + } +`;var Ly=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 Vp=class extends vt{constructor(){super(...arguments),this.accountAddress="",this.accountType="",this.connectedConnector=en.getConnectedConnector(),this.labels=De.state.addressLabels,this.caipNetwork=it.state.caipNetwork,this.socialProvider=en.getConnectedSocialProvider(),this.balance=0,this.fetchingBalance=!0,this.shouldShowIcon=!1,this.selected=!1}connectedCallback(){var e;super.connectedCallback(),Hn.getBalance(this.accountAddress,(e=this.caipNetwork)==null?void 0:e.id).then(t=>{let n=this.balance;t.balances.length>0&&(n=t.balances.reduce((i,s)=>i+((s==null?void 0:s.value)||0),0)),this.balance=n,this.fetchingBalance=!1,this.requestUpdate()})}render(){const e=this.getLabel();return this.shouldShowIcon=this.connectedConnector==="AUTH",Pe` + + + + ${this.shouldShowIcon?Pe``:Pe``} + + ${Qt.getTruncateString({string:this.accountAddress,charsStart:4,charsEnd:6,truncate:"middle"})} + ${e} + + + ${this.fetchingBalance?Pe``:Pe` $${this.balance.toFixed(2)}`} + + + + `}getLabel(){var t;let e=(t=this.labels)==null?void 0:t.get(this.accountAddress);return!e&&this.connectedConnector==="AUTH"?e=`${this.accountType==="eoa"?this.socialProvider??"Email":"Smart"} Account`:!e&&this.connectedConnector==="INJECTED"||this.connectedConnector==="ANNOUNCED"?e="Injected Account":e||(e="EOA"),e}};Vp.styles=[Rt,lr,zhe];Ly([he()],Vp.prototype,"accountAddress",void 0);Ly([he()],Vp.prototype,"accountType",void 0);Ly([he({type:Boolean})],Vp.prototype,"selected",void 0);Ly([he({type:Function})],Vp.prototype,"onSelect",void 0);Vp=Ly([Re("wui-list-account")],Vp);const Vhe=dt` + :host { + position: relative; + } + + button { + display: flex; + justify-content: center; + align-items: center; + height: 48px; + width: 100%; + background-color: var(--wui-color-accent-glass-010); + border-radius: var(--wui-border-radius-xs); + border: 1px solid var(--wui-color-accent-glass-010); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color; + } + + wui-tooltip { + padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s); + position: absolute; + top: -8px; + left: 50%; + transform: translate(-50%, -100%); + opacity: 0; + display: none; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: var(--wui-color-accent-glass-015); + } + + button:active:enabled { + background-color: var(--wui-color-accent-glass-020); + } + } +`;var PI=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 Sv=class extends vt{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return Pe``}};Sv.styles=[Rt,lr,Vhe];PI([he()],Sv.prototype,"text",void 0);PI([he()],Sv.prototype,"icon",void 0);Sv=PI([Re("wui-icon-button")],Sv);const qhe=dt` + button { + column-gap: var(--wui-spacing-s); + padding: 16.5px var(--wui-spacing-l) 16.5px var(--wui-spacing-xs); + width: 100%; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-100); + justify-content: center; + align-items: center; + } + + button:disabled { + background-color: var(--wui-color-gray-glass-015); + color: var(--wui-color-gray-glass-015); + } +`;var OI=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 Iv=class extends vt{constructor(){super(...arguments),this.text="",this.disabled=!1}render(){return Pe` + + `}};Iv.styles=[Rt,lr,qhe];OI([he()],Iv.prototype,"text",void 0);OI([he({type:Boolean})],Iv.prototype,"disabled",void 0);Iv=OI([Re("wui-list-button")],Iv);const Khe=dt` + button { + column-gap: var(--wui-spacing-s); + padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs); + width: 100%; + justify-content: flex-start; + background-color: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + color: var(--wui-color-fg-100); + } + + wui-text { + text-transform: capitalize; + } + + wui-text[data-align='left'] { + display: flex; + flex: 1; + } + + wui-text[data-align='center'] { + display: flex; + flex: 1; + justify-content: center; + } + + .invisible { + opacity: 0; + pointer-events: none; + } + + button:disabled { + background-color: var(--wui-color-gray-glass-015); + color: var(--wui-color-gray-glass-015); + } +`;var Uy=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 qp=class extends vt{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.align="left",this.disabled=!1}render(){return Pe` + + `}templatePlacement(){return this.align==="center"?Pe` `:null}};qp.styles=[Rt,lr,Khe];Uy([he()],qp.prototype,"logo",void 0);Uy([he()],qp.prototype,"name",void 0);Uy([he()],qp.prototype,"align",void 0);Uy([he({type:Boolean})],qp.prototype,"disabled",void 0);qp=Uy([Re("wui-list-social")],qp);const Ghe=dt` + button { + display: block; + display: flex; + align-items: center; + padding: var(--wui-spacing-xxs); + gap: var(--wui-spacing-xxs); + transition: all var(--wui-ease-out-power-1) var(--wui-duration-md); + border-radius: var(--wui-border-radius-xxs); + } + + wui-image { + border-radius: 100%; + width: var(--wui-spacing-xl); + height: var(--wui-spacing-xl); + } + + wui-icon-box { + width: var(--wui-spacing-xl); + height: var(--wui-spacing-xl); + } + + button:hover { + background-color: var(--wui-color-gray-glass-002); + } + + button:active { + background-color: var(--wui-color-gray-glass-005); + } +`;var WF=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 P6=class extends vt{constructor(){super(...arguments),this.imageSrc=""}render(){return Pe``}imageTemplate(){return this.imageSrc?Pe``:Pe``}};P6.styles=[Rt,lr,c_,Ghe];WF([he()],P6.prototype,"imageSrc",void 0);P6=WF([Re("wui-select")],P6);const Zhe=dt` + :host { + display: grid; + width: inherit; + height: inherit; + } +`;var wc=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 Uo=class extends vt{render(){return this.style.cssText=` + grid-template-rows: ${this.gridTemplateRows}; + grid-template-columns: ${this.gridTemplateColumns}; + justify-items: ${this.justifyItems}; + align-items: ${this.alignItems}; + justify-content: ${this.justifyContent}; + align-content: ${this.alignContent}; + column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; + row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; + gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; + padding-top: ${this.padding&&Qt.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&Qt.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&Qt.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&Qt.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&Qt.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&Qt.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&Qt.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&Qt.getSpacingStyles(this.margin,3)}; + `,Pe``}};Uo.styles=[Rt,Zhe];wc([he()],Uo.prototype,"gridTemplateRows",void 0);wc([he()],Uo.prototype,"gridTemplateColumns",void 0);wc([he()],Uo.prototype,"justifyItems",void 0);wc([he()],Uo.prototype,"alignItems",void 0);wc([he()],Uo.prototype,"justifyContent",void 0);wc([he()],Uo.prototype,"alignContent",void 0);wc([he()],Uo.prototype,"columnGap",void 0);wc([he()],Uo.prototype,"rowGap",void 0);wc([he()],Uo.prototype,"gap",void 0);wc([he()],Uo.prototype,"padding",void 0);wc([he()],Uo.prototype,"margin",void 0);Uo=wc([Re("wui-grid")],Uo);const Yhe=dt` + :host { + position: relative; + display: flex; + width: 100%; + height: 1px; + background-color: var(--wui-color-gray-glass-005); + justify-content: center; + align-items: center; + } + + :host > wui-text { + position: absolute; + padding: 0px 10px; + background-color: var(--wui-color-modal-bg); + } +`;var zF=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 O6=class extends vt{constructor(){super(...arguments),this.text=""}render(){return Pe`${this.template()}`}template(){return this.text?Pe`${this.text}`:null}};O6.styles=[Rt,Yhe];zF([he()],O6.prototype,"text",void 0);O6=zF([Re("wui-separator")],O6);const U5={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}},Qhe=3,Jhe=["receive","deposit","borrow","claim"],Xhe=["withdraw","repay","burn"],K0={getMonthName(r){const e=new Date;return e.setMonth(r),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(r,e){const t=nI.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:K0.getTransactionTransferTokenType(r),url:K0.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 Jhe.includes(e)?h="+":Xhe.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(Qhe):null}};let jP=!1;class ede{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=>Ul.getNamesForAddress(n),this.resolveWalletConnectName=async n=>{var a;const i=n.replace(vn.WC_NAME_SUFFIX,""),s=await Ul.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),fF(ii.state.themeMode)}setThemeVariables(e){ii.setThemeVariables(e),Pae(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 pu.state}subscribeState(e){return pu.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-DvOqXmJq.js");return{SIWEController:o}},[]);s.setSIWEClient(e.siweConfig)}}async initOrContinue(){return!this.initPromise&&!jP&&ot.isClient()&&(jP=!0,this.initPromise=new Promise(async e=>{await Promise.all([lc(()=>import("./index-C8FfjQ5T.js"),[]),lc(()=>import("./w3m-modal-BCw6YggM.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 + */const I4=globalThis,MI=I4.ShadowRoot&&(I4.ShadyCSS===void 0||I4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,DI=Symbol(),HP=new WeakMap;let VF=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==DI)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(MI&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=HP.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&HP.set(t,e))}return e}toString(){return this.cssText}};const tde=r=>new VF(typeof r=="string"?r:r+"",void 0,DI),Dt=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new VF(t,r,DI)},rde=(r,e)=>{if(MI)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const n=document.createElement("style"),i=I4.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},WP=MI?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return tde(t)})(r):r;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:nde,defineProperty:ide,getOwnPropertyDescriptor:sde,getOwnPropertyNames:ode,getOwnPropertySymbols:ade,getPrototypeOf:cde}=Object,Mf=globalThis,zP=Mf.trustedTypes,lde=zP?zP.emptyScript:"",IE=Mf.reactiveElementPolyfillSupport,R3=(r,e)=>r,M6={toAttribute(r,e){switch(e){case Boolean:r=r?lde:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},$I=(r,e)=>!nde(r,e),VP={attribute:!0,type:String,converter:M6,reflect:!1,hasChanged:$I};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Mf.litPropertyMetadata??(Mf.litPropertyMetadata=new WeakMap);let Eg=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=VP){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&ide(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:s}=sde(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const a=i==null?void 0:i.call(this);s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??VP}static _$Ei(){if(this.hasOwnProperty(R3("elementProperties")))return;const e=cde(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(R3("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(R3("properties"))){const t=this.properties,n=[...ode(t),...ade(t)];for(const i of n)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)t.unshift(WP(i))}else e!==void 0&&t.push(WP(e));return t}static _$Eu(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rde(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostConnected)==null?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var n;return(n=t.hostDisconnected)==null?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EC(e,t){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const o=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:M6).toAttribute(t,n.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var s;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=n.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:M6;this._$Em=i,this[i]=a.fromAttribute(t,o.type),this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){if(n??(n=this.constructor.getPropertyOptions(e)),!(n.hasChanged??$I)(this[e],t))return;this.P(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}};Eg.elementStyles=[],Eg.shadowRootOptions={mode:"open"},Eg[R3("elementProperties")]=new Map,Eg[R3("finalized")]=new Map,IE==null||IE({ReactiveElement:Eg}),(Mf.reactiveElementVersions??(Mf.reactiveElementVersions=[])).push("2.0.4");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const k3=globalThis,D6=k3.trustedTypes,qP=D6?D6.createPolicy("lit-html",{createHTML:r=>r}):void 0,qF="$lit$",rf=`lit$${Math.random().toFixed(9).slice(2)}$`,KF="?"+rf,ude=`<${KF}>`,Kp=document,Tv=()=>Kp.createComment(""),Rv=r=>r===null||typeof r!="object"&&typeof r!="function",BI=Array.isArray,hde=r=>BI(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",TE=`[ +\f\r]`,j2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,KP=/-->/g,GP=/>/g,N0=RegExp(`>|${TE}(?:([^\\s"'>=/]+)(${TE}*=${TE}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),ZP=/'/g,YP=/"/g,GF=/^(?:script|style|textarea|title)$/i,dde=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ne=dde(1),bw=Symbol.for("lit-noChange"),gi=Symbol.for("lit-nothing"),QP=new WeakMap,G0=Kp.createTreeWalker(Kp,129);function ZF(r,e){if(!BI(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return qP!==void 0?qP.createHTML(e):e}const fde=(r,e)=>{const t=r.length-1,n=[];let i,s=e===2?"":e===3?"":"",o=j2;for(let a=0;a"?(o=i??j2,f=-1):h[1]===void 0?f=-2:(f=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?N0:h[3]==='"'?YP:ZP):o===YP||o===ZP?o=N0:o===KP||o===GP?o=j2:(o=N0,i=void 0);const y=o===N0&&r[a+1].startsWith("/>")?" ":"";s+=o===j2?c+ude:f>=0?(n.push(l),c.slice(0,f)+qF+c.slice(f)+rf+y):c+rf+(f===-2?a:y)}return[ZF(r,s+(r[t]||"")+(e===2?"":e===3?"":"")),n]};let W9=class YF{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[l,h]=fde(e,t);if(this.el=YF.createElement(l,n),G0.currentNode=this.el.content,t===2||t===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=G0.nextNode())!==null&&c.length0){i.textContent=D6?D6.emptyScript:"";for(let y=0;y2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=gi}_$AI(e,t=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=_w(this,e,t,0),o=!Rv(e)||e!==this._$AH&&e!==bw,o&&(this._$AH=e);else{const a=e;let c,l;for(e=s[0],c=0;c{const n=(t==null?void 0:t.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(t==null?void 0:t.renderBefore)??null;n._$litPart$=i=new LI(e.insertBefore(Tv(),s),s,void 0,t??{})}return i._$AI(r),i};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */let et=class extends Eg{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=yde(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return bw}};var mL;et._$litElement$=!0,et.finalized=!0,(mL=globalThis.litElementHydrateSupport)==null||mL.call(globalThis,{LitElement:et});const kE=globalThis.litElementPolyfillSupport;kE==null||kE({LitElement:et});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const bde={attribute:!0,type:String,converter:M6,reflect:!1,hasChanged:$I},_de=(r=bde,e,t)=>{const{kind:n,metadata:i}=t;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(t.name,r),n==="accessor"){const{name:o}=t;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(n==="setter"){const{name:o}=t;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+n)};function kt(r){return(e,t)=>typeof t=="object"?_de(r,e,t):((n,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,o?{...n,wrapped:!0}:n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(r,e,t)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function ge(r){return kt({...r,state:!0,attribute:!1})}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Lt=r=>r??gi;var xa=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 Fo=class extends et{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=De.state.address,this.balanceVal=De.state.balance,this.balanceSymbol=De.state.balanceSymbol,this.profileName=De.state.profileName,this.profileImage=De.state.profileImage,this.network=it.state.caipNetwork,this.networkImage=this.network?Lr.getNetworkImage(this.network):void 0,this.isUnsupportedChain=it.state.isUnsupportedChain,this.unsubscribe.push(Jn.subscribeNetworkImages(()=>{var e;this.networkImage=(e=this.network)!=null&&e.imageId?Lr.getNetworkImage(this.network):void 0}),De.subscribe(e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")}),it.subscribeKey("caipNetwork",e=>{this.network=e,this.networkImage=e!=null&&e.imageId?Lr.getNetworkImage(e):void 0}),it.subscribeKey("isUnsupportedChain",e=>{this.isUnsupportedChain=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.balance==="show";return ne` + + + `}onClick(){this.isUnsupportedChain?nr.open({view:"UnsupportedChain"}):nr.open()}};xa([kt({type:Boolean})],Fo.prototype,"disabled",void 0);xa([kt()],Fo.prototype,"balance",void 0);xa([kt()],Fo.prototype,"charsStart",void 0);xa([kt()],Fo.prototype,"charsEnd",void 0);xa([ge()],Fo.prototype,"address",void 0);xa([ge()],Fo.prototype,"balanceVal",void 0);xa([ge()],Fo.prototype,"balanceSymbol",void 0);xa([ge()],Fo.prototype,"profileName",void 0);xa([ge()],Fo.prototype,"profileImage",void 0);xa([ge()],Fo.prototype,"network",void 0);xa([ge()],Fo.prototype,"networkImage",void 0);xa([ge()],Fo.prototype,"isUnsupportedChain",void 0);Fo=xa([Re("w3m-account-button")],Fo);const xde=Dt` + :host { + display: block; + width: max-content; + } +`;var Ku=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 pc=class extends et{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=De.state.isConnected,this.isLoading=nr.state.loading}firstUpdated(){this.unsubscribe.push(De.subscribe(e=>{this.isAccount=e.isConnected}),nr.subscribeKey("loading",e=>{this.isLoading=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.isAccount&&!this.isLoading?ne` + + + `:ne` + + `}};pc.styles=xde;Ku([kt({type:Boolean})],pc.prototype,"disabled",void 0);Ku([kt()],pc.prototype,"balance",void 0);Ku([kt()],pc.prototype,"size",void 0);Ku([kt()],pc.prototype,"label",void 0);Ku([kt()],pc.prototype,"loadingLabel",void 0);Ku([kt()],pc.prototype,"charsStart",void 0);Ku([kt()],pc.prototype,"charsEnd",void 0);Ku([ge()],pc.prototype,"isAccount",void 0);Ku([ge()],pc.prototype,"isLoading",void 0);pc=Ku([Re("w3m-button")],pc);var Zw=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 Gp=class extends et{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=nr.state.open,this.loading=nr.state.loading,this.unsubscribe.push(nr.subscribe(e=>{this.open=e.open,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.loading||this.open;return ne` + + ${e?this.loadingLabel:this.label} + + `}onClick(){this.open?nr.close():this.loading||nr.open()}};Zw([kt()],Gp.prototype,"size",void 0);Zw([kt()],Gp.prototype,"label",void 0);Zw([kt()],Gp.prototype,"loadingLabel",void 0);Zw([ge()],Gp.prototype,"open",void 0);Zw([ge()],Gp.prototype,"loading",void 0);Gp=Zw([Re("w3m-connect-button")],Gp);const Ade=Dt` + :host { + display: block; + width: max-content; + } +`;var s0=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 Du=class extends et{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.network=it.state.caipNetwork,this.networkImage=this.network?Lr.getNetworkImage(this.network):void 0,this.connected=De.state.isConnected,this.loading=nr.state.loading,this.isUnsupportedChain=it.state.isUnsupportedChain}firstUpdated(){this.unsubscribe.push(Jn.subscribeNetworkImages(()=>{var e;this.networkImage=(e=this.network)!=null&&e.imageId?Lr.getNetworkImage(this.network):void 0}),it.subscribeKey("caipNetwork",e=>{this.network=e,this.networkImage=e!=null&&e.imageId?Lr.getNetworkImage(e):void 0}),De.subscribeKey("isConnected",e=>this.connected=e),nr.subscribeKey("loading",e=>this.loading=e),it.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + ${this.getLabel()} + + + `}getLabel(){return this.label?this.label:this.isUnsupportedChain?"Switch Network":this.network?this.network.name:this.connected?"Unknown Network":"Select Network"}onClick(){this.loading||(It.sendEvent({type:"track",event:"CLICK_NETWORKS"}),nr.open({view:"Networks"}))}};Du.styles=Ade;s0([kt({type:Boolean})],Du.prototype,"disabled",void 0);s0([kt({type:String})],Du.prototype,"label",void 0);s0([ge()],Du.prototype,"network",void 0);s0([ge()],Du.prototype,"networkImage",void 0);s0([ge()],Du.prototype,"connected",void 0);s0([ge()],Du.prototype,"loading",void 0);s0([ge()],Du.prototype,"isUnsupportedChain",void 0);Du=s0([Re("w3m-network-button")],Du);const Ede=Dt` + :host { + --prev-height: 0px; + --new-height: 0px; + display: block; + } + + div.w3m-router-container { + transform: translateY(0); + opacity: 1; + } + + div.w3m-router-container[view-direction='prev'] { + animation: + slide-left-out 150ms forwards ease, + slide-left-in 150ms forwards ease; + animation-delay: 0ms, 200ms; + } + + div.w3m-router-container[view-direction='next'] { + animation: + slide-right-out 150ms forwards ease, + slide-right-in 150ms forwards ease; + animation-delay: 0ms, 200ms; + } + + @keyframes slide-left-out { + from { + transform: translateX(0px); + opacity: 1; + } + to { + transform: translateX(10px); + opacity: 0; + } + } + + @keyframes slide-left-in { + from { + transform: translateX(-10px); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } + } + + @keyframes slide-right-out { + from { + transform: translateX(0px); + opacity: 1; + } + to { + transform: translateX(-10px); + opacity: 0; + } + } + + @keyframes slide-right-in { + from { + transform: translateX(10px); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } + } +`;var Cde={};const Yh={ACCOUNT_TABS:[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}],SECURE_SITE_ORIGIN:Cde.NEXT_PUBLIC_SECURE_SITE_ORIGIN||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120,ModalHeight:150,ViewTransition:150}};var UI=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 kv=class extends et{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=Te.state.view,this.viewDirection="",this.unsubscribe.push(Te.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{const t=`${e==null?void 0:e.contentRect.height}px`;this.prevHeight!=="0px"&&(this.style.setProperty("--prev-height",this.prevHeight),this.style.setProperty("--new-height",t),this.style.animation="w3m-view-height 150ms forwards ease",this.style.height="auto"),setTimeout(()=>{this.prevHeight=t,this.style.animation="unset"},Yh.ANIMATION_DURATIONS.ModalHeight)}),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){var e;(e=this.resizeObserver)==null||e.unobserve(this.getWrapper()),this.unsubscribe.forEach(t=>t())}render(){return ne`
+ ${this.viewTemplate()} +
`}viewTemplate(){switch(this.view){case"AccountSettings":return ne``;case"Account":return ne``;case"AllWallets":return ne``;case"ApproveTransaction":return ne``;case"BuyInProgress":return ne``;case"ChooseAccountName":return ne``;case"Connect":return ne``;case"ConnectingWalletConnect":return ne``;case"ConnectingExternal":return ne``;case"ConnectingSiwe":return ne``;case"ConnectWallets":return ne``;case"ConnectSocials":return ne``;case"ConnectingSocial":return ne``;case"Downloads":return ne``;case"EmailVerifyOtp":return ne``;case"EmailVerifyDevice":return ne``;case"GetWallet":return ne``;case"Networks":return ne``;case"SwitchNetwork":return ne``;case"Profile":return ne``;case"SelectAddresses":return ne``;case"SwitchAddress":return ne``;case"Transactions":return ne``;case"OnRampProviders":return ne``;case"OnRampActivity":return ne``;case"OnRampTokenSelect":return ne``;case"OnRampFiatSelect":return ne``;case"UpgradeEmailWallet":return ne``;case"UpgradeToSmartAccount":return ne``;case"UpdateEmailWallet":return ne``;case"UpdateEmailPrimaryOtp":return ne``;case"UpdateEmailSecondaryOtp":return ne``;case"UnsupportedChain":return ne``;case"Swap":return ne``;case"SwapSelectToken":return ne``;case"SwapPreview":return ne``;case"WalletSend":return ne``;case"WalletSendSelectToken":return ne``;case"WalletSendPreview":return ne``;case"WhatIsABuy":return ne``;case"WalletReceive":return ne``;case"WalletCompatibleNetworks":return ne``;case"WhatIsAWallet":return ne``;case"ConnectingMultiChain":return ne``;case"WhatIsANetwork":return ne``;case"ConnectingFarcaster":return ne``;case"SwitchActiveChain":return ne``;case"RegisterAccountName":return ne``;case"RegisterAccountNameSuccess":return ne``;default:return ne``}}onViewChange(e){aa.hide();let t=Yh.VIEW_DIRECTION.Next;const{history:n}=Te.state;n.length{this.view=e},Yh.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("div")}};kv.styles=Ede;UI([ge()],kv.prototype,"view",void 0);UI([ge()],kv.prototype,"viewDirection",void 0);kv=UI([Re("w3m-router")],kv);const Sde=Dt` + :host > wui-flex { + width: 100%; + max-width: 360px; + } + + :host > wui-flex > wui-flex { + border-radius: var(--wui-border-radius-l); + width: 100%; + } + + .amounts-container { + width: 100%; + } +`;var o0=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};const Ide={USD:"$",EUR:"€",GBP:"£"},Tde=[100,250,500,1e3];let $u=class extends et{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=De.state.isConnected,this.loading=nr.state.loading,this.paymentCurrency=on.state.paymentCurrency,this.paymentAmount=on.state.paymentAmount,this.purchaseAmount=on.state.purchaseAmount,this.quoteLoading=on.state.quotesLoading,this.unsubscribe.push(De.subscribeKey("isConnected",e=>{this.connected=e}),nr.subscribeKey("loading",e=>{this.loading=e}),on.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + + + + + ${Tde.map(e=>{var t;return ne`this.selectPresetAmount(e)} + >${`${Ide[((t=this.paymentCurrency)==null?void 0:t.id)||"USD"]} ${e}`}`})} + + ${this.templateButton()} + + + `}templateButton(){return this.connected?ne` + Get quotes + `:ne` + Connect wallet + `}getQuotes(){this.loading||nr.open({view:"OnRampProviders"})}openModal(){nr.open({view:"Connect"})}async onPaymentAmountChange(e){on.setPaymentAmount(Number(e.detail)),await on.getQuote()}async selectPresetAmount(e){on.setPaymentAmount(e),await on.getQuote()}};$u.styles=Sde;o0([kt({type:Boolean})],$u.prototype,"disabled",void 0);o0([ge()],$u.prototype,"connected",void 0);o0([ge()],$u.prototype,"loading",void 0);o0([ge()],$u.prototype,"paymentCurrency",void 0);o0([ge()],$u.prototype,"paymentAmount",void 0);o0([ge()],$u.prototype,"purchaseAmount",void 0);o0([ge()],$u.prototype,"quoteLoading",void 0);$u=o0([Re("w3m-onramp-widget")],$u);var Gu=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 pl=class extends et{constructor(){super(),this.usubscribe=[],this.networkImages=Jn.state.networkImages,this.address=De.state.address,this.profileImage=De.state.profileImage,this.profileName=De.state.profileName,this.network=it.state.caipNetwork,this.preferredAccountType=De.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.switched=!1,this.text="",this.usubscribe.push(De.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):nr.close()}),De.subscribeKey("preferredAccountType",e=>this.preferredAccountType=e),it.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var n,i,s;if(!this.address)throw new Error("w3m-account-settings-view: No account provided");const e=this.networkImages[((n=this.network)==null?void 0:n.imageId)??""],t=(i=this.profileName)==null?void 0:i.split(".")[0];return ne` + + + + + + ${t?Qt.getTruncateString({string:t,charsStart:20,charsEnd:0,truncate:"end"}):Qt.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} + + + + + + + + ${this.authCardTemplate()} + + + + ${((s=this.network)==null?void 0:s.name)??"Unknown"} + + + ${this.togglePreferredAccountBtnTemplate()} ${this.chooseNameButtonTemplate()} + + Disconnect + + + + `}chooseNameButtonTemplate(){const e=en.getConnectedConnector();return!Mt.getAuthConnector()||e!=="AUTH"||this.profileName?null:ne` + + Choose account name + + `}authCardTemplate(){const e=en.getConnectedConnector(),t=Mt.getAuthConnector(),{origin:n}=location;return!t||e!=="AUTH"||n.includes(Ci.SECURE_SITE)?null:ne` + + `}isAllowedNetworkSwitch(){const e=it.getRequestedCaipNetworks(),t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}onCopyAddress(){try{this.profileName?(ot.copyToClopboard(this.profileName),Vt.showSuccess("Name copied")):this.address&&(ot.copyToClopboard(this.address),Vt.showSuccess("Address copied"))}catch{Vt.showError("Failed to copy")}}togglePreferredAccountBtnTemplate(){const e=it.checkIfSmartAccountEnabled(),t=en.getConnectedConnector();return!Mt.getAuthConnector()||t!=="AUTH"||!e?null:(this.switched||(this.text=this.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account"),ne` + + ${this.text} + + `)}onChooseName(){Te.push("ChooseAccountName")}async changePreferredAccountType(){const e=it.checkIfSmartAccountEnabled(),t=this.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT||!e?_r.ACCOUNT_TYPES.EOA:_r.ACCOUNT_TYPES.SMART_ACCOUNT;Mt.getAuthConnector()&&(this.loading=!0,await or.setPreferredAccountType(t),this.text=t===_r.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account",this.switched=!0,an.resetSend(),this.loading=!1,this.requestUpdate())}onNetworks(){this.isAllowedNetworkSwitch()&&Te.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await or.disconnect(),It.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),nr.close()}catch{It.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Vt.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onGoToUpgradeView(){It.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),Te.push("UpgradeEmailWallet")}};Gu([ge()],pl.prototype,"address",void 0);Gu([ge()],pl.prototype,"profileImage",void 0);Gu([ge()],pl.prototype,"profileName",void 0);Gu([ge()],pl.prototype,"network",void 0);Gu([ge()],pl.prototype,"preferredAccountType",void 0);Gu([ge()],pl.prototype,"disconnecting",void 0);Gu([ge()],pl.prototype,"loading",void 0);Gu([ge()],pl.prototype,"switched",void 0);Gu([ge()],pl.prototype,"text",void 0);pl=Gu([Re("w3m-account-settings-view")],pl);var Rde=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 JP=class extends et{render(){const e=en.getConnectedConnector(),t=Mt.getAuthConnector();return ne` + ${t!=null&&t.walletFeatures&&e==="AUTH"?this.walletFeaturesTemplate():this.defaultTemplate()} + `}walletFeaturesTemplate(){return ne``}defaultTemplate(){return ne``}};JP=Rde([Re("w3m-account-view")],JP);var JF=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 z9=class extends et{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=ot.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return ne` + + + ${this.qrButtonTemplate()} + + ${e?ne``:ne``} + `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return ot.isMobile()?ne` + + `:null}onWalletConnectQr(){Te.push("ConnectingWalletConnect")}};JF([ge()],z9.prototype,"search",void 0);z9=JF([Re("w3m-all-wallets-view")],z9);const kde=Dt` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-visual { + width: var(--wui-wallet-image-size-lg); + height: var(--wui-wallet-image-size-lg); + border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); + position: relative; + overflow: hidden; + } + + wui-visual::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + inset: 0; + border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity var(--wui-ease-out-power-2) var(--wui-duration-lg), + transform var(--wui-ease-out-power-2) var(--wui-duration-lg); + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px var(--wui-spacing-l); + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + wui-link { + padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); + } +`;var _l=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 ma=class extends et{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=on.state.selectedProvider,this.uri=or.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(on.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e})),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){var n,i;let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${(n=this.selectedOnRampProvider)==null?void 0:n.label}`);const t=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return ne` + + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${e} + + ${t} + + + ${this.error?this.tryAgainTemplate():null} + + + + + + Copy link + + + `}watchTransactions(){if(this.selectedOnRampProvider)switch(this.selectedOnRampProvider.name){case"coinbase":this.startTime=Date.now(),this.initializeCoinbaseTransactions();break}}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval(()=>this.watchCoinbaseTransactions(),4e3)}async watchCoinbaseTransactions(){try{const e=De.state.address,t=bt.state.projectId;if(!e)throw new Error("No address found");(await Hn.fetchTransactions({account:e,onramp:"coinbase",projectId:t})).data.filter(s=>new Date(s.metadata.minedAt)>new Date(this.startTime)||s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length?(clearInterval(this.intervalId),Te.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){Vt.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,ot.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){var e;return(e=this.selectedOnRampProvider)!=null&&e.url?ne` + + Try again + `:null}loaderTemplate(){const e=ii.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ne``}onCopyUri(){var e;if(!((e=this.selectedOnRampProvider)!=null&&e.url)){Vt.showError("No link found"),Te.goBack();return}try{ot.copyToClopboard(this.selectedOnRampProvider.url),Vt.showSuccess("Link copied")}catch{Vt.showError("Failed to copy")}}};ma.styles=kde;_l([ge()],ma.prototype,"intervalId",void 0);_l([ge()],ma.prototype,"selectedOnRampProvider",void 0);_l([ge()],ma.prototype,"uri",void 0);_l([ge()],ma.prototype,"ready",void 0);_l([ge()],ma.prototype,"showRetry",void 0);_l([ge()],ma.prototype,"buffering",void 0);_l([ge()],ma.prototype,"error",void 0);_l([ge()],ma.prototype,"startTime",void 0);_l([kt({type:Boolean})],ma.prototype,"isMobile",void 0);_l([kt()],ma.prototype,"onRetry",void 0);ma=_l([Re("w3m-buy-in-progress-view")],ma);const Nde=Dt` + :host > wui-flex { + max-height: clamp(360px, 540px, 80vh); + scrollbar-width: none; + overflow-y: scroll; + overflow-x: hidden; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } + + .all-wallets { + flex-flow: column; + } +`;var XF=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 $6=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + + + ${this.walletListTemplate()} + + + `}walletListTemplate(){const e=this.connectors.find(t=>t.type==="AUTH");return e!=null&&e.socials?e!=null&&e.showWallets?ne` + + + + + + + `:ne``:ne``}onContinueWalletClick(){Te.push("ConnectWallets")}};$6.styles=Nde;XF([ge()],$6.prototype,"connectors",void 0);$6=XF([Re("w3m-connect-view")],$6);const Pde=Dt` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition-property: opacity, transform; + transition-duration: var(--wui-duration-lg); + transition-timing-function: var(--wui-ease-out-power-2); + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px var(--wui-spacing-l); + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } +`;var A1=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};class Vo extends et{constructor(){var e,t,n,i;super(),this.wallet=(e=Te.state.data)==null?void 0:e.wallet,this.connector=(t=Te.state.data)==null?void 0:t.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=Lr.getWalletImage(this.wallet)??Lr.getConnectorImage(this.connector),this.name=((n=this.wallet)==null?void 0:n.name)??((i=this.connector)==null?void 0:i.name)??"Wallet",this.isRetrying=!1,this.uri=or.state.wcUri,this.error=or.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(or.subscribeKey("wcUri",s=>{var o;this.uri=s,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(o=this.onConnect)==null||o.call(this))}),or.subscribeKey("wcError",s=>this.error=s),or.subscribeKey("buffering",s=>this.buffering=s))}firstUpdated(){var e;(e=this.onAutoConnect)==null||e.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearTimeout(this.timeout)}render(){var n;(n=this.onRender)==null||n.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let t=`Continue in ${this.name}`;return this.buffering&&(t="Connecting..."),this.error&&(t="Connection declined"),ne` + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${t} + + ${e} + + + + + ${this.secondaryBtnLabel} + + + + ${this.isWalletConnect?ne` + + + + Copy link + + + `:null} + + + `}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var e,t;this.buffering||(or.setWcError(!1),this.onRetry?(this.isRetrying=!0,(e=this.onRetry)==null||e.call(this)):(t=this.onConnect)==null||t.call(this))}loaderTemplate(){const e=ii.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ne``}onCopyUri(){try{this.uri&&(ot.copyToClopboard(this.uri),Vt.showSuccess("Link copied"))}catch{Vt.showError("Failed to copy")}}}Vo.styles=Pde;A1([ge()],Vo.prototype,"uri",void 0);A1([ge()],Vo.prototype,"error",void 0);A1([ge()],Vo.prototype,"ready",void 0);A1([ge()],Vo.prototype,"showRetry",void 0);A1([ge()],Vo.prototype,"buffering",void 0);A1([kt({type:Boolean})],Vo.prototype,"isMobile",void 0);A1([kt()],Vo.prototype,"onRetry",void 0);var Ode=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 XP=class extends Vo{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.id!==ct.COINBASE_SDK_CONNECTOR_ID||!this.error)&&(await or.connectExternal(this.connector,this.connector.chain),bt.state.isSiweEnabled?Te.push("ConnectingSiwe"):nr.close(),It.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}}))}catch(e){It.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(e==null?void 0:e.message)??"Unknown"}}),this.error=!0}}};XP=Ode([Re("w3m-connecting-external-view")],XP);const Mde=Dt` + wui-flex, + wui-list-wallet { + width: 100%; + } +`;var ej=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 B6=class extends et{constructor(){super(),this.unsubscribe=[],this.activeConnector=st.state.activeConnector,this.unsubscribe.push(st.subscribeKey("activeConnector",e=>this.activeConnector=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return ne` + + + + + + + Select Chain for ${(e=this.activeConnector)==null?void 0:e.name} + + Select which chain to connect to your multi chain wallet + + + ${this.networksTemplate()} + + + `}networksTemplate(){var e,t;return(t=(e=this.activeConnector)==null?void 0:e.providers)==null?void 0:t.map(n=>ne` + this.onConnector(n)} + > + `)}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})}};B6.styles=Mde;ej([ge()],B6.prototype,"activeConnector",void 0);B6=ej([Re("w3m-connecting-multi-chain-view")],B6);var FI=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 L6=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-DvOqXmJq.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` + this.initializeConnection(!0)}> + + `;case"mobile":return ne` + this.initializeConnection(!0)}> + + `;case"qrcode":return ne``;default:return ne``}}headerTemplate(){return this.platforms.length>1?ne` + + + `:null}async onSelectPlatform(e){var n;const t=(n=this.shadowRoot)==null?void 0:n.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};FI([ge()],L6.prototype,"platform",void 0);FI([ge()],L6.prototype,"platforms",void 0);L6=FI([Re("w3m-connecting-wc-view")],L6);const Dde=Dt` + .continue-button-container { + width: 100%; + } +`;var tj=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(){super(...arguments),this.loading=!1}render(){return ne` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {ot.openHref(iI.URLS.FAQ,"_blank")}} + > + Learn more about names + + + + `}onboardingTemplate(){return ne` + + + + + + Choose your account name + + + Finally say goodbye to 0x addresses, name your account to make it easier to exchange + assets + + + `}buttonsTemplate(){return ne` + Choose name + + `}handleContinue(){Te.push("RegisterAccountName"),It.sendEvent({type:"track",event:"OPEN_ENS_FLOW",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}})}};U6.styles=Dde;tj([ge()],U6.prototype,"loading",void 0);U6=tj([Re("w3m-choose-account-name-view")],U6);var $de=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 eO=class extends et{constructor(){var e;super(...arguments),this.wallet=(e=Te.state.data)==null?void 0:e.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return ne` + + ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} + ${this.homepageTemplate()} + + `}chromeTemplate(){var e;return(e=this.wallet)!=null&&e.chrome_store?ne` + Chrome Extension + `:null}iosTemplate(){var e;return(e=this.wallet)!=null&&e.app_store?ne` + iOS App + `:null}androidTemplate(){var e;return(e=this.wallet)!=null&&e.play_store?ne` + Android App + `:null}homepageTemplate(){var e;return(e=this.wallet)!=null&&e.homepage?ne` + + Website + + `:null}onChromeStore(){var e;(e=this.wallet)!=null&&e.chrome_store&&ot.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&ot.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&ot.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&ot.openHref(this.wallet.homepage,"_blank")}};eO=$de([Re("w3m-downloads-view")],eO);var Bde=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};const Lde="https://walletconnect.com/explorer";let tO=class extends et{render(){return ne` + + ${this.recommendedWalletsTemplate()} + {ot.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} + > + + `}recommendedWalletsTemplate(){const{recommended:e,featured:t}=Yt.state,{customWallets:n}=bt.state;return[...t,...n??[],...e].slice(0,4).map(s=>ne` + {ot.openHref(s.homepage??Lde,"_blank")}} + > + `)}};tO=Bde([Re("w3m-get-wallet-view")],tO);const Ude=Dt` + wui-flex { + width: 100%; + } + + .suggestion { + background: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xs); + } + + .suggestion:hover { + background-color: var(--wui-color-gray-glass-005); + cursor: pointer; + } + + .suggested-name { + max-width: 75%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + form { + width: 100%; + } + + wui-icon-link { + position: absolute; + right: 20px; + transform: translateY(11px); + } +`;/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Fde=r=>r.strings===void 0;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const jde={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hde=r=>(...e)=>({_$litDirective$:r,values:e});let Wde=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this.t=e,this._$AM=t,this.i=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const N3=(r,e)=>{var n;const t=r._$AN;if(t===void 0)return!1;for(const i of t)(n=i._$AO)==null||n.call(i,e,!1),N3(i,e);return!0},F6=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while((t==null?void 0:t.size)===0)},rj=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),qde(e)}};function zde(r){this._$AN!==void 0?(F6(this),this._$AM=r,rj(this)):this._$AM=r}function Vde(r,e=!1,t=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=t;s{r.type==jde.CHILD&&(r._$AP??(r._$AP=Vde),r._$AQ??(r._$AQ=zde))};let Kde=class extends Wde{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),rj(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.call(this)),t&&(N3(this,e),F6(this))}setValue(e){if(Fde(this.t))this.t._$AI(e,this);else{const t=[...this.t._$AH];t[this.i]=e,this.t._$AI(t,this,0)}}disconnected(){}reconnected(){}};/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Nv=()=>new Gde;let Gde=class{};const NE=new WeakMap,Pv=Hde(class extends Kde{render(r){return gi}update(r,[e]){var n;const t=e!==this.Y;return t&&this.Y!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.Y=e,this.ht=(n=r.options)==null?void 0:n.host,this.rt(this.ct=r.element)),gi}rt(r){if(this.isConnected||(r=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let t=NE.get(e);t===void 0&&(t=new WeakMap,NE.set(e,t)),t.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),t.set(this.Y,r),r!==void 0&&this.Y.call(this.ht,r)}else this.Y.value=r}get lt(){var r,e;return typeof this.Y=="function"?(r=NE.get(this.ht??globalThis))==null?void 0:r.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var a0=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 Bu=class extends et{constructor(){super(),this.formRef=Nv(),this.usubscribe=[],this.name="",this.error="",this.loading=Ul.state.loading,this.suggestions=Ul.state.suggestions,this.registered=!1,this.profileName=De.state.profileName,this.onDebouncedNameInputChange=ot.debounce(e=>{Ul.validateName(e)?(this.error="",this.name=e,Ul.getSuggestions(e),Ul.isNameRegistered(e).then(t=>{this.registered=t})):e.length<4?this.error="Name must be at least 4 characters long":this.error="Can only contain letters, numbers and - characters"}),this.usubscribe.push(Ul.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),De.subscribeKey("profileName",e=>{this.profileName=e,e&&(this.error="You already own a name")}))}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){var e;super.disconnectedCallback(),this.usubscribe.forEach(t=>t()),(e=this.formRef.value)==null||e.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return ne` + +
+ + + ${this.submitButtonTemplate()} + +
+ ${this.templateSuggestions()} +
+ `}submitButtonTemplate(){return this.isAllowedToSubmit()?ne` + + + `:null}onSelectSuggestion(e){return()=>{this.name=e,this.registered=!1,this.requestUpdate()}}onNameInputChange(e){this.onDebouncedNameInputChange(e.detail)}nameSuggestionTagTemplate(){return this.loading?ne``:this.registered?ne`Registered`:ne`Available`}templateSuggestions(){if(!this.name||this.name.length<4||this.error)return null;const e=this.registered?this.suggestions.filter(t=>t.name!==this.name):[];return ne` + + + ${this.name}${this.nameSuggestionTagTemplate()} + + ${e.map(t=>this.availableNameTemplate(t.name))} + `}availableNameTemplate(e){return ne` + + ${e} + + Available + `}isAllowedToSubmit(){return!this.loading&&!this.registered&&!this.error&&!this.profileName&&Ul.validateName(this.name)}async onSubmitName(){try{if(!this.isAllowedToSubmit())return;It.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name}}),await Ul.registerName(this.name),It.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name}})}catch(e){Vt.showError(e.message),It.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name,error:(e==null?void 0:e.message)||"Unknown error"}})}}onEnterKey(e){e.key==="Enter"&&this.isAllowedToSubmit()&&this.onSubmitName()}};Bu.styles=Ude;a0([kt()],Bu.prototype,"errorMessage",void 0);a0([ge()],Bu.prototype,"name",void 0);a0([ge()],Bu.prototype,"error",void 0);a0([ge()],Bu.prototype,"loading",void 0);a0([ge()],Bu.prototype,"suggestions",void 0);a0([ge()],Bu.prototype,"registered",void 0);a0([ge()],Bu.prototype,"profileName",void 0);Bu=a0([Re("w3m-register-account-name-view")],Bu);const Zde=Dt` + .continue-button-container { + width: 100%; + } +`;var Yde=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 V9=class extends et{render(){return ne` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {ot.openHref(iI.URLS.FAQ,"_blank")}} + > + Learn more + + + + `}onboardingTemplate(){return ne` + + + + + + Account name chosen successfully + + + You can now fund your account and trade crypto + + + `}buttonsTemplate(){return ne` + Let's Go! + + `}redirectToAccount(){Te.replace("Account")}};V9.styles=Zde;V9=Yde([Re("w3m-register-account-name-success-view")],V9);const Qde=Dt` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-hexagon { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: 4px; + bottom: 0; + opacity: 0; + transform: scale(0.5); + z-index: 1; + } + + wui-button { + display: none; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + wui-button[data-retry='true'] { + display: block; + opacity: 1; + } +`,jI={onNetworkChange:async()=>{var r,e;if(bt.state.isSiweEnabled){const{SIWEController:t}=await lc(async()=>{const{SIWEController:n}=await import("./index-DvOqXmJq.js");return{SIWEController:n}},[]);(e=(r=t.state._client)==null?void 0:r.options)!=null&&e.signOutOnNetworkChange?await t.signOut():N9.navigateAfterNetworkSwitch()}else N9.navigateAfterNetworkSwitch()}};var HI=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 Ov=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.error?null:ne``} + + + + + + ${e} + ${t} + + + + + Try again + + + `}getSubLabel(){const e=en.getConnectedConnector();return Mt.getAuthConnector()&&e==="AUTH"?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){var n;const e=en.getConnectedConnector();return Mt.getAuthConnector()&&e==="AUTH"?`Switching to ${((n=this.network)==null?void 0:n.name)??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");t==null||t.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await it.switchActiveNetwork(this.network),await jI.onNetworkChange())}catch{this.error=!0}}};Ov.styles=Qde;HI([ge()],Ov.prototype,"showRetry",void 0);HI([ge()],Ov.prototype,"error",void 0);Ov=HI([Re("w3m-network-switch-view")],Ov);const Jde=Dt` + .container { + max-height: 360px; + overflow: auto; + } + + .container::-webkit-scrollbar { + display: none; + } +`;var Fy=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 Zp=class extends et{constructor(){super(),this.unsubscribe=[],this.network=it.state.caipNetwork,this.requestedCaipNetworks=it.getRequestedCaipNetworks(),this.search="",this.onDebouncedSearch=ot.debounce(e=>{this.search=e},100),this.unsubscribe.push(it.subscribeKey("caipNetwork",e=>this.network=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + ${this.templateSearchInput()} + + ${this.networksTemplate()} + + + + + + + Your connected wallet may not support some of the networks available for this dApp + + + + What is a network + + + `}templateSearchInput(){return ne` + + + + `}onInputChange(e){this.onDebouncedSearch(e.detail)}onNetworkHelp(){It.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),Te.push("WhatIsANetwork")}networksTemplate(){var s;const e=it.getRequestedCaipNetworks(),t=it.state.approvedCaipNetworkIds,n=it.state.supportsAllNetworks,i=ot.sortRequestedNetworks(t,e);return this.search?this.filteredNetworks=i==null?void 0:i.filter(o=>{var a;return(a=o==null?void 0:o.name)==null?void 0:a.toLowerCase().includes(this.search.toLowerCase())}):this.filteredNetworks=i,(s=this.filteredNetworks)==null?void 0:s.map(o=>{var a;return ne` + this.onSwitchNetwork(o)} + .disabled=${!n&&!(t!=null&&t.includes(o.id))&&o.chain===st.state.activeChain} + data-testid=${`w3m-network-switch-${o.name??o.id}`} + > + `})}async onSwitchNetwork(e){const t=De.state.isConnected,n=De.getChainIsConnected(e.chain),i=it.state.approvedCaipNetworkIds,s=it.state.supportsAllNetworks,o=it.state.caipNetwork,a=Te.state.data;if(t&&(o==null?void 0:o.id)!==e.id){if(!n){Te.push("SwitchActiveChain",{switchToChain:e.chain,navigateTo:"Connect",navigateWithReplace:!0});return}i!=null&&i.includes(e.id)?(await it.switchActiveNetwork(e),await jI.onNetworkChange()):s&&Te.push("SwitchNetwork",{...a,network:e})}else t||(it.setActiveCaipNetwork(e),n||Te.push("Connect"))}};Zp.styles=Jde;Fy([ge()],Zp.prototype,"network",void 0);Fy([ge()],Zp.prototype,"requestedCaipNetworks",void 0);Fy([ge()],Zp.prototype,"filteredNetworks",void 0);Fy([ge()],Zp.prototype,"search",void 0);Zp=Fy([Re("w3m-networks-view")],Zp);const Xde=Dt` + :host > wui-flex { + height: 500px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + padding: var(--wui-spacing-m); + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: flex-start; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } + + :host > wui-flex > wui-flex { + width: 100%; + } + + wui-transaction-list-item-loader { + width: 100%; + } +`;var jy=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};const efe=7;let Yp=class extends et{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=on.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=Pi.state.coinbaseTransactions,this.tokenImages=Jn.state.tokenImages,this.unsubscribe.push(on.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}),Jn.subscribeKey("tokenImages",e=>this.tokenImages=e),()=>{clearTimeout(this.refetchTimeout)},Pi.subscribe(e=>{this.coinbaseTransactions={...e.coinbaseTransactions}})),Pi.clearCursor(),this.fetchTransactions()}render(){return ne` + + ${this.loading?this.templateLoading():this.templateTransactionsByYear()} + + `}templateTransactions(e){return e==null?void 0:e.map(t=>{var a,c,l;const n=nI.formatDate((a=t==null?void 0:t.metadata)==null?void 0:a.minedAt),i=t.transfers[0],s=i==null?void 0:i.fungible_info;if(!s)return null;const o=((c=s==null?void 0:s.icon)==null?void 0:c.url)||((l=this.tokenImages)==null?void 0:l[s.symbol||""]);return ne` + + `})}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map(t=>{const n=parseInt(t,10);return new Array(12).fill(null).map((s,o)=>o).reverse().map(s=>{var c;const o=K0.getTransactionGroupTitle(n,s),a=(c=this.coinbaseTransactions[n])==null?void 0:c[s];return a?ne` + + + ${o} + + + ${this.templateTransactions(a)} + + + `:null})})}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){const e=De.state.address,t=bt.state.projectId;if(!e)throw new Error("No address found");if(!t)throw new Error("No projectId found");this.loading=!0,await Pi.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){var i;const e=new Date;if((((i=this.coinbaseTransactions[e.getFullYear()])==null?void 0:i[e.getMonth()])||[]).filter(s=>s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length===0){clearTimeout(this.refetchTimeout);return}this.refetchTimeout=setTimeout(async()=>{const s=De.state.address;await Pi.fetchTransactions(s,"coinbase"),this.refetchLoadingTransactions()},3e3)}templateLoading(){return Array(efe).fill(ne` `).map(e=>e)}};Yp.styles=Xde;jy([ge()],Yp.prototype,"selectedOnRampProvider",void 0);jy([ge()],Yp.prototype,"loading",void 0);jy([ge()],Yp.prototype,"coinbaseTransactions",void 0);jy([ge()],Yp.prototype,"tokenImages",void 0);Yp=jy([Re("w3m-onramp-activity-view")],Yp);const tfe=Dt` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-grid::-webkit-scrollbar { + display: none; + } +`;var S_=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 xw=class extends et{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=on.state.paymentCurrency,this.currencies=on.state.paymentCurrencies,this.currencyImages=Jn.state.currencyImages,this.unsubscribe.push(on.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),Jn.subscribeKey("currencyImages",e=>this.currencyImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + ${this.currenciesTemplate()} + + + `}currenciesTemplate(){return this.currencies.map(e=>{var t;return ne` + this.selectCurrency(e)} + variant="image" + > + ${e.id} + + `})}selectCurrency(e){e&&(on.setPaymentCurrency(e),nr.close())}};xw.styles=tfe;S_([ge()],xw.prototype,"selectedCurrency",void 0);S_([ge()],xw.prototype,"currencies",void 0);S_([ge()],xw.prototype,"currencyImages",void 0);xw=S_([Re("w3m-onramp-fiat-select-view")],xw);var nj=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 q9=class extends et{constructor(){super(),this.unsubscribe=[],this.providers=on.state.providers,this.unsubscribe.push(on.subscribeKey("providers",e=>{this.providers=e}))}firstUpdated(){const e=this.providers.map(async t=>t.name==="coinbase"?await this.getCoinbaseOnRampURL():Promise.resolve(t==null?void 0:t.url));Promise.all(e).then(t=>{this.providers=this.providers.map((n,i)=>({...n,url:t[i]||""}))})}render(){return ne` + + ${this.onRampProvidersTemplate()} + + + `}onRampProvidersTemplate(){return this.providers.map(e=>ne` + {this.onClickProvider(e)}} + ?disabled=${!e.url} + > + `)}onClickProvider(e){on.setSelectedProvider(e),Te.push("BuyInProgress"),ot.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes"),It.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}})}async getCoinbaseOnRampURL(){const e=De.state.address,t=it.state.caipNetwork;if(!e)throw new Error("No address found");if(!(t!=null&&t.name))throw new Error("No network found");const n=Ci.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[t.name]??Ci.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=on.state.purchaseCurrency,s=i?[i.symbol]:on.state.purchaseCurrencies.map(o=>o.symbol);return await Hn.generateOnRampURL({defaultNetwork:n,destinationWallets:[{address:e,blockchains:Ci.WC_COINBASE_PAY_SDK_CHAINS,assets:s}],partnerUserId:e,purchaseAmount:on.state.purchaseAmount})}};nj([ge()],q9.prototype,"providers",void 0);q9=nj([Re("w3m-onramp-providers-view")],q9);const rfe=Dt` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-grid::-webkit-scrollbar { + display: none; + } +`;var I_=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 Aw=class extends et{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=on.state.purchaseCurrencies,this.tokens=on.state.purchaseCurrencies,this.tokenImages=Jn.state.tokenImages,this.unsubscribe.push(on.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),Jn.subscribeKey("tokenImages",e=>this.tokenImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + ${this.currenciesTemplate()} + + + `}currenciesTemplate(){return this.tokens.map(e=>{var t;return ne` + this.selectToken(e)} + variant="image" + > + + ${e.name} + ${e.symbol} + + + `})}selectToken(e){e&&(on.setPurchaseCurrency(e),nr.close())}};Aw.styles=rfe;I_([ge()],Aw.prototype,"selectedCurrency",void 0);I_([ge()],Aw.prototype,"tokens",void 0);I_([ge()],Aw.prototype,"tokenImages",void 0);Aw=I_([Re("w3m-onramp-token-select-view")],Aw);const nfe=Dt` + :host > wui-flex:first-child { + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + wui-loading-hexagon { + position: absolute; + } + + .action-button { + width: 100%; + border-radius: var(--wui-border-radius-xs); + } + + .action-button:disabled { + border-color: 1px solid var(--wui-color-gray-glass-005); + } + + .swap-inputs-container { + position: relative; + } + + .replace-tokens-button-container { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + gap: var(--wui-spacing-1xs); + border-radius: var(--wui-border-radius-xs); + background-color: var(--wui-color-modal-bg-base); + padding: var(--wui-spacing-xxs); + } + + .replace-tokens-button-container > button { + display: flex; + justify-content: center; + align-items: center; + height: 40px; + width: 40px; + padding: var(--wui-spacing-xs); + border: none; + border-radius: var(--wui-border-radius-xxs); + background: var(--wui-color-gray-glass-002); + transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1); + will-change: background-color; + z-index: 20; + } + + .replace-tokens-button-container > button:hover { + background: var(--wui-color-gray-glass-005); + } + + .details-container > wui-flex { + background: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xxs); + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + transition: background 0.2s linear; + } + + .details-container > wui-flex > button:hover { + background: var(--wui-color-gray-glass-002); + } + + .details-content-container { + padding: var(--wui-spacing-1xs); + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: var(--wui-spacing-s) var(--wui-spacing-xl); + border-radius: var(--wui-border-radius-xxs); + background: var(--wui-color-gray-glass-002); + } +`;var ds=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 Mi=class extends et{constructor(){var e;super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=(e=it.state.caipNetwork)==null?void 0:e.id,this.initialized=yt.state.initialized,this.loadingQuote=yt.state.loadingQuote,this.loadingPrices=yt.state.loadingPrices,this.loadingTransaction=yt.state.loadingTransaction,this.sourceToken=yt.state.sourceToken,this.sourceTokenAmount=yt.state.sourceTokenAmount,this.sourceTokenPriceInUSD=yt.state.sourceTokenPriceInUSD,this.toToken=yt.state.toToken,this.toTokenAmount=yt.state.toTokenAmount,this.toTokenPriceInUSD=yt.state.toTokenPriceInUSD,this.inputError=yt.state.inputError,this.gasPriceInUSD=yt.state.gasPriceInUSD,this.fetchError=yt.state.fetchError,this.onDebouncedGetSwapCalldata=ot.debounce(async()=>{await yt.swapTokens()},200),it.subscribeKey("caipNetwork",t=>{this.caipNetworkId!==(t==null?void 0:t.id)&&(this.caipNetworkId=t==null?void 0:t.id,yt.resetState(),yt.initializeState())}),this.unsubscribe.push(nr.subscribeKey("open",t=>{t||yt.resetState()}),Te.subscribeKey("view",t=>{t.includes("Swap")||yt.resetValues()}),yt.subscribe(t=>{this.initialized=t.initialized,this.loadingQuote=t.loadingQuote,this.loadingPrices=t.loadingPrices,this.loadingTransaction=t.loadingTransaction,this.sourceToken=t.sourceToken,this.sourceTokenAmount=t.sourceTokenAmount,this.sourceTokenPriceInUSD=t.sourceTokenPriceInUSD,this.toToken=t.toToken,this.toTokenAmount=t.toTokenAmount,this.toTokenPriceInUSD=t.toTokenPriceInUSD,this.inputError=t.inputError,this.gasPriceInUSD=t.gasPriceInUSD,this.fetchError=t.fetchError}))}firstUpdated(){yt.initializeState(),this.watchTokensAndValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return ne` + + ${this.initialized?this.templateSwap():this.templateLoading()} + + `}watchTokensAndValues(){this.interval=setInterval(()=>{yt.getNetworkTokenPrice(),yt.getMyTokensWithBalance(),yt.swapTokens()},1e4)}templateSwap(){return ne` + + + ${this.templateTokenInput("sourceToken",this.sourceToken)} + ${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()} + + ${this.templateDetails()} ${this.templateActionButton()} + + `}actionButtonLabel(){return this.fetchError?"Swap":!this.sourceToken||!this.toToken?"Select token":this.sourceTokenAmount?this.inputError?this.inputError:"Review swap":"Enter amount"}templateReplaceTokensButton(){return ne` + + + + `}templateLoading(){return ne` + + + + + ${this.templateReplaceTokensButton()} + + ${this.templateActionButton()} + + `}templateTokenInput(e,t){var a,c;const n=(a=yt.state.myTokensWithBalance)==null?void 0:a.find(l=>(l==null?void 0:l.address)===(t==null?void 0:t.address)),i=e==="toToken"?this.toTokenAmount:this.sourceTokenAmount,s=e==="toToken"?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD;let o=parseFloat(i)*s;return e==="toToken"&&(o-=this.gasPriceInUSD||0),ne``}onSetMaxValue(e,t){const n=e==="sourceToken"?this.sourceToken:this.toToken,i=(n==null?void 0:n.address)===Ci.NATIVE_TOKEN_ADDRESS;let s="0";if(!t){s="0",this.handleChangeAmount(e,s);return}if(!this.gasPriceInUSD){s=t,this.handleChangeAmount(e,s);return}const o=qr.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),a=i?qr.bigNumber(t).minus(o):qr.bigNumber(t);this.handleChangeAmount(e,a.isGreaterThan(0)?a.toFixed(20):"0")}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:ne``}handleChangeAmount(e,t){yt.clearError(),e==="sourceToken"?yt.setSourceTokenAmount(t):yt.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,t=!this.sourceTokenAmount,n=this.loadingQuote||this.loadingPrices||this.loadingTransaction,i=n||e||t||this.inputError;return ne` + + ${this.actionButtonLabel()} + + `}onSwitchTokens(){yt.switchTokens()}onSwapPreview(){var e,t;if(this.fetchError){yt.swapTokens();return}It.sendEvent({type:"track",event:"INITIATE_SWAP",properties:{network:this.caipNetworkId||"",swapFromToken:((e=this.sourceToken)==null?void 0:e.symbol)||"",swapToToken:((t=this.toToken)==null?void 0:t.symbol)||"",swapFromAmount:this.sourceTokenAmount||"",swapToAmount:this.toTokenAmount||"",isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("SwapPreview")}};Mi.styles=nfe;ds([ge()],Mi.prototype,"interval",void 0);ds([ge()],Mi.prototype,"detailsOpen",void 0);ds([ge()],Mi.prototype,"caipNetworkId",void 0);ds([ge()],Mi.prototype,"initialized",void 0);ds([ge()],Mi.prototype,"loadingQuote",void 0);ds([ge()],Mi.prototype,"loadingPrices",void 0);ds([ge()],Mi.prototype,"loadingTransaction",void 0);ds([ge()],Mi.prototype,"sourceToken",void 0);ds([ge()],Mi.prototype,"sourceTokenAmount",void 0);ds([ge()],Mi.prototype,"sourceTokenPriceInUSD",void 0);ds([ge()],Mi.prototype,"toToken",void 0);ds([ge()],Mi.prototype,"toTokenAmount",void 0);ds([ge()],Mi.prototype,"toTokenPriceInUSD",void 0);ds([ge()],Mi.prototype,"inputError",void 0);ds([ge()],Mi.prototype,"gasPriceInUSD",void 0);ds([ge()],Mi.prototype,"fetchError",void 0);Mi=ds([Re("w3m-swap-view")],Mi);const ife=Dt` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-visual { + width: var(--wui-wallet-image-size-lg); + height: var(--wui-wallet-image-size-lg); + border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); + position: relative; + overflow: hidden; + } + + wui-visual::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + inset: 0; + border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs)); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity var(--wui-ease-out-power-2) var(--wui-duration-lg), + transform var(--wui-ease-out-power-2) var(--wui-duration-lg); + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px var(--wui-spacing-l); + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + wui-link { + padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs); + } +`;var ij=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 j6=class extends et{constructor(){var e,t,n;super(...arguments),this.unsubscribe=[],this.switchToChain=(e=Te.state.data)==null?void 0:e.switchToChain,this.navigateTo=(t=Te.state.data)==null?void 0:t.navigateTo,this.navigateWithReplace=(n=Te.state.data)==null?void 0:n.navigateWithReplace,this.activeChain=st.state.activeChain}firstUpdated(){this.unsubscribe.push(st.subscribeKey("activeChain",e=>this.activeChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.activeChain?vn.CHAIN_NAME_MAP[this.activeChain]:"current",t=this.switchToChain?vn.CHAIN_NAME_MAP[this.switchToChain]:"supported";return ne` + + + + Switch to EVM + + This feature is not supported on the ${e} chain. Switch to + ${t} chain to proceed using it. + + Switch + + + `}switchActiveChain(){this.switchToChain&&(st.setActiveChain(this.switchToChain),this.navigateTo?this.navigateWithReplace?Te.replace(this.navigateTo):Te.push(this.navigateTo):Te.goBack())}};j6.styles=ife;ij([kt()],j6.prototype,"activeChain",void 0);j6=ij([Re("w3m-switch-active-chain-view")],j6);const sfe=Dt` + :host > wui-flex:first-child { + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + .preview-container, + .details-container { + width: 100%; + } + + .token-image { + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + border-radius: 12px; + } + + wui-loading-hexagon { + position: absolute; + } + + .token-item { + display: flex; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-xxs); + padding: var(--wui-spacing-xs); + height: 40px; + border: none; + border-radius: 80px; + background: var(--wui-color-gray-glass-002); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + cursor: pointer; + transition: background 0.2s linear; + } + + .token-item:hover { + background: var(--wui-color-gray-glass-005); + } + + .preview-token-details-container { + width: 100%; + } + + .details-row { + width: 100%; + padding: var(--wui-spacing-s) var(--wui-spacing-xl); + border-radius: var(--wui-border-radius-xxs); + background: var(--wui-color-gray-glass-002); + } + + .action-buttons-container { + width: 100%; + gap: var(--wui-spacing-xs); + } + + .action-buttons-container > button { + display: flex; + align-items: center; + justify-content: center; + background: transparent; + height: 48px; + border-radius: var(--wui-border-radius-xs); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } + + .action-buttons-container > button:disabled { + opacity: 0.8; + cursor: not-allowed; + } + + .action-button > wui-loading-spinner { + display: inline-block; + } + + .cancel-button:hover, + .action-button:hover { + cursor: pointer; + } + + .action-buttons-container > wui-button.cancel-button { + flex: 2; + } + + .action-buttons-container > wui-button.action-button { + flex: 4; + } + + .action-buttons-container > button.action-button > wui-text { + color: white; + } + + .details-container > wui-flex { + background: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xxs); + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + transition: background 0.2s linear; + } + + .details-container > wui-flex > button:hover { + background: var(--wui-color-gray-glass-002); + } + + .details-content-container { + padding: var(--wui-spacing-1xs); + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: var(--wui-spacing-s) var(--wui-spacing-xl); + border-radius: var(--wui-border-radius-xxs); + background: var(--wui-color-gray-glass-002); + } +`;var Di=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 yi=class extends et{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=yt.state.approvalTransaction,this.swapTransaction=yt.state.swapTransaction,this.sourceToken=yt.state.sourceToken,this.sourceTokenAmount=yt.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=yt.state.sourceTokenPriceInUSD,this.toToken=yt.state.toToken,this.toTokenAmount=yt.state.toTokenAmount??"",this.toTokenPriceInUSD=yt.state.toTokenPriceInUSD,this.caipNetwork=it.state.caipNetwork,this.balanceSymbol=De.state.balanceSymbol,this.gasPriceInUSD=yt.state.gasPriceInUSD,this.inputError=yt.state.inputError,this.loadingQuote=yt.state.loadingQuote,this.loadingApprovalTransaction=yt.state.loadingApprovalTransaction,this.loadingBuildTransaction=yt.state.loadingBuildTransaction,this.loadingTransaction=yt.state.loadingTransaction,this.unsubscribe.push(De.subscribeKey("balanceSymbol",e=>{this.balanceSymbol!==e&&Te.goBack()}),it.subscribeKey("caipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),yt.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.swapTransaction=e.swapTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.inputError=e.inputError,e.inputError&&Te.goBack(),this.loadingQuote=e.loadingQuote,this.loadingApprovalTransaction=e.loadingApprovalTransaction,this.loadingBuildTransaction=e.loadingBuildTransaction,this.loadingTransaction=e.loadingTransaction}))}firstUpdated(){yt.getTransaction(),this.refreshTransaction()}disconnectedCallback(){this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return ne` + + ${this.templateSwap()} + + `}refreshTransaction(){this.interval=setInterval(()=>{yt.getApprovalLoadingState()||yt.getTransaction()},1e4)}templateSwap(){var c,l,h,f;const e=`${Qt.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${(c=this.sourceToken)==null?void 0:c.symbol}`,t=`${Qt.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${(l=this.toToken)==null?void 0:l.symbol}`,n=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,i=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),s=Qt.formatNumberToLocalString(n),o=Qt.formatNumberToLocalString(i),a=this.loadingQuote||this.loadingBuildTransaction||this.loadingTransaction||this.loadingApprovalTransaction;return ne` + + + + + Send + $${s} + + + + + + + + Receive + $${o} + + + + + + + ${this.templateDetails()} + + + + Review transaction carefully + + + + + Cancel + + + + ${this.actionButtonLabel()} + + + + + `}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:ne``}actionButtonLabel(){return this.loadingApprovalTransaction?"Approving...":this.approvalTransaction?"Approve":"Swap"}onCancelTransaction(){Te.goBack()}onSendTransaction(){this.approvalTransaction?yt.sendTransactionForApproval(this.approvalTransaction):yt.sendTransactionForSwap(this.swapTransaction)}};yi.styles=sfe;Di([ge()],yi.prototype,"interval",void 0);Di([ge()],yi.prototype,"detailsOpen",void 0);Di([ge()],yi.prototype,"approvalTransaction",void 0);Di([ge()],yi.prototype,"swapTransaction",void 0);Di([ge()],yi.prototype,"sourceToken",void 0);Di([ge()],yi.prototype,"sourceTokenAmount",void 0);Di([ge()],yi.prototype,"sourceTokenPriceInUSD",void 0);Di([ge()],yi.prototype,"toToken",void 0);Di([ge()],yi.prototype,"toTokenAmount",void 0);Di([ge()],yi.prototype,"toTokenPriceInUSD",void 0);Di([ge()],yi.prototype,"caipNetwork",void 0);Di([ge()],yi.prototype,"balanceSymbol",void 0);Di([ge()],yi.prototype,"gasPriceInUSD",void 0);Di([ge()],yi.prototype,"inputError",void 0);Di([ge()],yi.prototype,"loadingQuote",void 0);Di([ge()],yi.prototype,"loadingApprovalTransaction",void 0);Di([ge()],yi.prototype,"loadingBuildTransaction",void 0);Di([ge()],yi.prototype,"loadingTransaction",void 0);yi=Di([Re("w3m-swap-preview-view")],yi);const ofe=Dt` + :host { + --tokens-scroll--top-opacity: 0; + --tokens-scroll--bottom-opacity: 1; + --suggested-tokens-scroll--left-opacity: 0; + --suggested-tokens-scroll--right-opacity: 1; + } + + :host > wui-flex:first-child { + overflow-y: hidden; + overflow-x: hidden; + scrollbar-width: none; + scrollbar-height: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + wui-loading-hexagon { + position: absolute; + } + + .suggested-tokens-container { + overflow-x: auto; + mask-image: linear-gradient( + to right, + rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px, + black 50px, + black 90px, + black calc(100% - 90px), + black calc(100% - 50px), + rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100% + ); + } + + .suggested-tokens-container::-webkit-scrollbar { + display: none; + } + + .tokens-container { + border-top: 1px solid var(--wui-color-gray-glass-005); + height: 100%; + max-height: 390px; + } + + .tokens { + width: 100%; + overflow-y: auto; + mask-image: linear-gradient( + to bottom, + rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px, + black 50px, + black 90px, + black calc(100% - 90px), + black calc(100% - 50px), + rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100% + ); + } + + .network-search-input, + .select-network-button { + height: 40px; + } + + .select-network-button { + border: none; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-xs); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + background-color: transparent; + border-radius: var(--wui-border-radius-xxs); + padding: var(--wui-spacing-xs); + align-items: center; + transition: background-color 0.2s linear; + } + + .select-network-button:hover { + background-color: var(--wui-color-gray-glass-002); + } + + .select-network-button > wui-image { + width: 26px; + height: 26px; + border-radius: var(--wui-border-radius-xs); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010); + } +`;var Ed=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 gl=class extends et{constructor(){var e;super(),this.unsubscribe=[],this.targetToken=(e=Te.state.data)==null?void 0:e.target,this.sourceToken=yt.state.sourceToken,this.sourceTokenAmount=yt.state.sourceTokenAmount,this.toToken=yt.state.toToken,this.myTokensWithBalance=yt.state.myTokensWithBalance,this.popularTokens=yt.state.popularTokens,this.searchValue="",this.unsubscribe.push(yt.subscribe(t=>{this.sourceToken=t.sourceToken,this.toToken=t.toToken,this.myTokensWithBalance=t.myTokensWithBalance}))}updated(){var n,i;const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container");e==null||e.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));const t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");t==null||t.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){var n,i;super.disconnectedCallback();const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container"),t=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");e==null||e.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t==null||t.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return ne` + + ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()} + + `}onSelectToken(e){this.targetToken==="sourceToken"?yt.setSourceToken(e):(yt.setToToken(e),this.sourceToken&&this.sourceTokenAmount&&yt.swapTokens()),Te.goBack()}templateSearchInput(){return ne` + + + + `}templateTokens(){const e=this.myTokensWithBalance?Object.values(this.myTokensWithBalance):[],t=this.popularTokens?this.popularTokens:[],n=this.filterTokensWithText(e,this.searchValue),i=this.filterTokensWithText(t,this.searchValue);return ne` + + + ${(n==null?void 0:n.length)>0?ne` + + Your tokens + + ${n.map(s=>{var a,c,l;const o=s.symbol===((a=this.sourceToken)==null?void 0:a.symbol)||s.symbol===((c=this.toToken)==null?void 0:c.symbol);return ne` + {o||this.onSelectToken(s)}} + > + + `})} + `:null} + + + Tokens + + ${(i==null?void 0:i.length)>0?i.map(s=>ne` + this.onSelectToken(s)} + > + + `):null} + + + `}templateSuggestedTokens(){const e=yt.state.suggestedTokens?yt.state.suggestedTokens.slice(0,8):null;return e?ne` + + ${e.map(t=>ne` + this.onSelectToken(t)} + > + + `)} + + `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",U5.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",U5.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",U5.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",U5.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter(n=>`${n.symbol} ${n.name} ${n.address}`.toLowerCase().includes(t.toLowerCase()))}};gl.styles=ofe;Ed([ge()],gl.prototype,"interval",void 0);Ed([ge()],gl.prototype,"targetToken",void 0);Ed([ge()],gl.prototype,"sourceToken",void 0);Ed([ge()],gl.prototype,"sourceTokenAmount",void 0);Ed([ge()],gl.prototype,"toToken",void 0);Ed([ge()],gl.prototype,"myTokensWithBalance",void 0);Ed([ge()],gl.prototype,"popularTokens",void 0);Ed([ge()],gl.prototype,"searchValue",void 0);gl=Ed([Re("w3m-swap-select-token-view")],gl);const afe=Dt` + :host > wui-flex:first-child { + height: 500px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } +`;var cfe=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 K9=class extends et{render(){return ne` + + + + `}};K9.styles=afe;K9=cfe([Re("w3m-transactions-view")],K9);var lfe=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};const ufe=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let rO=class extends et{render(){return ne` + + + {ot.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} + > + Learn more + + + + `}};rO=lfe([Re("w3m-what-is-a-network-view")],rO);var hfe=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};const dfe=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let nO=class extends et{render(){return ne` + + + + + Get a wallet + + + `}onGetWallet(){It.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),Te.push("GetWallet")}};nO=hfe([Re("w3m-what-is-a-wallet-view")],nO);var ffe=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 iO=class extends et{render(){return ne` + + + + + Quickly and easily buy digital assets! + + + Simply select your preferred onramp provider and add digital assets to your account + using your credit card or bank transfer + + + + + Buy + + + `}};iO=ffe([Re("w3m-what-is-a-buy-view")],iO);const pfe=Dt` + wui-loading-spinner { + margin: 9px auto; + } + + .email-display, + .email-display wui-text { + max-width: 100%; + } +`;var T_=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};const gfe=6;let fd=class extends et{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){var e;super(),this.loading=!1,this.timeoutTimeLeft=Ys.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=(e=Te.state.data)==null?void 0:e.email,this.authConnector=Mt.getAuthConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return ne` + + + + The code expires in 20 minutes + + ${this.loading?ne``:ne` + + ${this.error?ne` + + ${this.error}. Try Again + + `:null} + `} + + + ${t.title} + + ${t.action} + + + + `}startOTPTimeout(){this.timeoutTimeLeft=Ys.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=Ys.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){var t;try{this.loading||(this.otp=e.detail,this.authConnector&&this.otp.length===gfe&&(this.loading=!0,await((t=this.onOtpSubmit)==null?void 0:t.call(this,this.otp))))}catch(n){this.error=ot.parseError(n),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!Mt.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),Vt.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){Vt.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}};fd.styles=pfe;T_([ge()],fd.prototype,"loading",void 0);T_([ge()],fd.prototype,"timeoutTimeLeft",void 0);T_([ge()],fd.prototype,"error",void 0);fd=T_([Re("w3m-email-otp-widget")],fd);var sj=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 G9=class extends fd{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=De.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.authConnector){const t=it.checkIfSmartAccountEnabled();await this.authConnector.provider.connectOtp({otp:e}),It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await or.connectExternal(this.authConnector,this.authConnector.chain),It.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.authConnector.name||"Unknown"}}),De.state.allAccounts.length>1?Te.push("SelectAddresses"):t&&!this.smartAccountDeployed?Te.push("UpgradeToSmartAccount"):nr.close()}}catch(t){throw It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),t}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(De.subscribeKey("smartAccountDeployed",e=>{this.smartAccountDeployed=e}))}};sj([ge()],G9.prototype,"smartAccountDeployed",void 0);G9=sj([Re("w3m-email-verify-otp-view")],G9);const mfe=Dt` + wui-icon-box { + height: var(--wui-icon-box-size-xl); + width: var(--wui-icon-box-size-xl); + } +`;var oj=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 H6=class extends et{constructor(){var e;super(),this.email=(e=Te.state.data)==null?void 0:e.email,this.authConnector=Mt.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return ne` + + + + + + + Approve the login link we sent to + + ${this.email} + + + + The code expires in 20 minutes + + + + + Didn't receive it? + + + Resend email + + + + + `}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),It.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),Te.replace("EmailVerifyOtp",{email:this.email})}catch{Te.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),Vt.showSuccess("Code email resent")}}catch(e){Vt.showError(e)}finally{this.loading=!1}}};H6.styles=mfe;oj([ge()],H6.prototype,"loading",void 0);H6=oj([Re("w3m-email-verify-device-view")],H6);const wfe=Dt` + div { + width: 100%; + height: 400px; + } + + [data-ready='false'] { + transform: scale(1.05); + } + + @media (max-width: 430px) { + [data-ready='false'] { + transform: translateY(-50px); + } + } +`;var aj=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};const sO=400,oO=360,vfe=64;let W6=class extends et{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(nr.subscribeKey("open",e=>{e||(this.onHideIframe(),Te.popTransactionStack())}),nr.subscribeKey("shake",e=>{e?this.iframe.style.animation="w3m-shake 500ms var(--wui-ease-out-power-2)":this.iframe.style.animation="none"}))}disconnectedCallback(){var e;this.onHideIframe(),this.unsubscribe.forEach(t=>t()),(e=this.bodyObserver)==null||e.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver(e=>{var i,s;const t=(i=e==null?void 0:e[0])==null?void 0:i.contentBoxSize,n=(s=t==null?void 0:t[0])==null?void 0:s.inlineSize;this.iframe.style.height=`${sO}px`,n&&n<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width=`${oO}px`,this.iframe.style.left=`calc(50% - ${oO/2}px)`,this.iframe.style.top=`calc(50% - ${sO/2}px + ${vfe/2}px)`,this.iframe.style.bottom="unset"),this.ready=!0,this.onShowIframe()}),this.bodyObserver.observe(window.document.body)}render(){return ne`
`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.style.animation=e?"w3m-iframe-zoom-in-mobile 200ms var(--wui-ease-out-power-2)":"w3m-iframe-zoom-in 200ms var(--wui-ease-out-power-2)"}onHideIframe(){this.iframe.style.display="none",this.iframe.style.animation="w3m-iframe-fade-out 200ms var(--wui-ease-out-power-2)"}async syncTheme(){const e=Mt.getAuthConnector();if(e){const t=ii.getSnapshot().themeMode,n=ii.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:n,w3mThemeVariables:Rf(n,t)})}}};W6.styles=wfe;aj([ge()],W6.prototype,"ready",void 0);W6=aj([Re("w3m-approve-transaction-view")],W6);var yfe=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 aO=class extends et{render(){return ne` + + Follow the instructions on + + + + You will have to reconnect for security reasons + + + `}};aO=yfe([Re("w3m-upgrade-wallet-view")],aO);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 z6=class extends et{constructor(){super(...arguments),this.authConnector=Mt.getAuthConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.authConnector)try{this.loading=!0,await or.setPreferredAccountType(_r.ACCOUNT_TYPES.SMART_ACCOUNT),this.loading=!1,N9.navigateAfterPreferredAccountTypeSelect()}catch{Vt.showError("Error upgrading to smart account")}}}render(){return ne` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {ot.openHref(iI.URLS.FAQ,"_blank")}} + > + Learn more + + + + `}onboardingTemplate(){return ne` + + + + + + + + Discover Smart Accounts + + + Access advanced features such as username, social login, improved security and a smoother + user experience! + + + `}buttonsTemplate(){return ne` + + Do it later + + Continue + + `}redirectToAccount(){Te.push("Account")}};WI([ge()],z6.prototype,"authConnector",void 0);WI([ge()],z6.prototype,"loading",void 0);z6=WI([Re("w3m-upgrade-to-smart-account-view")],z6);const bfe=Dt` + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + } +`;var zI=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(...arguments),this.formRef=Nv(),this.initialEmail=((e=Te.state.data)==null?void 0:e.email)??"",this.email="",this.loading=!1}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return ne` + +
+ + + +
+ + + + Cancel + + + + Save + + +
+ `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const t=Mt.getAuthConnector();if(!t)throw new Error("w3m-update-email-wallet: Auth connector not found");const n=await t.provider.updateEmail({email:this.email});It.sendEvent({type:"track",event:"EMAIL_EDIT"}),n.action==="VERIFY_SECONDARY_OTP"?Te.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):Te.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(t){Vt.showError(t),this.loading=!1}}};Mv.styles=bfe;zI([ge()],Mv.prototype,"email",void 0);zI([ge()],Mv.prototype,"loading",void 0);Mv=zI([Re("w3m-update-email-wallet-view")],Mv);var _fe=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 cO=class extends fd{constructor(){var e;super(),this.email=(e=Te.state.data)==null?void 0:e.email,this.onOtpSubmit=async t=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:t}),It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),Te.replace("UpdateEmailSecondaryOtp",Te.state.data))}catch(n){throw It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{Te.replace("UpdateEmailWallet",Te.state.data)}}};cO=_fe([Re("w3m-update-email-primary-otp-view")],cO);var xfe=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 lO=class extends fd{constructor(){var e;super(),this.email=(e=Te.state.data)==null?void 0:e.newEmail,this.onOtpSubmit=async t=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:t}),It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),Te.reset("Account"))}catch(n){throw It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onStartOver=()=>{Te.replace("UpdateEmailWallet",Te.state.data)}}};lO=xfe([Re("w3m-update-email-secondary-otp-view")],lO);const Afe=Dt` + :host > wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } +`;var cj=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 V6=class extends et{constructor(){var e;super(...arguments),this.swapUnsupportedChain=(e=Te.state.data)==null?void 0:e.swapUnsupportedChain,this.disconecting=!1}render(){return ne` + + + ${this.descriptionTemplate()} + + + + ${this.networksTemplate()} + + + + + + Disconnect + + + + `}descriptionTemplate(){return this.swapUnsupportedChain?ne` + + The swap feature doesn’t support your current network. Switch to an available option to + continue. + + `:ne` + + This app doesn’t support your current network. Switch to an available option to continue. + + `}networksTemplate(){const e=it.getRequestedCaipNetworks(),t=it.state.approvedCaipNetworkIds,n=ot.sortRequestedNetworks(t,e);return(this.swapUnsupportedChain?n.filter(s=>Ci.SWAP_SUPPORTED_NETWORKS.includes(s.id)):n).map(s=>ne` + this.onSwitchNetwork(s)} + > + + `)}async onDisconnect(){try{this.disconecting=!0,await or.disconnect(),It.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),nr.close()}catch{It.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Vt.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){const t=De.state.isConnected,n=it.state.approvedCaipNetworkIds,i=it.state.supportsAllNetworks,s=it.state.caipNetwork,o=Te.state.data;t&&(s==null?void 0:s.id)!==e.id?n!=null&&n.includes(e.id)?(await it.switchActiveNetwork(e),await jI.onNetworkChange()):i&&Te.push("SwitchNetwork",{...o,network:e}):t||(it.setActiveCaipNetwork(e),Te.push("Connect"))}};V6.styles=Afe;cj([ge()],V6.prototype,"disconecting",void 0);V6=cj([Re("w3m-unsupported-chain-view")],V6);const Efe=Dt` + wui-compatible-network { + margin-top: var(--wui-spacing-l); + } +`;var Hy=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 Qp=class extends et{constructor(){super(),this.unsubscribe=[],this.address=De.state.address,this.profileName=De.state.profileName,this.network=it.state.caipNetwork,this.preferredAccountType=De.state.preferredAccountType,this.unsubscribe.push(De.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Vt.showError("Account not found")}),it.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=Lr.getNetworkImage(this.network);return ne` + + + + + Copy your address or scan this QR code + + + ${this.networkTemplate()} + `}networkTemplate(){var o;const e=it.getRequestedCaipNetworks(),t=it.checkIfSmartAccountEnabled(),n=it.state.caipNetwork;if(this.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return n?ne``:null;const s=((o=e==null?void 0:e.filter(a=>a==null?void 0:a.imageId))==null?void 0:o.slice(0,5)).map(Lr.getNetworkImage).filter(Boolean);return ne``}onReceiveClick(){Te.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(ot.copyToClopboard(this.address),Vt.showSuccess("Address copied"))}catch{Vt.showError("Failed to copy")}}};Qp.styles=Efe;Hy([ge()],Qp.prototype,"address",void 0);Hy([ge()],Qp.prototype,"profileName",void 0);Hy([ge()],Qp.prototype,"network",void 0);Hy([ge()],Qp.prototype,"preferredAccountType",void 0);Qp=Hy([Re("w3m-wallet-receive-view")],Qp);const Cfe=Dt` + :host > wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } +`;var lj=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 q6=class extends et{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=De.state.preferredAccountType,this.unsubscribe.push(De.subscribeKey("preferredAccountType",e=>{this.preferredAccountType=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + ${this.networkTemplate()} + `}networkTemplate(){const e=it.getRequestedCaipNetworks(),t=it.state.approvedCaipNetworkIds,n=it.state.caipNetwork,i=it.checkIfSmartAccountEnabled();let s=ot.sortRequestedNetworks(t,e);if(i&&this.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT){if(!n)return null;s=[n]}return s.map(o=>ne` + + + `)}};q6.styles=Cfe;lj([ge()],q6.prototype,"preferredAccountType",void 0);q6=lj([Re("w3m-wallet-compatible-networks-view")],q6);const Sfe=Dt` + :host { + display: block; + } + + wui-flex { + position: relative; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-xs) !important; + border: 5px solid var(--wui-color-bg-125); + background: var(--wui-color-bg-175); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 3; + } + + wui-button { + --local-border-radius: var(--wui-border-radius-xs) !important; + } + + .inputContainer { + height: fit-content; + } +`;var c0=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 Lu=class extends et{constructor(){super(),this.unsubscribe=[],this.token=an.state.token,this.sendTokenAmount=an.state.sendTokenAmount,this.receiverAddress=an.state.receiverAddress,this.receiverProfileName=an.state.receiverProfileName,this.loading=an.state.loading,this.gasPriceInUSD=an.state.gasPriceInUSD,this.message="Preview Send",this.fetchNetworkPrice(),this.unsubscribe.push(an.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),ne` + + + + + + + + ${this.message} + + + `}async fetchNetworkPrice(){await yt.getNetworkTokenPrice();const e=await yt.getInitialGasPrice();e!=null&&e.gasPrice&&(e!=null&&e.gasPriceInUSD)&&(an.setGasPrice(e.gasPrice),an.setGasPriceInUsd(e.gasPriceInUSD))}onButtonClick(){Te.push("WalletSendPreview")}getMessage(){var e;this.message="Preview Send",this.receiverAddress&&!ot.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&((e=this.token)!=null&&e.price)&&(this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")),this.token||(this.message="Select Token")}};Lu.styles=Sfe;c0([ge()],Lu.prototype,"token",void 0);c0([ge()],Lu.prototype,"sendTokenAmount",void 0);c0([ge()],Lu.prototype,"receiverAddress",void 0);c0([ge()],Lu.prototype,"receiverProfileName",void 0);c0([ge()],Lu.prototype,"loading",void 0);c0([ge()],Lu.prototype,"gasPriceInUSD",void 0);c0([ge()],Lu.prototype,"message",void 0);Lu=c0([Re("w3m-wallet-send-view")],Lu);const Ife=Dt` + .contentContainer { + height: 440px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-xxs); + } +`;var Wy=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 Jp=class extends et{constructor(){super(),this.unsubscribe=[],this.tokenBalance=De.state.tokenBalance,this.search="",this.onDebouncedSearch=ot.debounce(e=>{this.search=e}),this.unsubscribe.push(De.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` + + ${this.templateSearchInput()} ${this.templateTokens()} + + `}templateSearchInput(){return ne` + + + + `}templateTokens(){var e,t;return this.tokens=(e=this.tokenBalance)==null?void 0:e.filter(n=>{var i;return n.chainId===((i=it.state.caipNetwork)==null?void 0:i.id)}),this.search?this.filteredTokens=(t=this.tokenBalance)==null?void 0:t.filter(n=>n.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,ne` + + + Your tokens + + + ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(n=>ne``):ne` + + + No tokens found + Your tokens will appear here + + Buy + `} + + + `}onBuyClick(){Te.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){an.setToken(e),an.setTokenAmount(void 0),Te.goBack()}};Jp.styles=Ife;Wy([ge()],Jp.prototype,"tokenBalance",void 0);Wy([ge()],Jp.prototype,"tokens",void 0);Wy([ge()],Jp.prototype,"filteredTokens",void 0);Wy([ge()],Jp.prototype,"search",void 0);Jp=Wy([Re("w3m-wallet-send-select-token-view")],Jp);const Tfe=Dt` + wui-avatar, + wui-image { + display: ruby; + width: 32px; + height: 32px; + border-radius: var(--wui-border-radius-3xl); + } + + .sendButton { + width: 70%; + --local-width: 100% !important; + --local-border-radius: var(--wui-border-radius-xs) !important; + } + + .cancelButton { + width: 30%; + --local-width: 100% !important; + --local-border-radius: var(--wui-border-radius-xs) !important; + } +`;var l0=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 Uu=class extends et{constructor(){super(),this.unsubscribe=[],this.token=an.state.token,this.sendTokenAmount=an.state.sendTokenAmount,this.receiverAddress=an.state.receiverAddress,this.receiverProfileName=an.state.receiverProfileName,this.receiverProfileImageUrl=an.state.receiverProfileImageUrl,this.gasPriceInUSD=an.state.gasPriceInUSD,this.caipNetwork=it.state.caipNetwork,this.unsubscribe.push(an.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl}),it.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e,t;return ne` + + + + Send + ${this.sendValueTemplate()} + + + + + + + + To + + + + + + + + Review transaction carefully + + + + Cancel + + + Send + + + `}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return ne`$${t.toFixed(2)}`}return null}onSendClick(){an.sendToken()}onCancelClick(){Te.goBack()}};Uu.styles=Tfe;l0([ge()],Uu.prototype,"token",void 0);l0([ge()],Uu.prototype,"sendTokenAmount",void 0);l0([ge()],Uu.prototype,"receiverAddress",void 0);l0([ge()],Uu.prototype,"receiverProfileName",void 0);l0([ge()],Uu.prototype,"receiverProfileImageUrl",void 0);l0([ge()],Uu.prototype,"gasPriceInUSD",void 0);l0([ge()],Uu.prototype,"caipNetwork",void 0);Uu=l0([Re("w3m-wallet-send-preview-view")],Uu);const Rfe=Dt` + wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + wui-flex::-webkit-scrollbar { + display: none; + } +`;var kfe=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 Z9=class extends et{render(){return ne` + + + + + `}};Z9.styles=Rfe;Z9=kfe([Re("w3m-connect-wallets-view")],Z9);const Nfe=Dt` + wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + wui-flex::-webkit-scrollbar { + display: none; + } +`;var Pfe=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 Y9=class extends et{render(){return ne` + + + + + `}};Y9.styles=Nfe;Y9=Pfe([Re("w3m-connect-socials-view")],Y9);const Ofe=Dt` + wui-logo { + width: 80px; + height: 80px; + border-radius: var(--wui-border-radius-m); + } + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + wui-flex:first-child:not(:only-child) { + position: relative; + } + wui-loading-thumbnail { + position: absolute; + } + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); + } + wui-text[align='center'] { + width: 100%; + padding: 0px var(--wui-spacing-l); + } + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + .capitalize { + text-transform: capitalize; + } +`;var Yw=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 Vf=class extends et{constructor(){super(),this.unsubscribe=[],this.socialProvider=De.state.socialProvider,this.socialWindow=De.state.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.authConnector=Mt.getAuthConnector(),this.handleSocialConnection=async e=>{var t;if((t=e.data)!=null&&t.resultUri)if(e.origin===Yh.SECURE_SITE_ORIGIN){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.socialWindow&&(this.socialWindow.close(),De.setSocialWindow(void 0,st.state.activeChain)),this.connecting=!0,this.updateMessage();const n=e.data.resultUri;await this.authConnector.provider.connectSocial(n),this.socialProvider&&(en.setConnectedSocialProvider(this.socialProvider),await or.connectExternal(this.authConnector,this.authConnector.chain),It.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}))}}catch{this.error=!0,this.updateMessage(),this.socialProvider&&It.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})}}else Te.goBack(),Vt.showError("Untrusted Origin"),this.socialProvider&&It.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})},this.unsubscribe.push(De.subscribe(e=>{e.socialProvider&&(this.socialProvider=e.socialProvider),e.socialWindow&&(this.socialWindow=e.socialWindow),e.address&&nr.state.open&&nr.close()})),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),window.removeEventListener("message",this.handleSocialConnection,!1)}render(){return ne` + + + + ${this.error?null:this.loaderTemplate()} + + + + Log in with + ${this.socialProvider??"Social"} + ${this.message} + + `}loaderTemplate(){const e=ii.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ne``}connectSocial(){const e=setInterval(()=>{var t;(t=this.socialWindow)!=null&&t.closed&&(!this.connecting&&Te.state.view==="ConnectingSocial"&&Te.goBack(),clearInterval(e))},1e3);window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}};Vf.styles=Ofe;Yw([ge()],Vf.prototype,"socialProvider",void 0);Yw([ge()],Vf.prototype,"socialWindow",void 0);Yw([ge()],Vf.prototype,"error",void 0);Yw([ge()],Vf.prototype,"connecting",void 0);Yw([ge()],Vf.prototype,"message",void 0);Vf=Yw([Re("w3m-connecting-social-view")],Vf);const Mfe=Dt` + wui-flex { + width: 100%; + } + + wui-icon-link { + margin-right: calc(var(--wui-icon-box-size-md) * -1); + } + + .account-links { + display: flex; + justify-content: space-between; + align-items: center; + } + + .account-links wui-flex { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + flex: 1; + background: red; + align-items: center; + justify-content: center; + height: 48px; + padding: 10px; + flex: 1 0 0; + + border-radius: var(--XS, 16px); + border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color; + } + + .account-links wui-flex:hover { + background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); + } + + .account-links wui-flex wui-icon { + width: var(--S, 20px); + height: var(--S, 20px); + } + + .account-links wui-flex wui-icon svg path { + stroke: #47a1ff; + } + + .account-settings-button { + padding: calc(var(--wui-spacing-m) - 1px) var(--wui-spacing-2l); + height: 40px; + border-radius: var(--wui-border-radius-xxs); + border: 1px solid var(--wui-color-gray-glass-002); + background: var(--wui-color-gray-glass-002); + cursor: pointer; + } + + .account-settings-button:hover { + background: var(--wui-color-gray-glass-005); + } +`;var zy=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 Xp=class extends et{constructor(){super(),this.usubscribe=[],this.address=De.state.address,this.profileImage=De.state.profileImage,this.profileName=De.state.profileName,this.accounts=De.state.allAccounts,this.usubscribe.push(De.subscribeKey("address",e=>{e?this.address=e:nr.close()})),this.usubscribe.push(De.subscribeKey("profileImage",e=>{this.profileImage=e})),this.usubscribe.push(De.subscribeKey("profileName",e=>{this.profileName=e}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var t;if(!this.address)throw new Error("w3m-profile-view: No account provided");const e=(t=this.profileName)==null?void 0:t.split(".")[0];return ne` + + + + + + + ${e?Qt.getTruncateString({string:e,charsStart:20,charsEnd:0,truncate:"end"}):Qt.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} + + + + + + + ${this.accountsTemplate()} + + `}accountsTemplate(){return ne` + + Your accounts + + + ${this.accounts.map(e=>this.accountTemplate(e))} + + `}async onSwitchAccount(e){De.setShouldUpdateToAddress(e.address,st.state.activeChain);const t=Mt.getAuthConnector();t&&(await t.provider.setPreferredAccount(e.type),await t.provider.connect())}accountTemplate(e){return ne` + ${e.address===this.address?"":ne`this.onSwitchAccount(e)} + >Switch`} + `}onCopyAddress(){try{this.profileName?(ot.copyToClopboard(this.profileName),Vt.showSuccess("Name copied")):this.address&&(ot.copyToClopboard(this.address),Vt.showSuccess("Address copied"))}catch{Vt.showError("Failed to copy")}}};Xp.styles=Mfe;zy([ge()],Xp.prototype,"address",void 0);zy([ge()],Xp.prototype,"profileImage",void 0);zy([ge()],Xp.prototype,"profileName",void 0);zy([ge()],Xp.prototype,"accounts",void 0);Xp=zy([Re("w3m-profile-view")],Xp);const Dfe=Dt` + input[type='checkbox'] { + all: revert; + width: var(--wui-spacing-xl); + height: var(--wui-spacing-xl); + accent-color: var(--wui-color-accent-100); + } +`;var Qw=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 qf=class extends et{constructor(){super(),this.metadata=bt.state.metadata,this.allAccounts=De.state.allAccounts,this.selectedAccounts=De.state.allAccounts,this.selectAll=!0,this.approved=!1,this.isApproving=!1,this.getAddressTemplate=e=>{const t=this.selectedAccounts.some(n=>n.address===e.address);return ne` + + `},this.onSelectAll=e=>{const t=e.target.checked;this.selectAll=this.selectedAccounts.length===this.allAccounts.length,this.allAccounts.forEach(n=>{this.onSelect(n,t)})},this.onSelect=(e,t)=>{t?this.selectedAccounts.push(e):this.selectedAccounts=this.selectedAccounts.filter(n=>n.address!==e.address),this.selectedAccounts.length>0&&(this.selectAll=this.selectedAccounts.length===this.allAccounts.length)},De.subscribeKey("allAccounts",e=>{this.allAccounts=e})}render(){var e,t;return ne` + + + + + Select all + + + + ${this.allAccounts.map(n=>this.getAddressTemplate(n))} + + + + Cancel + + + ${this.isApproving?"Signing...":"Continue"} + + + `}handleClick(e){return t=>{var i;const n=t.target;(i=this.onSelect)==null||i.call(this,{...e},n==null?void 0:n.checked)}}onContinue(){var e;this.selectedAccounts.length>0?(this.isApproving=!0,De.setAllAccounts(this.selectedAccounts,st.state.activeChain),De.setShouldUpdateToAddress(((e=this.selectedAccounts[0])==null?void 0:e.address)??"",st.state.activeChain),this.approved=!0,this.isApproving=!1,nr.close()):this.onCancel()}async onCancel(){const{isConnected:e}=De.state;e?(await or.disconnect(),nr.close()):Te.push("Connect")}disconnectedCallback(){super.disconnectedCallback(),this.approved||this.onCancel()}};qf.styles=Dfe;Qw([ge()],qf.prototype,"allAccounts",void 0);Qw([ge()],qf.prototype,"selectedAccounts",void 0);Qw([ge()],qf.prototype,"selectAll",void 0);Qw([ge()],qf.prototype,"approved",void 0);Qw([ge()],qf.prototype,"isApproving",void 0);qf=Qw([Re("w3m-select-addresses-view")],qf);const $fe=Dt` + wui-avatar { + width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + box-shadow: 0 0 0 0; + } + + wui-icon-box { + position: relative; + right: 15px; + top: 15px; + border: 2px solid var(--wui-color-bg-150); + background-color: var(--wui-color-bg-125); + } +`;var VI=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 Dv=class extends et{constructor(){super(),this.metadata=bt.state.metadata,this.allAccounts=De.state.allAccounts||[],this.balances={},this.labels=De.state.addressLabels,this.currentAddress=De.state.address||"",this.connectedConnector=en.getConnectedConnector(),this.shouldShowIcon=this.connectedConnector==="AUTH",this.caipNetwork=it.state.caipNetwork,De.subscribeKey("allAccounts",e=>{this.allAccounts=e})}connectedCallback(){super.connectedCallback(),this.allAccounts.forEach(e=>{var t;Hn.getBalance(e.address,(t=this.caipNetwork)==null?void 0:t.id).then(n=>{let i=this.balances[e.address]||0;n.balances.length>0&&(i=n.balances.reduce((s,o)=>s+((o==null?void 0:o.value)||0),0)),this.balances[e.address]=i,this.requestUpdate()})})}getAddressIcon(e){return e==="smartAccount"?"lightbulb":"mail"}render(){var e,t;return ne` + + + + + ${this.allAccounts.map((n,i)=>this.getAddressTemplate(n,i))} + + `}getAddressTemplate(e,t){var i,s,o,a;const n=(i=this.labels)==null?void 0:i.get(e.address);return ne` + + + + ${this.shouldShowIcon?ne``:ne``} + + ${n||Qt.getTruncateString({string:e.address,charsStart:4,charsEnd:6,truncate:"middle"})} + + ${typeof this.balances[e.address]=="number"?`$${(s=this.balances[e.address])==null?void 0:s.toFixed(2)}`:ne``} + + + + + ${((o=e.address)==null?void 0:o.toLowerCase())===((a=this.currentAddress)==null?void 0:a.toLowerCase())?"":ne` + this.onSwitchAddress(e.address)} + >Switch to + `} + + + `}onSwitchAddress(e){De.setShouldUpdateToAddress(e,st.state.activeChain),nr.close()}};Dv.styles=$fe;VI([ge()],Dv.prototype,"allAccounts",void 0);VI([ge()],Dv.prototype,"balances",void 0);Dv=VI([Re("w3m-switch-address-view")],Dv);const Bfe=Dt` + @keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + + wui-shimmer { + width: 100%; + aspect-ratio: 1 / 1; + border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; + } + + wui-qr-code { + opacity: 0; + animation-duration: 200ms; + animation-timing-function: ease; + animation-name: fadein; + animation-fill-mode: forwards; + } + + wui-logo { + width: 80px; + height: 80px; + border-radius: var(--wui-border-radius-m); + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + wui-loading-thumbnail { + position: absolute; + } + wui-icon-box { + position: absolute; + right: calc(var(--wui-spacing-3xs) * -1); + bottom: calc(var(--wui-spacing-3xs) * -1); + opacity: 0; + transform: scale(0.5); + transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg); + } +`;var Vy=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 e1=class extends et{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.socialProvider=De.state.socialProvider,this.uri=De.state.farcasterUrl,this.ready=!1,this.loading=!1,this.authConnector=Mt.getAuthConnector(),this.forceUpdate=()=>{this.requestUpdate()},this.unsubscribe.push(De.subscribeKey("farcasterUrl",e=>{e&&(this.uri=e,this.connectFarcaster())}),De.subscribeKey("socialProvider",e=>{e&&(this.socialProvider=e)})),window.addEventListener("resize",this.forceUpdate)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.timeout),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),ne`${this.platformTemplate()}`}platformTemplate(){return ot.isMobile()?ne`${this.mobileTemplate()}`:ne`${this.desktopTemplate()}`}desktopTemplate(){return this.loading?ne`${this.loadingTemplate()}`:ne`${this.qrTemplate()}`}qrTemplate(){return ne` + ${this.qrCodeTemplate()} + + + Scan this QR Code with your phone + + ${this.copyTemplate()} + `}loadingTemplate(){return ne` + + + + ${this.loaderTemplate()} + + + + + Loading user data + + + Please wait a moment while we load your data. + + + + `}mobileTemplate(){return ne` + + + ${this.loaderTemplate()} + + + + Continue in Farcaster + Accept connection request in the app + ${this.mobileLinkTemplate()} + `}loaderTemplate(){const e=ii.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return ne``}async connectFarcaster(){var e;if(this.authConnector)try{await((e=this.authConnector)==null?void 0:e.provider.connectFarcaster()),this.socialProvider&&en.setConnectedSocialProvider(this.socialProvider),this.loading=!0,await or.connectExternal(this.authConnector,this.authConnector.chain),this.loading=!1,nr.close()}catch(t){Te.goBack(),Vt.showError(t)}}mobileLinkTemplate(){return ne`{this.uri&&ot.openHref(this.uri,"_blank")}} + > + Open farcaster`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},0))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40;return ne` `}copyTemplate(){const e=!this.uri||!this.ready;return ne` + + Copy link + `}onCopyUri(){try{this.uri&&(ot.copyToClopboard(this.uri),Vt.showSuccess("Link copied"))}catch{Vt.showError("Failed to copy")}}};e1.styles=Bfe;Vy([ge()],e1.prototype,"socialProvider",void 0);Vy([ge()],e1.prototype,"uri",void 0);Vy([ge()],e1.prototype,"ready",void 0);Vy([ge()],e1.prototype,"loading",void 0);e1=Vy([Re("w3m-connecting-farcaster-view")],e1);const Lfe=Dt` + wui-grid { + max-height: clamp(360px, 400px, 80vh); + overflow: scroll; + scrollbar-width: none; + grid-auto-rows: min-content; + grid-template-columns: repeat(auto-fill, 76px); + } + + @media (max-width: 435px) { + wui-grid { + grid-template-columns: repeat(auto-fill, 77px); + } + } + + wui-grid[data-scroll='false'] { + overflow: hidden; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-loading-spinner { + padding-top: var(--wui-spacing-l); + padding-bottom: var(--wui-spacing-l); + justify-content: center; + grid-column: 1 / span 4; + } +`;function uj(r){const{connectors:e}=Mt.state,t=e.filter(s=>s.type==="ANNOUNCED").reduce((s,o)=>{var a;return(a=o.info)!=null&&a.rdns&&(s[o.info.rdns]=!0),s},{});return r.map(s=>({...s,installed:!!s.rdns&&!!t[s.rdns??""]})).sort((s,o)=>Number(o.installed)-Number(s.installed))}var qy=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};const uO="local-paginator";let t1=class extends et{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!Yt.state.wallets.length,this.wallets=Yt.state.wallets,this.recommended=Yt.state.recommended,this.featured=Yt.state.featured,this.unsubscribe.push(Yt.subscribeKey("wallets",e=>this.wallets=e),Yt.subscribeKey("recommended",e=>this.recommended=e),Yt.subscribeKey("featured",e=>this.featured=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var e;this.unsubscribe.forEach(t=>t()),(e=this.paginationObserver)==null||e.disconnect()}render(){return ne` + + ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()} + ${this.paginationLoaderTemplate()} + + `}async initialFetch(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-grid");this.initial&&e&&(await Yt.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>ne` + + `)}walletsTemplate(){const e=[...this.featured,...this.recommended,...this.wallets];return uj(e).map(n=>ne` + this.onConnectWallet(n)} + .wallet=${n} + > + `)}paginationLoaderTemplate(){const{wallets:e,recommended:t,featured:n,count:i}=Yt.state,s=window.innerWidth<352?3:4,o=e.length+t.length;let c=Math.ceil(o/s)*s-o+s;return c-=e.length?n.length%s:0,i===0&&n.length>0?null:i===0||[...n,...e,...t].length{if(n!=null&&n.isIntersecting&&!this.initial){const{page:i,count:s,wallets:o}=Yt.state;o.length wui-text { + color: var(--wui-color-fg-100); + max-width: var(--wui-icon-box-size-xl); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + justify-content: center; + } + + button:hover:enabled { + background-color: var(--wui-color-gray-glass-005); + } + + button:disabled > wui-text { + color: var(--wui-color-gray-glass-015); + } + + [data-selected='true'] { + background-color: var(--wui-color-accent-glass-020); + } + + @media (hover: hover) and (pointer: fine) { + [data-selected='true']:hover:enabled { + background-color: var(--wui-color-accent-glass-015); + } + } + + [data-selected='true']:active:enabled { + background-color: var(--wui-color-accent-glass-010); + } +`;var Ky=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 r1=class extends et{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(t=>{t.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var e;return ne` + + `}imageTemplate(){var e,t;return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():ne` + + + `}shimmerTemplate(){return ne``}async fetchImageSrc(){this.wallet&&(this.imageSrc=Lr.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await Lr.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};r1.styles=Ufe;Ky([ge()],r1.prototype,"visible",void 0);Ky([ge()],r1.prototype,"imageSrc",void 0);Ky([ge()],r1.prototype,"imageLoading",void 0);Ky([kt()],r1.prototype,"wallet",void 0);r1=Ky([Re("w3m-all-wallets-list-item")],r1);const Ffe=Dt` + wui-grid, + wui-loading-spinner, + wui-flex { + height: 360px; + } + + wui-grid { + overflow: scroll; + scrollbar-width: none; + grid-auto-rows: min-content; + } + + wui-grid[data-scroll='false'] { + overflow: hidden; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-loading-spinner { + justify-content: center; + align-items: center; + } +`;var qI=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 $v=class extends et{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?ne``:this.walletsTemplate()}async onSearch(){this.query.trim()!==this.prevQuery.trim()&&(this.prevQuery=this.query,this.loading=!0,await Yt.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=Yt.state,t=uj(e);return e.length?ne` + + ${t.map(n=>ne` + this.onConnectWallet(n)} + .wallet=${n} + > + `)} + + `:ne` + + + No Wallet found + + `}onConnectWallet(e){const t=Mt.getConnector(e.id,e.rdns);t?Te.push("ConnectingExternal",{connector:t}):Te.push("ConnectingWalletConnect",{wallet:e})}};$v.styles=Ffe;qI([ge()],$v.prototype,"loading",void 0);qI([kt()],$v.prototype,"query",void 0);$v=qI([Re("w3m-all-wallets-search")],$v);var R_=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 Bv=class extends et{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(or.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.generateTabs();return ne` + + + + `}generateTabs(){const e=this.platforms.map(t=>t==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:t==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:t==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:t==="web"?{label:"Webapp",icon:"browser",platform:"web"}:t==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:t})=>t),e}onTabChange(e){var n;const t=this.platformTabs[e];t&&((n=this.onSelectPlatfrom)==null||n.call(this,t))}};R_([kt({type:Array})],Bv.prototype,"platforms",void 0);R_([kt()],Bv.prototype,"onSelectPlatfrom",void 0);R_([ge()],Bv.prototype,"buffering",void 0);Bv=R_([Re("w3m-connecting-header")],Bv);var jfe=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 hO=class extends Vo{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var e;try{this.error=!1;const{connectors:t}=Mt.state,n=t.find(s=>{var o,a;return s.type==="ANNOUNCED"&&((o=s.info)==null?void 0:o.rdns)===((a=this.wallet)==null?void 0:a.rdns)}),i=t.find(s=>s.type==="INJECTED");n?await or.connectExternal(n,n.chain):i&&await or.connectExternal(i,i.chain),nr.close(),It.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((e=this.wallet)==null?void 0:e.name)||"Unknown"}})}catch(t){It.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(t==null?void 0:t.message)??"Unknown"}}),this.error=!0}}};hO=jfe([Re("w3m-connecting-wc-browser")],hO);var Hfe=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 dO=class extends Vo{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:t,name:n}=this.wallet,{redirect:i,href:s}=ot.formatNativeUrl(t,this.uri);or.setWcLinking({name:n,href:s}),or.setRecentWallet(this.wallet),ot.openHref(i,"_blank")}catch{this.error=!0}}};dO=Hfe([Re("w3m-connecting-wc-desktop")],dO);var Wfe=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 fO=class extends Vo{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:t,name:n}=this.wallet,{redirect:i,href:s}=ot.formatNativeUrl(t,this.uri);or.setWcLinking({name:n,href:s}),or.setRecentWallet(this.wallet),ot.openHref(i,"_self")}catch{this.error=!0}}onBuffering(){const e=ot.isIos();(document==null?void 0:document.visibilityState)==="visible"&&!this.error&&e&&(or.setBuffering(!0),setTimeout(()=>{or.setBuffering(!1)},5e3))}};fO=Wfe([Re("w3m-connecting-wc-mobile")],fO);const zfe=Dt` + @keyframes fadein { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + + wui-shimmer { + width: 100%; + aspect-ratio: 1 / 1; + border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important; + } + + wui-qr-code { + opacity: 0; + animation-duration: 200ms; + animation-timing-function: ease; + animation-name: fadein; + animation-fill-mode: forwards; + } +`;var Vfe=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 Q9=class extends Vo{constructor(){var e;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((e=this.wallet)==null?void 0:e.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),ne` + + ${this.qrCodeTemplate()} + + + Scan this QR Code with your phone + + ${this.copyTemplate()} + + + + `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},0))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,t=this.wallet?this.wallet.name:void 0;return or.setWcLinking(void 0),or.setRecentWallet(this.wallet),ne` `}copyTemplate(){const e=!this.uri||!this.ready;return ne` + + Copy link + `}};Q9.styles=zfe;Q9=Vfe([Re("w3m-connecting-wc-qrcode")],Q9);var qfe=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 pO=class extends et{constructor(){var e;if(super(),this.wallet=(e=Te.state.data)==null?void 0:e.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return ne` + + + + Not Detected + + + + `}};pO=qfe([Re("w3m-connecting-wc-unsupported")],pO);var Kfe=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 gO=class extends Vo{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",It.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:t,name:n}=this.wallet,{redirect:i,href:s}=ot.formatUniversalUrl(t,this.uri);or.setWcLinking({name:n,href:s}),or.setRecentWallet(this.wallet),ot.openHref(i,"_blank")}catch{this.error=!0}}};gO=Kfe([Re("w3m-connecting-wc-web")],gO);const Gfe=Dt` + :host { + width: 100%; + } + + .details-container > wui-flex { + background: var(--wui-color-gray-glass-002); + border-radius: var(--wui-border-radius-xxs); + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + cursor: pointer; + } + + .details-content-container { + padding: var(--wui-spacing-1xs); + padding-top: 0px; + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: var(--wui-spacing-s); + padding-left: var(--wui-spacing-s); + padding-right: var(--wui-spacing-1xs); + border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs)); + background: var(--wui-color-gray-glass-002); + } + + .details-row-title { + white-space: nowrap; + } + + .details-row.provider-free-row { + padding-right: var(--wui-spacing-xs); + } +`;var Aa=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};const Zfe=Ci.CONVERT_SLIPPAGE_TOLERANCE;let co=class extends et{constructor(){var e;super(),this.unsubscribe=[],this.networkName=(e=it.state.caipNetwork)==null?void 0:e.name,this.detailsOpen=!1,this.sourceToken=yt.state.sourceToken,this.toToken=yt.state.toToken,this.toTokenAmount=yt.state.toTokenAmount,this.sourceTokenPriceInUSD=yt.state.sourceTokenPriceInUSD,this.toTokenPriceInUSD=yt.state.toTokenPriceInUSD,this.gasPriceInUSD=yt.state.gasPriceInUSD,this.priceImpact=yt.state.priceImpact,this.maxSlippage=yt.state.maxSlippage,this.networkTokenSymbol=yt.state.networkTokenSymbol,this.inputError=yt.state.inputError,this.unsubscribe.push(yt.subscribe(t=>{this.sourceToken=t.sourceToken,this.toToken=t.toToken,this.toTokenAmount=t.toTokenAmount,this.gasPriceInUSD=t.gasPriceInUSD,this.priceImpact=t.priceImpact,this.maxSlippage=t.maxSlippage,this.sourceTokenPriceInUSD=t.sourceTokenPriceInUSD,this.toTokenPriceInUSD=t.toTokenPriceInUSD,this.inputError=t.inputError}))}render(){const e=this.toTokenAmount&&this.maxSlippage?qr.bigNumber(this.toTokenAmount).minus(this.maxSlippage).toString():null;if(!this.sourceToken||!this.toToken||this.inputError)return null;const t=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return ne` + + + + ${this.detailsOpen?ne` + + + + + + Network cost + + + + + + + $${Qt.formatNumberToLocalString(this.gasPriceInUSD,3)} + + + + ${this.priceImpact?ne` + + + + Price impact + + + + + + + + ${Qt.formatNumberToLocalString(this.priceImpact,3)}% + + + + `:null} + ${this.maxSlippage&&this.sourceToken.symbol?ne` + + + + Max. slippage + + + + + + + + ${Qt.formatNumberToLocalString(this.maxSlippage,6)} + ${this.toToken.symbol} ${Zfe}% + + + + `:null} + + + + + Provider fee + + + + 0.85% + + + + + `:null} + + + `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};co.styles=[Gfe];Aa([ge()],co.prototype,"networkName",void 0);Aa([kt()],co.prototype,"detailsOpen",void 0);Aa([ge()],co.prototype,"sourceToken",void 0);Aa([ge()],co.prototype,"toToken",void 0);Aa([ge()],co.prototype,"toTokenAmount",void 0);Aa([ge()],co.prototype,"sourceTokenPriceInUSD",void 0);Aa([ge()],co.prototype,"toTokenPriceInUSD",void 0);Aa([ge()],co.prototype,"gasPriceInUSD",void 0);Aa([ge()],co.prototype,"priceImpact",void 0);Aa([ge()],co.prototype,"maxSlippage",void 0);Aa([ge()],co.prototype,"networkTokenSymbol",void 0);Aa([ge()],co.prototype,"inputError",void 0);co=Aa([Re("w3m-swap-details")],co);const Yfe=Dt` + :host > wui-flex { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + border-radius: var(--wui-border-radius-s); + background-color: var(--wui-color-gray-glass-002); + padding: var(--wui-spacing-xl); + padding-right: var(--wui-spacing-s); + width: 100%; + height: 100px; + box-sizing: border-box; + box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002); + position: relative; + transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-lg); + will-change: background-color; + } + + :host wui-flex.focus { + box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-005); + } + + :host > wui-flex .swap-input, + :host > wui-flex .swap-token-button { + z-index: 10; + } + + :host > wui-flex .swap-input { + -webkit-mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + } + + :host > wui-flex .swap-input input { + background: none; + border: none; + height: 42px; + width: 100%; + font-size: 32px; + font-style: normal; + font-weight: 400; + line-height: 130%; + letter-spacing: -1.28px; + outline: none; + caret-color: var(--wui-color-accent-100); + color: var(--wui-color-fg-100); + padding: 0px; + } + + :host > wui-flex .swap-input input:focus-visible { + outline: none; + } + + :host > wui-flex .swap-input input::-webkit-outer-spin-button, + :host > wui-flex .swap-input input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + .max-value-button { + background-color: transparent; + border: none; + cursor: pointer; + color: var(--wui-color-gray-glass-020); + padding-left: 0px; + } + + .market-value { + min-height: 18px; + } +`;var xl=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};const Qfe=5e-5;let wa=class extends et{constructor(){super(...arguments),this.focused=!1,this.price=0,this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",t=qr.bigNumber(e).isGreaterThan("0");return ne` + + + this.onFocusChange(!0)} + @focusout=${()=>this.onFocusChange(!1)} + ?disabled=${this.disabled} + .value=${this.value} + @input=${this.dispatchInputChangeEvent} + @keydown=${this.handleKeydown} + placeholder="0" + type="text" + inputmode="decimal" + /> + + ${t?`$${Qt.formatNumberToLocalString(this.marketValue,3)}`:null} + + + ${this.templateTokenSelectButton()} + + `}handleKeydown(e){return Jne.numericInputKeyDown(e,this.value,t=>{var n;return(n=this.onSetAmount)==null?void 0:n.call(this,this.target,t)})}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const t=e.target.value.replace(/[^0-9.]/gu,"");t===","||t==="."?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){var e;(e=this.onSetMaxValue)==null||e.call(this,this.target,this.balance)}templateTokenSelectButton(){return this.token?ne` + + + + ${this.tokenBalanceTemplate()} + + `:ne` + Select token + `}tokenBalanceTemplate(){const e=qr.multiply(this.balance,this.price),t=e?e==null?void 0:e.isGreaterThan(Qfe):!1;return ne` + ${t?ne` + ${Qt.formatNumberToLocalString(this.balance,3)} + `:null} + ${this.target==="sourceToken"?this.tokenActionButtonTemplate(t):null} + `}tokenActionButtonTemplate(e){return e?ne` `:ne` `}onFocusChange(e){this.focused=e}onSelectToken(){It.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),Te.push("SwapSelectToken",{target:this.target})}onBuyToken(){Te.push("OnRampProviders")}};wa.styles=[Yfe];xl([kt()],wa.prototype,"focused",void 0);xl([kt()],wa.prototype,"balance",void 0);xl([kt()],wa.prototype,"value",void 0);xl([kt()],wa.prototype,"price",void 0);xl([kt()],wa.prototype,"marketValue",void 0);xl([kt()],wa.prototype,"disabled",void 0);xl([kt()],wa.prototype,"target",void 0);xl([kt()],wa.prototype,"token",void 0);xl([kt()],wa.prototype,"onSetAmount",void 0);xl([kt()],wa.prototype,"onSetMaxValue",void 0);wa=xl([Re("w3m-swap-input")],wa);const Jfe=Dt` + :host { + width: 100%; + } + + :host > wui-flex { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + border-radius: var(--wui-border-radius-s); + padding: var(--wui-spacing-xl); + padding-right: var(--wui-spacing-s); + background-color: var(--wui-color-gray-glass-002); + box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002); + width: 100%; + height: 100px; + box-sizing: border-box; + position: relative; + } + + wui-shimmer.market-value { + opacity: 0; + } + + :host > wui-flex > svg.input_mask { + position: absolute; + inset: 0; + z-index: 5; + } + + :host wui-flex .input_mask__border, + :host wui-flex .input_mask__background { + transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1); + will-change: fill; + } + + :host wui-flex .input_mask__border { + fill: var(--wui-color-gray-glass-020); + } + + :host wui-flex .input_mask__background { + fill: var(--wui-color-gray-glass-002); + } +`;var hj=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 K6=class extends et{constructor(){super(...arguments),this.target="sourceToken"}render(){return ne` + + + + + ${this.templateTokenSelectButton()} + + `}templateTokenSelectButton(){return ne` + + + + `}};K6.styles=[Jfe];hj([kt()],K6.prototype,"target",void 0);K6=hj([Re("w3m-swap-input-skeleton")],K6);const Xfe=Dt` + :host { + height: 64px; + } + + wui-text { + text-transform: capitalize; + } + + wui-flex.w3m-header-title { + transform: translateY(0); + opacity: 1; + } + + wui-flex.w3m-header-title[view-direction='prev'] { + animation: + slide-down-out 120ms forwards var(--wui-ease-out-power-2), + slide-down-in 120ms forwards var(--wui-ease-out-power-2); + animation-delay: 0ms, 200ms; + } + + wui-flex.w3m-header-title[view-direction='next'] { + animation: + slide-up-out 120ms forwards var(--wui-ease-out-power-2), + slide-up-in 120ms forwards var(--wui-ease-out-power-2); + animation-delay: 0ms, 200ms; + } + + wui-icon-link[data-hidden='true'] { + opacity: 0 !important; + pointer-events: none; + } + + @keyframes slide-up-out { + from { + transform: translateY(0px); + opacity: 1; + } + to { + transform: translateY(3px); + opacity: 0; + } + } + + @keyframes slide-up-in { + from { + transform: translateY(-3px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } + } + + @keyframes slide-down-out { + from { + transform: translateY(0px); + opacity: 1; + } + to { + transform: translateY(-3px); + opacity: 0; + } + } + + @keyframes slide-down-in { + from { + transform: translateY(3px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } + } +`;var Zu=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};const e0e=["Swap","SwapSelectToken","SwapPreview"];function PE(){var o,a,c,l,h,f,v;const r=(a=(o=Te.state.data)==null?void 0:o.connector)==null?void 0:a.name,e=(l=(c=Te.state.data)==null?void 0:c.wallet)==null?void 0:l.name,t=(f=(h=Te.state.data)==null?void 0:h.network)==null?void 0:f.name,n=e??r,i=Mt.getConnectors();return{Connect:`Connect ${i.length===1&&((v=i[0])==null?void 0:v.id)==="w3m-email"?"Email":""} Wallet`,ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:n??"Connect Wallet",ConnectingWalletConnect:n??"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:n?`Get ${n}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Profile:void 0,SelectAddresses:"Select accounts",SwitchNetwork:t??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:De.state.socialProvider?De.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain"}}let gc=class extends et{constructor(){super(),this.unsubscribe=[],this.heading=PE()[Te.state.view],this.network=it.state.caipNetwork,this.buffering=!1,this.showBack=!1,this.isSiweEnabled=bt.state.isSiweEnabled,this.prevHistoryLength=1,this.view=Te.state.view,this.viewDirection="",this.headerText=PE()[Te.state.view],this.unsubscribe.push(Te.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=PE()[e]},Yh.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),or.subscribeKey("buffering",e=>this.buffering=e),it.subscribeKey("caipNetwork",e=>this.network=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){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-DvOqXmJq.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` + + `}titleTemplate(){const e=e0e.includes(this.view);return ne` + + ${this.headerText} + ${e?ne`Beta`:null} + + `}dynamicButtonTemplate(){var c;const{view:e}=Te.state,t=e==="Connect",n=e==="ApproveTransaction",i=e==="UpgradeToSmartAccount",s=e==="ConnectingSiwe",o=e==="Account",a=n||i||s;return o?ne``:this.showBack&&!a?ne``:ne``}onNetworks(){this.isAllowedNetworkSwitch()&&(It.sendEvent({type:"track",event:"CLICK_NETWORKS"}),Te.push("Networks"))}isAllowedNetworkSwitch(){const e=it.getRequestedCaipNetworks(),t=e?e.length>1:!1,n=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return t||!n}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=Te.state;let t=Yh.VIEW_DIRECTION.Next;e.length1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){Te.goBack()}};gc.styles=Xfe;Zu([ge()],gc.prototype,"heading",void 0);Zu([ge()],gc.prototype,"network",void 0);Zu([ge()],gc.prototype,"buffering",void 0);Zu([ge()],gc.prototype,"showBack",void 0);Zu([ge()],gc.prototype,"isSiweEnabled",void 0);Zu([ge()],gc.prototype,"prevHistoryLength",void 0);Zu([ge()],gc.prototype,"view",void 0);Zu([ge()],gc.prototype,"viewDirection",void 0);Zu([ge()],gc.prototype,"headerText",void 0);gc=Zu([Re("w3m-header")],gc);var dj=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 J9=class extends et{constructor(){super(...arguments),this.data=[]}render(){return ne` + + ${this.data.map(e=>ne` + + + ${e.images.map(t=>ne``)} + + + + + ${e.title} + + ${e.text} + + `)} + + `}};dj([kt({type:Array})],J9.prototype,"data",void 0);J9=dj([Re("w3m-help-widget")],J9);const t0e=Dt` + :host { + width: 100%; + } + + :host > wui-flex { + width: 100%; + padding: var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xs); + width: 100%; + display: flex; + align-items: center; + justify-content: flex-start; + gap: var(--wui-spacing-s); + } + + :host > wui-flex:hover { + background-color: var(--wui-color-gray-glass-002); + } + + .purchase-image-container { + display: flex; + justify-content: center; + align-items: center; + position: relative; + width: var(--wui-icon-box-size-lg); + height: var(--wui-icon-box-size-lg); + } + + .purchase-image-container wui-image { + width: 100%; + height: 100%; + position: relative; + border-radius: calc(var(--wui-icon-box-size-lg) / 2); + } + + .purchase-image-container wui-image::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + inset: 0; + border-radius: calc(var(--wui-icon-box-size-lg) / 2); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + .purchase-image-container wui-icon-box { + position: absolute; + right: 0; + bottom: 0; + transform: translate(20%, 20%); + } +`;var Ea=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 lo=class extends et{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return ne` + + ${this.imageTemplate()} + + + ${this.statusIconTemplate()} + ${this.label} + + + + ${this.purchaseValue} ${this.purchaseCurrency} + + + ${this.inProgress?ne``:ne`${this.date}`} + + `}async fetchTokenImage(){await Yt._fetchTokenImage(this.purchaseCurrency)}statusIconTemplate(){return this.inProgress?null:this.completed?this.boughtIconTemplate():this.errorIconTemplate()}errorIconTemplate(){return ne``}imageTemplate(){const e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return ne` + + `}boughtIconTemplate(){return ne``}};lo.styles=[t0e];Ea([kt({type:Boolean})],lo.prototype,"disabled",void 0);Ea([kt()],lo.prototype,"color",void 0);Ea([kt()],lo.prototype,"label",void 0);Ea([kt()],lo.prototype,"purchaseValue",void 0);Ea([kt()],lo.prototype,"purchaseCurrency",void 0);Ea([kt()],lo.prototype,"date",void 0);Ea([kt({type:Boolean})],lo.prototype,"completed",void 0);Ea([kt({type:Boolean})],lo.prototype,"inProgress",void 0);Ea([kt({type:Boolean})],lo.prototype,"failed",void 0);Ea([kt()],lo.prototype,"onClick",void 0);Ea([kt()],lo.prototype,"symbol",void 0);Ea([kt()],lo.prototype,"icon",void 0);lo=Ea([Re("w3m-onramp-activity-item")],lo);const r0e=Dt` + :host { + width: 100%; + } + + wui-loading-spinner { + position: absolute; + top: 50%; + right: 20px; + transform: translateY(-50%); + } + + .currency-container { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: var(--wui-spacing-1xs); + height: 40px; + padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs) + var(--wui-spacing-xs); + min-width: 95px; + border-radius: var(--FULL, 1000px); + border: 1px solid var(--wui-color-gray-glass-002); + background: var(--wui-color-gray-glass-002); + cursor: pointer; + } + + .currency-container > wui-image { + height: 24px; + width: 24px; + border-radius: 50%; + } +`;var E1=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 pd=class extends et{constructor(){var e;super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=(e=this.currencies)==null?void 0:e[0],this.currencyImages=Jn.state.currencyImages,this.tokenImages=Jn.state.tokenImages,this.unsubscribe.push(on.subscribeKey("purchaseCurrency",t=>{!t||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(t))}),on.subscribeKey("paymentCurrency",t=>{!t||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(t))}),on.subscribe(t=>{this.type==="Fiat"?this.currencies=t.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=t.paymentCurrencies.map(this.formatPaymentCurrency)}),Jn.subscribe(t=>{this.currencyImages={...t.currencyImages},this.tokenImages={...t.tokenImages}}))}firstUpdated(){on.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var n;const e=((n=this.selectedCurrency)==null?void 0:n.symbol)||"",t=this.currencyImages[e]||this.tokenImages[e];return ne` + ${this.selectedCurrency?ne` nr.open({view:`OnRamp${this.type}Select`})} + > + + ${this.selectedCurrency.symbol} + `:ne``} + `}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};pd.styles=r0e;E1([kt({type:String})],pd.prototype,"type",void 0);E1([kt({type:Number})],pd.prototype,"value",void 0);E1([ge()],pd.prototype,"currencies",void 0);E1([ge()],pd.prototype,"selectedCurrency",void 0);E1([ge()],pd.prototype,"currencyImages",void 0);E1([ge()],pd.prototype,"tokenImages",void 0);pd=E1([Re("w3m-onramp-input")],pd);const n0e=Dt` + button { + padding: var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xs); + border: none; + outline: none; + background-color: var(--wui-color-gray-glass-002); + width: 100%; + display: flex; + align-items: center; + justify-content: flex-start; + gap: var(--wui-spacing-s); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color; + } + + button:hover { + background-color: var(--wui-color-gray-glass-005); + } + + .provider-image { + width: var(--wui-spacing-3xl); + min-width: var(--wui-spacing-3xl); + height: var(--wui-spacing-3xl); + border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2)); + position: relative; + overflow: hidden; + } + + .provider-image::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + inset: 0; + border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2)); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + .network-icon { + width: var(--wui-spacing-m); + height: var(--wui-spacing-m); + border-radius: calc(var(--wui-spacing-m) / 2); + overflow: hidden; + box-shadow: + 0 0 0 3px var(--wui-color-gray-glass-002), + 0 0 0 3px var(--wui-color-modal-bg); + transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: box-shadow; + } + + button:hover .network-icon { + box-shadow: + 0 0 0 3px var(--wui-color-gray-glass-005), + 0 0 0 3px var(--wui-color-modal-bg); + } +`;var u0=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 Fu=class extends et{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return ne` + + `}networksTemplate(){var n;const e=it.getRequestedCaipNetworks(),t=(n=e==null?void 0:e.filter(i=>i==null?void 0:i.imageId))==null?void 0:n.slice(0,5);return ne` + + ${t==null?void 0:t.map(i=>ne` + + + + `)} + + `}};Fu.styles=[n0e];u0([kt({type:Boolean})],Fu.prototype,"disabled",void 0);u0([kt()],Fu.prototype,"color",void 0);u0([kt()],Fu.prototype,"name",void 0);u0([kt()],Fu.prototype,"label",void 0);u0([kt()],Fu.prototype,"feeRange",void 0);u0([kt({type:Boolean})],Fu.prototype,"loading",void 0);u0([kt()],Fu.prototype,"onClick",void 0);Fu=u0([Re("w3m-onramp-provider-item")],Fu);const i0e=Dt` + wui-flex { + background-color: var(--wui-color-gray-glass-005); + } + + a { + text-decoration: none; + color: var(--wui-color-fg-175); + font-weight: 500; + } +`;var s0e=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 X9=class extends et{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=bt.state;return!e&&!t?null:ne` + + + By connecting your wallet, you agree to our
+ ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} +
+
+ `}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=bt.state;return e&&t?"and":""}termsTemplate(){const{termsConditionsUrl:e}=bt.state;return e?ne`Terms of Service`:null}privacyTemplate(){const{privacyPolicyUrl:e}=bt.state;return e?ne`Privacy Policy`:null}};X9.styles=[i0e];X9=s0e([Re("w3m-legal-footer")],X9);const o0e=Dt` + :host { + display: block; + padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl); + } +`;var fj=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 G6=class extends et{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:t,play_store:n,chrome_store:i,homepage:s}=this.wallet,o=ot.isMobile(),a=ot.isIos(),c=ot.isAndroid(),l=[t,n,s,i].filter(Boolean).length>1,h=Qt.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return l&&!o?ne` + Te.push("Downloads",{wallet:this.wallet})} + > + `:!l&&s?ne` + + `:t&&a?ne` + + `:n&&c?ne` + + `:(this.style.display="none",null)}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&ot.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&ot.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&ot.openHref(this.wallet.homepage,"_blank")}};G6.styles=[o0e];fj([kt({type:Object})],G6.prototype,"wallet",void 0);G6=fj([Re("w3m-mobile-download-links")],G6);const a0e=Dt` + wui-flex { + border-top: 1px solid var(--wui-color-gray-glass-005); + } + + a { + text-decoration: none; + color: var(--wui-color-fg-175); + font-weight: 500; + display: flex; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-3xs); + } +`;var c0e=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 eC=class extends et{render(){const{termsConditionsUrl:e,privacyPolicyUrl:t}=bt.state;return!e&&!t?null:ne` + + + We work with the best providers to give you the lowest fees and best support. More options + coming soon! + + + ${this.howDoesItWorkTemplate()} + + `}howDoesItWorkTemplate(){return ne` + + How does it work? + `}onWhatIsBuy(){It.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("WhatIsABuy")}};eC.styles=[a0e];eC=c0e([Re("w3m-onramp-providers-footer")],eC);const l0e=Dt` + :host { + display: block; + position: absolute; + opacity: 0; + pointer-events: none; + top: 11px; + left: 50%; + width: max-content; + } +`;var pj=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};const u0e={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let Z6=class extends et{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=Vt.state.open,this.unsubscribe.push(Vt.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=Vt.state,n=u0e[t];return ne` + + `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout(()=>Vt.hide(),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Z6.styles=l0e;pj([ge()],Z6.prototype,"open",void 0);Z6=pj([Re("w3m-snackbar")],Z6);const h0e=Dt` + wui-separator { + margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1); + width: calc(100% + var(--wui-spacing-s) * 2); + } + + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + } + + wui-icon-link, + wui-loading-spinner { + position: absolute; + top: 50%; + transform: translateY(-50%); + } + + wui-icon-link { + right: var(--wui-spacing-xs); + } + + wui-loading-spinner { + right: var(--wui-spacing-m); + } +`;var Gy=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 n1=class extends et{constructor(){super(),this.unsubscribe=[],this.formRef=Nv(),this.connectors=Mt.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",t=>{t.key==="Enter"&&this.onSubmitEmail(t)})}render(){const e=this.connectors.find(n=>n.type==="AUTH"),t=this.connectors.length>1;return e!=null&&e.email?ne` +
+ + + + ${this.submitButtonTemplate()}${this.loadingTemplate()} + +
+ + ${e.socials||!t?null:ne` + + `} + `:null}submitButtonTemplate(){return!this.loading&&this.email.length>3?ne` + + + `:null}loadingTemplate(){return this.loading?ne``:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){if(![vn.CHAIN.EVM,vn.CHAIN.SOLANA].find(i=>i===st.state.activeChain)){Te.push("SwitchActiveChain",{switchToChain:vn.CHAIN.EVM});return}try{if(this.loading)return;this.loading=!0,e.preventDefault();const i=Mt.getAuthConnector();if(!i)throw new Error("w3m-email-login-widget: Auth connector not found");const{action:s}=await i.provider.connectEmail({email:this.email});It.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),s==="VERIFY_OTP"?(It.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),Te.push("EmailVerifyOtp",{email:this.email})):s==="VERIFY_DEVICE"&&Te.push("EmailVerifyDevice",{email:this.email})}catch(i){const s=ot.parseError(i);s!=null&&s.includes("Invalid email")?this.error="Invalid email. Try again.":Vt.showError(i)}finally{this.loading=!1}}onFocusEvent(){It.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};n1.styles=h0e;Gy([ge()],n1.prototype,"connectors",void 0);Gy([ge()],n1.prototype,"email",void 0);Gy([ge()],n1.prototype,"loading",void 0);Gy([ge()],n1.prototype,"error",void 0);n1=Gy([Re("w3m-email-login-widget")],n1);const d0e=Dt` + wui-flex { + width: 100%; + } + + :host > wui-flex:first-child { + transform: translateY(calc(var(--wui-spacing-xxs) * -1)); + } + + wui-icon-link { + margin-right: calc(var(--wui-icon-box-size-md) * -1); + } + + wui-notice-card { + margin-bottom: var(--wui-spacing-3xs); + } + + wui-list-item > wui-text { + flex: 1; + } + + w3m-transactions-view { + max-height: 200px; + } + + .tab-content-container { + height: 300px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + .tab-content-container::-webkit-scrollbar { + display: none; + } + + .account-button { + width: auto; + border: none; + display: flex; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-s); + height: 48px; + padding: var(--wui-spacing-xs); + padding-right: var(--wui-spacing-s); + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002); + background-color: var(--wui-color-gray-glass-002); + border-radius: 24px; + transition: background-color 0.2s linear; + } + + .account-button:hover { + background-color: var(--wui-color-gray-glass-005); + } + + .avatar-container { + position: relative; + } + + wui-avatar.avatar { + width: 32px; + height: 32px; + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + } + + wui-avatar.network-avatar { + width: 16px; + height: 16px; + position: absolute; + left: 100%; + top: 100%; + transform: translate(-75%, -75%); + box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005); + } + + .account-links { + display: flex; + justify-content: space-between; + align-items: center; + } + + .account-links wui-flex { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + flex: 1; + background: red; + align-items: center; + justify-content: center; + height: 48px; + padding: 10px; + flex: 1 0 0; + border-radius: var(--XS, 16px); + border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + transition: + background-color var(--wui-ease-out-power-1) var(--wui-duration-md), + opacity var(--wui-ease-out-power-1) var(--wui-duration-md); + will-change: background-color, opacity; + } + + .account-links wui-flex:hover { + background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); + } + + .account-links wui-flex wui-icon { + width: var(--S, 20px); + height: var(--S, 20px); + } + + .account-links wui-flex wui-icon svg path { + stroke: #667dff; + } +`;var C1=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 gd=class extends et{constructor(){super(),this.unsubscribe=[],this.address=De.state.address,this.profileImage=De.state.profileImage,this.profileName=De.state.profileName,this.disconnecting=!1,this.balance=De.state.balance,this.balanceSymbol=De.state.balanceSymbol,this.unsubscribe.push(De.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):this.disconnecting||Vt.showError("Account not found")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");return ne` + ${st.state.activeChain===vn.CHAIN.EVM?this.multiAccountTemplate():this.singleAccountTemplate()} + + + ${ot.formatBalance(this.balance,this.balanceSymbol)} + + + ${this.explorerBtnTemplate()} + + + + ${this.authCardTemplate()} + ${this.onrampTemplate()} ${this.swapsTemplate()} ${this.activityTemplate()} + + Disconnect + + `}onrampTemplate(){const{enableOnramp:e}=bt.state,t=st.state.activeChain===vn.CHAIN.SOLANA;return!e||t?null:ne` + + Buy crypto + + `}activityTemplate(){const e=st.state.activeChain===vn.CHAIN.SOLANA;return ne` + Activity + ${e?ne`Coming soon`:""} + `}swapsTemplate(){const{enableSwaps:e}=bt.state;return!e||st.state.activeChain===vn.CHAIN.SOLANA?null:ne` + + Swap + + `}authCardTemplate(){const e=en.getConnectedConnector(),t=Mt.getAuthConnector(),{origin:n}=location;return!t||e!=="AUTH"||n.includes(Ci.SECURE_SITE)?null:ne` + + `}handleSwitchAccountsView(){Te.push("SwitchAddress")}handleClickPay(){Te.push("OnRampProviders")}handleClickSwap(){Te.push("Swap")}explorerBtnTemplate(){return De.state.addressExplorerUrl?ne` + + + Block Explorer + + + `:null}singleAccountTemplate(){return ne` + + + + + ${this.profileName?Qt.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):Qt.getTruncateString({string:this.address?this.address:"",charsStart:4,charsEnd:4,truncate:"middle"})} + + + `}multiAccountTemplate(){var n;if(!this.address)throw new Error("w3m-account-view: No account provided");const e=(n=De.state.allAccounts)==null?void 0:n.find(i=>i.address===this.address),t=De.state.addressLabels.get(this.address);return ne` + + `}onCopyAddress(){try{this.address&&(ot.copyToClopboard(this.address),Vt.showSuccess("Address copied"))}catch{Vt.showError("Failed to copy")}}onTransactions(){It.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await or.disconnect(),It.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),nr.close()}catch{It.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Vt.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const e=De.state.addressExplorerUrl;e&&ot.openHref(e,"_blank")}onGoToUpgradeView(){It.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),Te.push("UpgradeEmailWallet")}};gd.styles=d0e;C1([ge()],gd.prototype,"address",void 0);C1([ge()],gd.prototype,"profileImage",void 0);C1([ge()],gd.prototype,"profileName",void 0);C1([ge()],gd.prototype,"disconnecting",void 0);C1([ge()],gd.prototype,"balance",void 0);C1([ge()],gd.prototype,"balanceSymbol",void 0);gd=C1([Re("w3m-account-default-widget")],gd);const f0e=Dt` + wui-flex { + width: 100%; + } + + wui-promo { + position: absolute; + top: -32px; + } + + wui-profile-button { + margin-top: calc(-1 * var(--wui-spacing-2l)); + } + + wui-promo + wui-profile-button { + margin-top: var(--wui-spacing-2l); + } + + wui-tabs { + width: 100%; + } + + .contentContainer { + height: 280px; + } + + .contentContainer > wui-icon-box { + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-xxs); + } + + .contentContainer > .textContent { + width: 65%; + } +`;var Yu=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};const p0e=3,g0e=48,m0e=430;let mc=class extends et{constructor(){super(),this.unsubscribe=[],this.address=De.state.address,this.profileImage=De.state.profileImage,this.profileName=De.state.profileName,this.smartAccountDeployed=De.state.smartAccountDeployed,this.network=it.state.caipNetwork,this.currentTab=De.state.currentTab,this.tokenBalance=De.state.tokenBalance,this.preferredAccountType=De.state.preferredAccountType,this.unsubscribe.push(De.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):nr.close()}),it.subscribeKey("caipNetwork",e=>{this.network=e})),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}firstUpdated(){De.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=Lr.getNetworkImage(this.network);return ne` + ${this.network&&ne``} + ${this.activateAccountTemplate()} + + ${this.tokenBalanceTemplate()} + + + + + ${this.swapsTemplate()} + + + + + + + + + + + ${this.listContentTemplate()} + `}swapsTemplate(){const{enableSwaps:e}=bt.state;return e?ne` + + + + + `:null}watchSwapValues(){this.watchTokenBalance=setInterval(()=>De.fetchTokenBalance(),1e4)}listContentTemplate(){return this.currentTab===0?ne``:this.currentTab===1?ne``:this.currentTab===2?ne``:ne``}tokenBalanceTemplate(){var e;if(this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>=0){const t=ot.calculateBalance(this.tokenBalance),{dollars:n="0",pennies:i="00"}=ot.formatTokenBalance(t);return ne``}return ne``}activateAccountTemplate(){return!it.checkIfSmartAccountEnabled()||this.preferredAccountType!==_r.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:ne` `}onTabChange(e){De.setCurrentTab(e)}onProfileButtonClick(){Te.push("Profile")}onBuyClick(){Te.push("OnRampProviders")}onSwapClick(){var e,t,n;(e=this.network)!=null&&e.id&&!Ci.SWAP_SUPPORTED_NETWORKS.includes((t=this.network)==null?void 0:t.id)?Te.push("UnsupportedChain",{swapUnsupportedChain:!0}):(It.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:((n=this.network)==null?void 0:n.id)||"",isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("Swap"))}onReceiveClick(){Te.push("WalletReceive")}onSendClick(){var e;It.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:((e=this.network)==null?void 0:e.id)||"",isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("WalletSend")}onUpdateToSmartAccount(){Te.push("UpgradeToSmartAccount")}};mc.styles=f0e;Yu([ge()],mc.prototype,"watchTokenBalance",void 0);Yu([ge()],mc.prototype,"address",void 0);Yu([ge()],mc.prototype,"profileImage",void 0);Yu([ge()],mc.prototype,"profileName",void 0);Yu([ge()],mc.prototype,"smartAccountDeployed",void 0);Yu([ge()],mc.prototype,"network",void 0);Yu([ge()],mc.prototype,"currentTab",void 0);Yu([ge()],mc.prototype,"tokenBalance",void 0);Yu([ge()],mc.prototype,"preferredAccountType",void 0);mc=Yu([Re("w3m-account-wallet-features-widget")],mc);const w0e=Dt` + :host { + width: 100%; + max-height: 280px; + overflow: scroll; + scrollbar-width: none; + } + + :host::-webkit-scrollbar { + display: none; + } +`;var v0e=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 tC=class extends et{render(){return ne``}};tC.styles=w0e;tC=v0e([Re("w3m-account-activity-widget")],tC);const y0e=Dt` + .contentContainer { + height: 280px; + } + + .contentContainer > wui-icon-box { + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-xxs); + } + + .contentContainer > .textContent { + width: 65%; + } +`;var b0e=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 rC=class extends et{render(){return ne`${this.nftTemplate()}`}nftTemplate(){return ne` + + + Coming soon + Stay tuned for our upcoming NFT feature + + Receive funds + `}onReceiveClick(){Te.push("WalletReceive")}};rC.styles=y0e;rC=b0e([Re("w3m-account-nfts-widget")],rC);const _0e=Dt` + :host { + width: 100%; + } + + wui-flex { + width: 100%; + } + + .contentContainer { + max-height: 280px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } +`;var gj=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 Y6=class extends et{constructor(){super(),this.unsubscribe=[],this.tokenBalance=De.state.tokenBalance,this.unsubscribe.push(De.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne`${this.tokenTemplate()}`}tokenTemplate(){var e;return this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>0?ne` + ${this.tokenItemTemplate()} + `:ne` `}tokenItemTemplate(){var e;return(e=this.tokenBalance)==null?void 0:e.map(t=>ne``)}onReceiveClick(){Te.push("WalletReceive")}onBuyClick(){It.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}),Te.push("OnRampProviders")}};Y6.styles=_0e;gj([ge()],Y6.prototype,"tokenBalance",void 0);Y6=gj([Re("w3m-account-tokens-widget")],Y6);const x0e=Dt` + :host { + min-height: 100%; + } + + .group-container[last-group='true'] { + padding-bottom: var(--wui-spacing-m); + } + + .contentContainer { + height: 280px; + } + + .contentContainer > wui-icon-box { + width: 40px; + height: 40px; + border-radius: var(--wui-border-radius-xxs); + } + + .contentContainer > .textContent { + width: 65%; + } + + .emptyContainer { + height: 100%; + } +`;var S1=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};const F5="last-transaction",A0e=7;let md=class extends et{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.address=De.state.address,this.transactionsByYear=Pi.state.transactionsByYear,this.loading=Pi.state.loading,this.empty=Pi.state.empty,this.next=Pi.state.next,Pi.clearCursor(),this.unsubscribe.push(De.subscribe(e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,Pi.resetTransactions(),Pi.fetchTransactions(e.address))}),it.subscribeKey("caipNetwork",()=>{this.updateTransactionView()}),Pi.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return ne` ${this.empty?null:this.templateTransactionsByYear()} + ${this.loading?this.templateLoading():null} + ${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){var n;const e=(n=it.state.caipNetwork)==null?void 0:n.id;Pi.state.lastNetworkInView!==e&&(Pi.resetTransactions(),Pi.fetchTransactions(this.address)),Pi.setLastNetworkInView(e)}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(t=>{const n=parseInt(t,10),i=new Array(12).fill(null).map((s,o)=>{var l;const a=K0.getTransactionGroupTitle(n,o),c=(l=this.transactionsByYear[n])==null?void 0:l[o];return{groupTitle:a,transactions:c}}).filter(({transactions:s})=>s).reverse();return i.map(({groupTitle:s,transactions:o},a)=>{const c=a===i.length-1;return o?ne` + + + ${s} + + + ${this.templateTransactions(o,c)} + + + `:null})})}templateRenderTransaction(e,t){const{date:n,descriptions:i,direction:s,isAllNFT:o,images:a,status:c,transfers:l,type:h}=this.getTransactionListItemProps(e),f=(l==null?void 0:l.length)>1;return(l==null?void 0:l.length)===2&&!o?ne` + + `:f?l.map((y,A)=>{const M=K0.getTransferDescription(y),$=t&&A===l.length-1;return ne` `}):ne` + + `}templateTransactions(e,t){return e.map((n,i)=>{const s=t&&i===e.length-1;return ne`${this.templateRenderTransaction(n,s)}`})}emptyStateActivity(){return ne` + + + No Transactions yet + Start trading on dApps
+ to grow your wallet!
+
+
`}emptyStateAccount(){return ne` + + + No activity yet + Your next transactions will appear here + + Trade + `}templateEmpty(){return this.page==="account"?ne`${this.emptyStateAccount()}`:ne`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?Array(A0e).fill(ne` `).map(e=>e):null}onReceiveClick(){Te.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=bt.state;this.paginationObserver=new IntersectionObserver(([t])=>{t!=null&&t.isIntersecting&&!this.loading&&(Pi.fetchTransactions(this.address),It.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next,isSmartAccount:De.state.preferredAccountType===_r.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var t,n,i;(t=this.paginationObserver)==null||t.disconnect();const e=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${F5}`);e&&((i=this.paginationObserver)==null||i.observe(e))}getTransactionListItemProps(e){var c,l,h,f,v;const t=nI.formatDate((c=e==null?void 0:e.metadata)==null?void 0:c.minedAt),n=K0.getTransactionDescriptions(e),i=e==null?void 0:e.transfers,s=(l=e==null?void 0:e.transfers)==null?void 0:l[0],o=!!s&&((h=e==null?void 0:e.transfers)==null?void 0:h.every(y=>!!y.nft_info)),a=K0.getTransactionImages(i);return{date:t,direction:s==null?void 0:s.direction,descriptions:n,isAllNFT:o,images:a,status:(f=e.metadata)==null?void 0:f.status,transfers:i,type:(v=e.metadata)==null?void 0:v.operationType}}};md.styles=x0e;S1([kt()],md.prototype,"page",void 0);S1([ge()],md.prototype,"address",void 0);S1([ge()],md.prototype,"transactionsByYear",void 0);S1([ge()],md.prototype,"loading",void 0);S1([ge()],md.prototype,"empty",void 0);S1([ge()],md.prototype,"next",void 0);md=S1([Re("w3m-activity-list")],md);const E0e=Dt` + :host { + width: 100%; + height: 100px; + border-radius: var(--wui-border-radius-s); + border: 1px solid var(--wui-color-gray-glass-002); + background-color: var(--wui-color-gray-glass-002); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); + will-change: background-color; + } + + :host(:hover) { + background-color: var(--wui-color-gray-glass-005); + } + + wui-flex { + width: 100%; + height: fit-content; + } + + wui-button { + width: 100%; + display: flex; + justify-content: flex-end; + } + + wui-input-amount { + mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + } + + .totalValue { + width: 100%; + } +`;var k_=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 Ew=class extends et{render(){return ne` + + + ${this.buttonTemplate()} + + + ${this.sendValueTemplate()} + + ${this.maxAmountTemplate()} ${this.actionTemplate()} + + + `}buttonTemplate(){return this.token?ne` + `:ne`Select token`}handleSelectButtonClick(){Te.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const t=this.token.price*this.sendTokenAmount;return ne`${t?`$${Qt.formatNumberToLocalString(t,2)}`:"Incorrect value"}`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?ne` + ${Qt.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:ne` + ${Qt.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?ne`Buy`:ne`Max`:null}onInputChange(e){an.setTokenAmount(e.detail)}onMaxClick(){if(this.token&&this.gasPriceInUSD){const e=qr.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.token.price),n=this.token.address===void 0?qr.bigNumber(this.token.quantity.numeric).minus(e):qr.bigNumber(this.token.quantity.numeric);an.setTokenAmount(Number(n.toFixed(20)))}}onBuyClick(){Te.push("OnRampProviders")}};Ew.styles=E0e;k_([kt({type:Object})],Ew.prototype,"token",void 0);k_([kt({type:Number})],Ew.prototype,"sendTokenAmount",void 0);k_([kt({type:Number})],Ew.prototype,"gasPriceInUSD",void 0);Ew=k_([Re("w3m-input-token")],Ew);const C0e=Dt` + :host { + width: 100%; + height: 100px; + border-radius: var(--wui-border-radius-s); + border: 1px solid var(--wui-color-gray-glass-002); + background-color: var(--wui-color-gray-glass-002); + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); + will-change: background-color; + position: relative; + } + + :host(:hover) { + background-color: var(--wui-color-gray-glass-005); + } + + wui-flex { + width: 100%; + height: fit-content; + } + + wui-button { + display: ruby; + color: var(--wui-color-fg-100); + margin: 0 var(--wui-spacing-xs); + } + + .instruction { + position: absolute; + top: 50%; + transform: translateY(-50%); + z-index: 2; + } + + .paste { + display: inline-flex; + } + + textarea { + background: transparent; + width: 100%; + font-family: var(--w3m-font-family); + font-size: var(--wui-font-size-medium); + font-style: normal; + font-weight: var(--wui-font-weight-light); + line-height: 130%; + letter-spacing: var(--wui-letter-spacing-medium); + color: var(--wui-color-fg-100); + caret-color: var(--wui-color-accent-100); + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + border: none; + outline: none; + appearance: none; + resize: none; + overflow: hidden; + } +`;var N_=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 Cw=class extends et{constructor(){super(...arguments),this.inputElementRef=Nv(),this.instructionElementRef=Nv(),this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=ot.debounce(async e=>{const t=await or.getEnsAddress(e);if(an.setLoading(!1),t){an.setReceiverProfileName(e),an.setReceiverAddress(t);const n=await or.getEnsAvatar(e);n&&an.setReceiverProfileImageUrl(n)}else an.setReceiverAddress(e),an.setReceiverProfileName(void 0),an.setReceiverProfileImageUrl(void 0)})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return ne` + + Type or + + + Paste + + address + + + `}async focusInput(){var e;this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",(e=this.inputElementRef.value)==null||e.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){var e;this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",(e=this.inputElementRef.value)==null||e.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.value&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.value&&this.instructionHidden&&!this.pasting&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;const e=await navigator.clipboard.readText();an.setReceiverAddress(e),this.focusInput()}onInputChange(e){this.pasting=!1;const t=e.target;t.value&&!this.instructionHidden&&this.focusInput(),an.setLoading(!0),this.onDebouncedSearch(t.value)}};Cw.styles=C0e;N_([kt()],Cw.prototype,"value",void 0);N_([ge()],Cw.prototype,"instructionHidden",void 0);N_([ge()],Cw.prototype,"pasting",void 0);Cw=N_([Re("w3m-input-address")],Cw);const S0e=Dt` + :host { + display: flex; + width: auto; + flex-direction: column; + gap: var(--wui-border-radius-1xs); + border-radius: var(--wui-border-radius-s); + background: var(--wui-color-gray-glass-002); + padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs) + var(--wui-spacing-1xs); + } + + wui-text { + padding: 0 var(--wui-spacing-1xs); + } + + wui-flex { + margin-top: var(--wui-spacing-1xs); + } + + .network { + cursor: pointer; + transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg); + will-change: background-color; + } + + .network:focus-visible { + border: 1px solid var(--wui-color-accent-100); + background-color: var(--wui-color-gray-glass-005); + -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue); + } + + .network:hover { + background-color: var(--wui-color-gray-glass-005); + } + + .network:active { + background-color: var(--wui-color-gray-glass-010); + } +`;var P_=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 Sw=class extends et{render(){return ne` Details + + + + + ${this.networkTemplate()} + `}networkTemplate(){var e;return(e=this.caipNetwork)!=null&&e.name?ne` this.onNetworkClick(this.caipNetwork)} + class="network" + textTitle="Network" + imageSrc=${Lt(Lr.getNetworkImage(this.caipNetwork))} + >`:null}onNetworkClick(e){e&&Te.push("Networks",{network:e})}};Sw.styles=S0e;P_([kt()],Sw.prototype,"receiverAddress",void 0);P_([kt({type:Object})],Sw.prototype,"caipNetwork",void 0);P_([kt({type:Number})],Sw.prototype,"networkFee",void 0);Sw=P_([Re("w3m-wallet-send-details")],Sw);const I0e=Dt` + :host { + pointer-events: none; + } + + :host > wui-flex { + display: var(--w3m-tooltip-display); + opacity: var(--w3m-tooltip-opacity); + padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s); + border-radius: var(--wui-border-radius-xxs); + color: var(--wui-color-bg-100); + position: fixed; + top: var(--w3m-tooltip-top); + left: var(--w3m-tooltip-left); + transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); + max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl)); + transition: opacity 0.2s var(--wui-ease-out-power-2); + will-change: opacity; + } + + :host([data-variant='shade']) > wui-flex { + background-color: var(--wui-color-bg-150); + border: 1px solid var(--wui-color-gray-glass-005); + } + + :host([data-variant='shade']) > wui-flex > wui-text { + color: var(--wui-color-fg-150); + } + + :host([data-variant='fill']) > wui-flex { + background-color: var(--wui-color-fg-100); + border: none; + } + + wui-icon { + position: absolute; + width: 12px !important; + height: 4px !important; + color: var(--wui-color-bg-150); + } + + wui-icon[data-placement='top'] { + bottom: 0px; + left: 50%; + transform: translate(-50%, 95%); + } + + wui-icon[data-placement='bottom'] { + top: 0; + left: 50%; + transform: translate(-50%, -95%) rotate(180deg); + } + + wui-icon[data-placement='right'] { + top: 50%; + left: 0; + transform: translate(-65%, -50%) rotate(90deg); + } + + wui-icon[data-placement='left'] { + top: 50%; + right: 0%; + transform: translate(65%, -50%) rotate(270deg); + } +`;var Zy=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 i1=class extends et{constructor(){super(),this.unsubscribe=[],this.open=aa.state.open,this.message=aa.state.message,this.triggerRect=aa.state.triggerRect,this.variant=aa.state.variant,this.unsubscribe.push(aa.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=` + --w3m-tooltip-top: ${e}px; + --w3m-tooltip-left: ${t}px; + --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; + --w3m-tooltip-display: ${this.open?"flex":"none"}; + --w3m-tooltip-opacity: ${this.open?1:0}; + `,ne` + + ${this.message} + `}};i1.styles=[I0e];Zy([ge()],i1.prototype,"open",void 0);Zy([ge()],i1.prototype,"message",void 0);Zy([ge()],i1.prototype,"triggerRect",void 0);Zy([ge()],i1.prototype,"variant",void 0);i1=Zy([Re("w3m-tooltip")],i1);const T0e=Dt` + :host { + width: 100%; + display: block; + } +`;var KI=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 Lv=class extends et{constructor(){super(),this.unsubscribe=[],this.text="",this.open=aa.state.open,this.unsubscribe.push(Te.subscribeKey("view",()=>{aa.hide()}),nr.subscribeKey("open",e=>{e||aa.hide()}),aa.subscribeKey("open",e=>{this.open=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),aa.hide()}render(){return ne` +
+ ${this.renderChildren()} +
+ `}renderChildren(){return ne` `}onMouseEnter(){const e=this.getBoundingClientRect();this.open||aa.showTooltip({message:this.text,triggerRect:{width:e.width,height:e.height,left:e.left,top:e.top},variant:"shade"})}onMouseLeave(e){this.contains(e.relatedTarget)||aa.hide()}};Lv.styles=[T0e];KI([kt()],Lv.prototype,"text",void 0);KI([ge()],Lv.prototype,"open",void 0);Lv=KI([Re("w3m-tooltip-trigger")],Lv);const R0e=Dt` + :host > wui-flex:first-child { + margin-top: var(--wui-spacing-s); + } + wui-separator { + margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-m) + calc(var(--wui-spacing-m) * -1); + width: calc(100% + var(--wui-spacing-s) * 2); + } +`;var mj=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};const mO=2,wO=6;let Q6=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.connector=this.connectors.find(e=>e.type==="AUTH"),this.unsubscribe.push(Mt.subscribeKey("connectors",e=>{this.connectors=e,this.connector=this.connectors.find(t=>t.type==="AUTH")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.connector?ne` + + ${this.topViewTemplate()}${this.bottomViewTemplate()} + + ${this.separatorTemplate()} + `:null}topViewTemplate(){var e,t,n,i;return(t=(e=this.connector)==null?void 0:e.socials)!=null&&t.length?this.connector.socials.length===2?ne` + ${this.connector.socials.slice(0,mO).map(s=>ne`{this.onSocialClick(s)}} + logo=${s} + >`)} + `:ne` {var s,o;this.onSocialClick((o=(s=this.connector)==null?void 0:s.socials)==null?void 0:o[0])}} + logo=${Lt(this.connector.socials[0])} + align="center" + name=${`Continue with ${this.connector.socials[0]}`} + >`:null}bottomViewTemplate(){var e,t,n,i;return!((t=(e=this.connector)==null?void 0:e.socials)!=null&&t.length)||((n=this.connector)==null?void 0:n.socials.length)<=mO?null:((i=this.connector)==null?void 0:i.socials.length)>wO?ne` + ${this.connector.socials.slice(1,wO-1).map(s=>ne`{this.onSocialClick(s)}} + logo=${s} + >`)} + + `:ne` + ${this.connector.socials.slice(1,this.connector.socials.length).map(s=>ne`{this.onSocialClick(s)}} + logo=${s} + >`)} + `}separatorTemplate(){return this.connectors.find(t=>t.type==="WALLET_CONNECT")?ne``:null}onMoreSocialsClick(){Te.push("ConnectSocials")}async onSocialClick(e){var t,n;if(e&&(De.setSocialProvider(e,st.state.activeChain),It.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}})),e===a6.Farcaster){Te.push("ConnectingFarcaster");const i=Mt.getAuthConnector();if(i&&!De.state.farcasterUrl)try{const{url:s}=await i.provider.getFarcasterUri();De.setFarcasterUrl(s,st.state.activeChain)}catch(s){Te.goBack(),Vt.showError(s)}}else{Te.push("ConnectingSocial");const i=Mt.getAuthConnector();this.popupWindow=ot.returnOpenHref("","popupWindow","width=600,height=800,scrollbars=yes");try{if(i&&e){const{uri:s}=await i.provider.getSocialRedirectUri({provider:e});if(this.popupWindow&&s)De.setSocialWindow(this.popupWindow,st.state.activeChain),this.popupWindow.location.href=s;else throw(t=this.popupWindow)==null||t.close(),new Error("Something went wrong")}}catch{(n=this.popupWindow)==null||n.close(),Vt.showError("Something went wrong")}}}};Q6.styles=R0e;mj([ge()],Q6.prototype,"connectors",void 0);Q6=mj([Re("w3m-social-login-widget")],Q6);var k0e=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 vO=class extends et{render(){return ne` + + + + + `}};vO=k0e([Re("w3m-wallet-login-list")],vO);const N0e=Dt` + :host { + margin-top: var(--wui-spacing-3xs); + } + wui-separator { + margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) + calc(var(--wui-spacing-m) * -1); + width: calc(100% + var(--wui-spacing-s) * 2); + } +`;var wj=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 J6=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.connector=this.connectors.find(e=>e.type==="AUTH"),this.unsubscribe.push(Mt.subscribeKey("connectors",e=>{this.connectors=e,this.connector=this.connectors.find(t=>t.type==="AUTH")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return(e=this.connector)!=null&&e.socials?ne` + ${this.connector.socials.map(t=>ne`{this.onSocialClick(t)}} + name=${t} + logo=${t} + >`)} + `:null}async onSocialClick(e){var t,n;if(e&&(De.setSocialProvider(e,st.state.activeChain),It.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}})),e===a6.Farcaster){Te.push("ConnectingFarcaster");const i=Mt.getAuthConnector();if(i&&!De.state.farcasterUrl)try{const{url:s}=await i.provider.getFarcasterUri();De.setFarcasterUrl(s,st.state.activeChain)}catch(s){Te.goBack(),Vt.showError(s)}}else{Te.push("ConnectingSocial");const i=Mt.getAuthConnector();this.popupWindow=ot.returnOpenHref("","popupWindow","width=600,height=800,scrollbars=yes");try{if(i&&e){const{uri:s}=await i.provider.getSocialRedirectUri({provider:e});if(this.popupWindow&&s)De.setSocialWindow(this.popupWindow,st.state.activeChain),this.popupWindow.location.href=s;else throw(t=this.popupWindow)==null||t.close(),new Error("Something went wrong")}}catch{(n=this.popupWindow)==null||n.close(),Vt.showError("Something went wrong")}}}};J6.styles=N0e;wj([ge()],J6.prototype,"connectors",void 0);J6=wj([Re("w3m-social-login-list")],J6);var vj=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 nC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.filter(t=>t.type==="ANNOUNCED");return e!=null&&e.length?ne` + + ${e.map(t=>{var n,i;return(n=t.info)!=null&&n.rdns&&Yt.state.excludedRDNS&&Yt.state.excludedRDNS.includes((i=t==null?void 0:t.info)==null?void 0:i.rdns)?null:ne` + this.onConnector(t)} + tagVariant="success" + tagLabel="installed" + data-testid=${`wallet-selector-${t.id}`} + .installed=${!0} + > + + `})} + + `:(this.style.cssText="display: none",null)}onConnector(e){e.type==="WALLET_CONNECT"?ot.isMobile()?Te.push("AllWallets"):Te.push("ConnectingWalletConnect"):Te.push("ConnectingExternal",{connector:e})}};vj([ge()],nC.prototype,"connectors",void 0);nC=vj([Re("w3m-connect-announced-widget")],nC);var yj=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 iC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{customWallets:e}=bt.state;if(!(e!=null&&e.length))return this.style.cssText="display: none",null;const t=this.filterOutDuplicateWallets(e);return ne` + ${t.map(n=>ne` + this.onConnectWallet(n)} + data-testid=${`wallet-selector-${n.id}`} + > + + `)} + `}filterOutDuplicateWallets(e){const t=en.getRecentWallets(),n=this.connectors.map(a=>{var c;return(c=a.info)==null?void 0:c.rdns}).filter(Boolean),i=t.map(a=>a.rdns).filter(Boolean),s=n.concat(i);if(s.includes("io.metamask.mobile")&&ot.isMobile()){const a=s.indexOf("io.metamask.mobile");s[a]="io.metamask"}return e.filter(a=>!s.includes(String(a==null?void 0:a.rdns)))}onConnectWallet(e){Te.push("ConnectingWalletConnect",{wallet:e})}};yj([ge()],iC.prototype,"connectors",void 0);iC=yj([Re("w3m-connect-custom-widget")],iC);const X6={filterOutDuplicatesByRDNS(r){const e=bt.state.enableEIP6963?Mt.state.connectors:[],t=en.getRecentWallets(),n=e.map(a=>{var c;return(c=a.info)==null?void 0:c.rdns}).filter(Boolean),i=t.map(a=>a.rdns).filter(Boolean),s=n.concat(i);if(s.includes("io.metamask.mobile")&&ot.isMobile()){const a=s.indexOf("io.metamask.mobile");s[a]="io.metamask"}return r.filter(a=>!s.includes(String(a==null?void 0:a.rdns)))},filterOutDuplicatesByIds(r){const e=Mt.state.connectors,t=en.getRecentWallets(),n=e.map(a=>a.explorerId),i=t.map(a=>a.id),s=n.concat(i);return r.filter(a=>!s.includes(a==null?void 0:a.id))},filterOutDuplicateWallets(r){const e=this.filterOutDuplicatesByRDNS(r);return this.filterOutDuplicatesByIds(e)}};var P0e=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 yO=class extends et{constructor(){super(...arguments),this.unsubscribe=[]}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{featured:e}=Yt.state;if(!e.length)return this.style.cssText="display: none",null;const t=X6.filterOutDuplicateWallets(e);return ne` + + ${t.map(n=>ne` + this.onConnectWallet(n)} + > + + `)} + + `}onConnectWallet(e){const t=Mt.getConnector(e.id,e.rdns);t?Te.push("ConnectingExternal",{connector:t}):Te.push("ConnectingWalletConnect",{wallet:e})}};yO=P0e([Re("w3m-connect-featured-widget")],yO);var bj=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 sC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var t;const e=this.connectors.filter(n=>n.type==="INJECTED");return!(e!=null&&e.length)||e.length===1&&((t=e[0])==null?void 0:t.name)==="Browser Wallet"&&!ot.isMobile()?(this.style.cssText="display: none",null):ne` + + ${e.map(n=>{var i,s;return!ot.isMobile()&&n.name==="Browser Wallet"?null:or.checkInstalled(void 0,n.chain)?(i=n.info)!=null&&i.rdns&&Yt.state.excludedRDNS&&Yt.state.excludedRDNS.includes((s=n==null?void 0:n.info)==null?void 0:s.rdns)?null:ne` + this.onConnector(n)} + > + + `:(this.style.cssText="display: none",null)})} + + `}onConnector(e){st.setActiveConnector(e),Te.push("ConnectingExternal",{connector:e})}};bj([ge()],sC.prototype,"connectors",void 0);sC=bj([Re("w3m-connect-injected-widget")],sC);var _j=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 oC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.filter(t=>t.type==="MULTI_CHAIN"&&t.name!=="WalletConnect");return e!=null&&e.length?ne` + + ${e.map(t=>ne` + this.onConnector(t)} + > + + `)} + + `:(this.style.cssText="display: none",null)}onConnector(e){st.setActiveConnector(e),Te.push("ConnectingMultiChain")}};_j([ge()],oC.prototype,"connectors",void 0);oC=_j([Re("w3m-connect-multi-chain-widget")],oC);var xj=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 aC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const t=this.connectors.filter(n=>n.type==="EXTERNAL").filter(n=>n.id!=="coinbaseWalletSDK");return t!=null&&t.length?ne` + + ${t.map(n=>ne` + this.onConnector(n)} + > + + `)} + + `:(this.style.cssText="display: none",null)}onConnector(e){Te.push("ConnectingExternal",{connector:e})}};xj([ge()],aC.prototype,"connectors",void 0);aC=xj([Re("w3m-connect-external-widget")],aC);var O0e=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 bO=class extends et{render(){const e=en.getRecentWallets();return e!=null&&e.length?ne` + + ${e.map(t=>ne` + this.onConnectWallet(t)} + tagLabel="recent" + tagVariant="shade" + > + + `)} + + `:(this.style.cssText="display: none",null)}onConnectWallet(e){Te.push("ConnectingWalletConnect",{wallet:e})}};bO=O0e([Re("w3m-connect-recent-widget")],bO);var Aj=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 cC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.connectors.find(v=>v.type==="WALLET_CONNECT"))return null;const{recommended:t}=Yt.state,{customWallets:n,featuredWalletIds:i}=bt.state,{connectors:s}=Mt.state,o=en.getRecentWallets(),c=s.filter(v=>v.type==="INJECTED"||v.type==="ANNOUNCED").filter(v=>v.name!=="Browser Wallet");if(i||n||!t.length)return this.style.cssText="display: none",null;const l=c.length+o.length,h=Math.max(0,2-l),f=X6.filterOutDuplicateWallets(t).slice(0,h);return f.length?ne` + + ${f.map(v=>ne` + this.onConnectWallet(v)} + > + + `)} + + `:(this.style.cssText="display: none",null)}onConnectWallet(e){const t=Mt.getConnector(e.id,e.rdns);t?Te.push("ConnectingExternal",{connector:t}):Te.push("ConnectingWalletConnect",{wallet:e})}};Aj([ge()],cC.prototype,"connectors",void 0);cC=Aj([Re("w3m-connect-recommended-widget")],cC);var Ej=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 lC=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(ot.isMobile())return this.style.cssText="display: none",null;const e=this.connectors.find(t=>t.type==="WALLET_CONNECT");return e?ne` + this.onConnector(e)} + tagLabel="qr code" + tagVariant="main" + data-testid="wallet-selector-walletconnect" + > + + `:(this.style.cssText="display: none",null)}onConnector(e){e.type==="WALLET_CONNECT"?ot.isMobile()?Te.push("AllWallets"):Te.push("ConnectingWalletConnect"):Te.push("ConnectingExternal",{connector:e})}};Ej([ge()],lC.prototype,"connectors",void 0);lC=Ej([Re("w3m-connect-walletconnect-widget")],lC);const M0e=Dt` + :host { + margin-top: var(--wui-spacing-3xs); + } + wui-separator { + margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs) + calc(var(--wui-spacing-m) * -1); + width: calc(100% + var(--wui-spacing-s) * 2); + } +`;var Cj=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 e8=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{custom:e,recent:t,announced:n,injected:i,multiChain:s,recommended:o,featured:a,external:c}=this.getConnectorsByType();return ne` + + + ${t.length?ne``:null} + ${s.length?ne``:null} + ${n.length?ne``:null} + ${i.length?ne``:null} + ${a.length?ne``:null} + ${e!=null&&e.length?ne``:null} + ${c.length?ne``:null} + ${o.length?ne``:null} + + `}getConnectorsByType(){const{featured:e,recommended:t}=Yt.state,{customWallets:n}=bt.state,i=en.getRecentWallets(),s=X6.filterOutDuplicateWallets(t),o=X6.filterOutDuplicateWallets(e),a=this.connectors.filter(y=>y.type==="MULTI_CHAIN"),c=this.connectors.filter(y=>y.type==="ANNOUNCED"),l=this.connectors.filter(y=>y.type==="INJECTED"),h=this.connectors.filter(y=>y.type==="EXTERNAL"),v=st.state.activeChain===vn.CHAIN.EVM?bt.state.enableEIP6963:!0;return{custom:n,recent:i,external:h,multiChain:a,announced:v?c:[],injected:v?l:[],recommended:s,featured:o}}};e8.styles=M0e;Cj([ge()],e8.prototype,"connectors",void 0);e8=Cj([Re("w3m-connector-list")],e8);var GI=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 t8=class extends et{constructor(){super(),this.unsubscribe=[],this.connectors=Mt.state.connectors,this.count=Yt.state.count,this.unsubscribe.push(Mt.subscribeKey("connectors",e=>this.connectors=e),Yt.subscribeKey("count",e=>this.count=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.find(a=>a.type==="WALLET_CONNECT"),{allWallets:t}=bt.state;if(!e||t==="HIDE"||t==="ONLY_MOBILE"&&!ot.isMobile())return null;const n=Yt.state.featured.length,i=this.count+n,s=i<10?i:Math.floor(i/10)*10,o=s + `}onAllWallets(){It.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),Te.push("AllWallets")}};GI([ge()],t8.prototype,"connectors",void 0);GI([ge()],t8.prototype,"count",void 0);t8=GI([Re("w3m-all-wallets-widget")],t8);var D0e=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 _O=class extends et{constructor(){super(...arguments),this.socialProvider=en.getConnectedSocialProvider(),this.socialUsername=en.getConnectedSocialUsername()}render(){const e=en.getConnectedConnector(),t=Mt.getAuthConnector();if(!t||e!=="AUTH")return this.style.cssText="display: none",null;const n=t.provider.getEmail()??"";return ne` + {this.onGoToUpdateEmail(n,this.socialProvider)}} + > + ${this.getAuthName(n)} + + `}onGoToUpdateEmail(e,t){t||Te.push("UpdateEmailWallet",{email:e})}getAuthName(e){return this.socialUsername?this.socialProvider==="discord"&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};_O=D0e([Re("w3m-account-auth-button")],_O);var ZI={exports:{}},Qg=typeof Reflect=="object"?Reflect:null,xO=Qg&&typeof Qg.apply=="function"?Qg.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},T4;Qg&&typeof Qg.ownKeys=="function"?T4=Qg.ownKeys:Object.getOwnPropertySymbols?T4=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:T4=function(e){return Object.getOwnPropertyNames(e)};function $0e(r){console&&console.warn&&console.warn(r)}var Sj=Number.isNaN||function(e){return e!==e};function yn(){yn.init.call(this)}ZI.exports=yn;ZI.exports.once=F0e;yn.EventEmitter=yn;yn.prototype._events=void 0;yn.prototype._eventsCount=0;yn.prototype._maxListeners=void 0;var AO=10;function O_(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(yn,"defaultMaxListeners",{enumerable:!0,get:function(){return AO},set:function(r){if(typeof r!="number"||r<0||Sj(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");AO=r}});yn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};yn.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Sj(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ij(r){return r._maxListeners===void 0?yn.defaultMaxListeners:r._maxListeners}yn.prototype.getMaxListeners=function(){return Ij(this)};yn.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")xO(c,this,t);else for(var l=c.length,h=Pj(c,l),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=r,a.type=e,a.count=o.length,$0e(a)}return r}yn.prototype.addListener=function(e,t){return Tj(this,e,t,!1)};yn.prototype.on=yn.prototype.addListener;yn.prototype.prependListener=function(e,t){return Tj(this,e,t,!0)};function B0e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Rj(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=B0e.bind(n);return i.listener=t,n.wrapFn=i,i}yn.prototype.once=function(e,t){return O_(t),this.on(e,Rj(this,e,t)),this};yn.prototype.prependOnceListener=function(e,t){return O_(t),this.prependListener(e,Rj(this,e,t)),this};yn.prototype.removeListener=function(e,t){var n,i,s,o,a;if(O_(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():L0e(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this};yn.prototype.off=yn.prototype.removeListener;yn.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(e,t[i]);return this};function kj(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?U0e(i):Pj(i,i.length)}yn.prototype.listeners=function(e){return kj(this,e,!0)};yn.prototype.rawListeners=function(e){return kj(this,e,!1)};yn.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Nj.call(r,e)};yn.prototype.listenerCount=Nj;function Nj(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}yn.prototype.eventNames=function(){return this._eventsCount>0?T4(this._events):[]};function Pj(r,e){for(var t=new Array(e),n=0;n"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new q0e:typeof navigator<"u"?J0e(navigator.userAgent):epe()}function Q0e(r){return r!==""&&Z0e.reduce(function(e,t){var n=t[0],i=t[1];if(e)return e;var s=i.exec(r);return!!s&&[n,s]},!1)}function J0e(r){var e=Q0e(r);if(!e)return null;var t=e[0],n=e[1];if(t==="searchbot")return new V0e;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length=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}function spe(r,e){return function(t,n){e(t,n,r)}}function ope(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function ape(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{l(n.next(h))}catch(f){o(f)}}function c(h){try{l(n.throw(h))}catch(f){o(f)}}function l(h){h.done?s(h.value):i(h.value).then(a,c)}l((n=n.apply(r,e||[])).next())})}function cpe(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(h){return c([l,h])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mj(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s}function hpe(){for(var r=[],e=0;e1||a(v,y)})})}function a(v,y){try{c(n[v](y))}catch(A){f(s[0][3],A)}}function c(v){v.value instanceof Uv?Promise.resolve(v.value.v).then(l,h):f(s[0][2],v)}function l(v){a("next",v)}function h(v){a("throw",v)}function f(v,y){v(y),s.shift(),s.length&&a(s[0][0],s[0][1])}}function ppe(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=r[i]?function(o){return(t=!t)?{value:Uv(r[i](o)),done:i==="return"}:s?s(o):o}:s}}function gpe(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof dC=="function"?dC(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(a,c){o=r[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function mpe(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function wpe(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function vpe(r){return r&&r.__esModule?r:{default:r}}function ype(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function bpe(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}const _pe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return hC},__asyncDelegator:ppe,__asyncGenerator:fpe,__asyncValues:gpe,__await:Uv,__awaiter:ape,__classPrivateFieldGet:ype,__classPrivateFieldSet:bpe,__createBinding:lpe,__decorate:ipe,__exportStar:upe,__extends:rpe,__generator:cpe,__importDefault:vpe,__importStar:wpe,__makeTemplateObject:mpe,__metadata:ope,__param:spe,__read:Mj,__rest:npe,__spread:hpe,__spreadArrays:dpe,__values:dC},Symbol.toStringTag,{value:"Module"})),Yy=Ay(_pe);var OE={},H2={},IO;function xpe(){if(IO)return H2;IO=1,Object.defineProperty(H2,"__esModule",{value:!0}),H2.delay=void 0;function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}return H2.delay=r,H2}var P0={},ME={},O0={},TO;function Ape(){return TO||(TO=1,Object.defineProperty(O0,"__esModule",{value:!0}),O0.ONE_THOUSAND=O0.ONE_HUNDRED=void 0,O0.ONE_HUNDRED=100,O0.ONE_THOUSAND=1e3),O0}var DE={},RO;function Epe(){return RO||(RO=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=r.ONE_MINUTE*5,r.TEN_MINUTES=r.ONE_MINUTE*10,r.THIRTY_MINUTES=r.ONE_MINUTE*30,r.SIXTY_MINUTES=r.ONE_MINUTE*60,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=r.ONE_HOUR*3,r.SIX_HOURS=r.ONE_HOUR*6,r.TWELVE_HOURS=r.ONE_HOUR*12,r.TWENTY_FOUR_HOURS=r.ONE_HOUR*24,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=r.ONE_DAY*3,r.FIVE_DAYS=r.ONE_DAY*5,r.SEVEN_DAYS=r.ONE_DAY*7,r.THIRTY_DAYS=r.ONE_DAY*30,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=r.ONE_WEEK*2,r.THREE_WEEKS=r.ONE_WEEK*3,r.FOUR_WEEKS=r.ONE_WEEK*4,r.ONE_YEAR=r.ONE_DAY*365}(DE)),DE}var kO;function Dj(){return kO||(kO=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Yy;e.__exportStar(Ape(),r),e.__exportStar(Epe(),r)}(ME)),ME}var NO;function Cpe(){if(NO)return P0;NO=1,Object.defineProperty(P0,"__esModule",{value:!0}),P0.fromMiliseconds=P0.toMiliseconds=void 0;const r=Dj();function e(n){return n*r.ONE_THOUSAND}P0.toMiliseconds=e;function t(n){return Math.floor(n/r.ONE_THOUSAND)}return P0.fromMiliseconds=t,P0}var PO;function Spe(){return PO||(PO=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Yy;e.__exportStar(xpe(),r),e.__exportStar(Cpe(),r)}(OE)),OE}var cg={},OO;function Ipe(){if(OO)return cg;OO=1,Object.defineProperty(cg,"__esModule",{value:!0}),cg.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const n=this.get(t);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const i=Date.now()-n.started;this.timestamps.set(t,{started:n.started,elapsed:i})}get(t){const n=this.timestamps.get(t);if(typeof n>"u")throw new Error(`No timestamp found for label: ${t}`);return n}elapsed(t){const n=this.get(t);return n.elapsed||Date.now()-n.started}}return cg.Watch=r,cg.default=r,cg}var $E={},W2={},MO;function Tpe(){if(MO)return W2;MO=1,Object.defineProperty(W2,"__esModule",{value:!0}),W2.IWatch=void 0;class r{}return W2.IWatch=r,W2}var DO;function Rpe(){return DO||(DO=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Yy.__exportStar(Tpe(),r)}($E)),$E}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Yy;e.__exportStar(Spe(),r),e.__exportStar(Ipe(),r),e.__exportStar(Rpe(),r),e.__exportStar(Dj(),r)})(Tt);var kn={};Object.defineProperty(kn,"__esModule",{value:!0});kn.getLocalStorage=kn.getLocalStorageOrThrow=kn.getCrypto=kn.getCryptoOrThrow=$j=kn.getLocation=kn.getLocationOrThrow=JI=kn.getNavigator=kn.getNavigatorOrThrow=QI=kn.getDocument=kn.getDocumentOrThrow=kn.getFromWindowOrThrow=kn.getFromWindow=void 0;function I1(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}kn.getFromWindow=I1;function Jw(r){const e=I1(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}kn.getFromWindowOrThrow=Jw;function kpe(){return Jw("document")}kn.getDocumentOrThrow=kpe;function Npe(){return I1("document")}var QI=kn.getDocument=Npe;function Ppe(){return Jw("navigator")}kn.getNavigatorOrThrow=Ppe;function Ope(){return I1("navigator")}var JI=kn.getNavigator=Ope;function Mpe(){return Jw("location")}kn.getLocationOrThrow=Mpe;function Dpe(){return I1("location")}var $j=kn.getLocation=Dpe;function $pe(){return Jw("crypto")}kn.getCryptoOrThrow=$pe;function Bpe(){return I1("crypto")}kn.getCrypto=Bpe;function Lpe(){return Jw("localStorage")}kn.getLocalStorageOrThrow=Lpe;function Upe(){return I1("localStorage")}kn.getLocalStorage=Upe;var XI={};Object.defineProperty(XI,"__esModule",{value:!0});var Bj=XI.getWindowMetadata=void 0;const $O=kn;function Fpe(){let r,e;try{r=$O.getDocumentOrThrow(),e=$O.getLocationOrThrow()}catch{return null}function t(){const f=r.getElementsByTagName("link"),v=[];for(let y=0;y-1){const $=A.getAttribute("href");if($)if($.toLowerCase().indexOf("https:")===-1&&$.toLowerCase().indexOf("http:")===-1&&$.indexOf("//")!==0){let L=e.protocol+"//"+e.host;if($.indexOf("/")===0)L+=$;else{const P=e.pathname.split("/");P.pop();const H=P.join("/");L+=H+"/"+$}v.push(L)}else if($.indexOf("//")===0){const L=e.protocol+$;v.push(L)}else v.push($)}}return v}function n(...f){const v=r.getElementsByTagName("meta");for(let y=0;yA.getAttribute($)).filter($=>$?f.includes($):!1);if(M.length&&M){const $=A.getAttribute("content");if($)return $}}return""}function i(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=r.title),f}function s(){return n("description","og:description","twitter:description","keywords")}const o=i(),a=s(),c=e.origin,l=t();return{description:a,url:c,icons:l,name:o}}Bj=XI.getWindowMetadata=Fpe;var Fv={},jpe=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Lj="%[a-f0-9]{2}",BO=new RegExp("("+Lj+")|([^%]+?)","gi"),LO=new RegExp("("+Lj+")+","gi");function fC(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;var t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],fC(t),fC(n))}function Hpe(r){try{return decodeURIComponent(r)}catch{for(var e=r.match(BO)||[],t=1;t{if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[r];const t=r.indexOf(e);return t===-1?[r]:[r.slice(0,t),r.slice(t+e.length)]},qpe=function(r,e){for(var t={},n=Object.keys(r),i=Array.isArray(e),s=0;sP==null,o=Symbol("encodeFragmentIdentifier");function a(P){switch(P.arrayFormat){case"index":return H=>(F,q)=>{const Y=F.length;return q===void 0||P.skipNull&&q===null||P.skipEmptyString&&q===""?F:q===null?[...F,[h(H,P),"[",Y,"]"].join("")]:[...F,[h(H,P),"[",h(Y,P),"]=",h(q,P)].join("")]};case"bracket":return H=>(F,q)=>q===void 0||P.skipNull&&q===null||P.skipEmptyString&&q===""?F:q===null?[...F,[h(H,P),"[]"].join("")]:[...F,[h(H,P),"[]=",h(q,P)].join("")];case"colon-list-separator":return H=>(F,q)=>q===void 0||P.skipNull&&q===null||P.skipEmptyString&&q===""?F:q===null?[...F,[h(H,P),":list="].join("")]:[...F,[h(H,P),":list=",h(q,P)].join("")];case"comma":case"separator":case"bracket-separator":{const H=P.arrayFormat==="bracket-separator"?"[]=":"=";return F=>(q,Y)=>Y===void 0||P.skipNull&&Y===null||P.skipEmptyString&&Y===""?q:(Y=Y===null?"":Y,q.length===0?[[h(F,P),H,h(Y,P)].join("")]:[[q,h(Y,P)].join(P.arrayFormatSeparator)])}default:return H=>(F,q)=>q===void 0||P.skipNull&&q===null||P.skipEmptyString&&q===""?F:q===null?[...F,h(H,P)]:[...F,[h(H,P),"=",h(q,P)].join("")]}}function c(P){let H;switch(P.arrayFormat){case"index":return(F,q,Y)=>{if(H=/\[(\d*)\]$/.exec(F),F=F.replace(/\[\d*\]$/,""),!H){Y[F]=q;return}Y[F]===void 0&&(Y[F]={}),Y[F][H[1]]=q};case"bracket":return(F,q,Y)=>{if(H=/(\[\])$/.exec(F),F=F.replace(/\[\]$/,""),!H){Y[F]=q;return}if(Y[F]===void 0){Y[F]=[q];return}Y[F]=[].concat(Y[F],q)};case"colon-list-separator":return(F,q,Y)=>{if(H=/(:list)$/.exec(F),F=F.replace(/:list$/,""),!H){Y[F]=q;return}if(Y[F]===void 0){Y[F]=[q];return}Y[F]=[].concat(Y[F],q)};case"comma":case"separator":return(F,q,Y)=>{const I=typeof q=="string"&&q.includes(P.arrayFormatSeparator),T=typeof q=="string"&&!I&&f(q,P).includes(P.arrayFormatSeparator);q=T?f(q,P):q;const V=I||T?q.split(P.arrayFormatSeparator).map(Q=>f(Q,P)):q===null?q:f(q,P);Y[F]=V};case"bracket-separator":return(F,q,Y)=>{const I=/(\[\])$/.test(F);if(F=F.replace(/\[\]$/,""),!I){Y[F]=q&&f(q,P);return}const T=q===null?[]:q.split(P.arrayFormatSeparator).map(V=>f(V,P));if(Y[F]===void 0){Y[F]=T;return}Y[F]=[].concat(Y[F],T)};default:return(F,q,Y)=>{if(Y[F]===void 0){Y[F]=q;return}Y[F]=[].concat(Y[F],q)}}}function l(P){if(typeof P!="string"||P.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(P,H){return H.encode?H.strict?e(P):encodeURIComponent(P):P}function f(P,H){return H.decode?t(P):P}function v(P){return Array.isArray(P)?P.sort():typeof P=="object"?v(Object.keys(P)).sort((H,F)=>Number(H)-Number(F)).map(H=>P[H]):P}function y(P){const H=P.indexOf("#");return H!==-1&&(P=P.slice(0,H)),P}function A(P){let H="";const F=P.indexOf("#");return F!==-1&&(H=P.slice(F)),H}function M(P){P=y(P);const H=P.indexOf("?");return H===-1?"":P.slice(H+1)}function $(P,H){return H.parseNumbers&&!Number.isNaN(Number(P))&&typeof P=="string"&&P.trim()!==""?P=Number(P):H.parseBooleans&&P!==null&&(P.toLowerCase()==="true"||P.toLowerCase()==="false")&&(P=P.toLowerCase()==="true"),P}function L(P,H){H=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},H),l(H.arrayFormatSeparator);const F=c(H),q=Object.create(null);if(typeof P!="string"||(P=P.trim().replace(/^[?#&]/,""),!P))return q;for(const Y of P.split("&")){if(Y==="")continue;let[I,T]=n(H.decode?Y.replace(/\+/g," "):Y,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(H.arrayFormat)?T:f(T,H),F(f(I,H),T,q)}for(const Y of Object.keys(q)){const I=q[Y];if(typeof I=="object"&&I!==null)for(const T of Object.keys(I))I[T]=$(I[T],H);else q[Y]=$(I,H)}return H.sort===!1?q:(H.sort===!0?Object.keys(q).sort():Object.keys(q).sort(H.sort)).reduce((Y,I)=>{const T=q[I];return T&&typeof T=="object"&&!Array.isArray(T)?Y[I]=v(T):Y[I]=T,Y},Object.create(null))}r.extract=M,r.parse=L,r.stringify=(P,H)=>{if(!P)return"";H=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},H),l(H.arrayFormatSeparator);const F=T=>H.skipNull&&s(P[T])||H.skipEmptyString&&P[T]==="",q=a(H),Y={};for(const T of Object.keys(P))F(T)||(Y[T]=P[T]);const I=Object.keys(Y);return H.sort!==!1&&I.sort(H.sort),I.map(T=>{const V=P[T];return V===void 0?"":V===null?h(T,H):Array.isArray(V)?V.length===0&&H.arrayFormat==="bracket-separator"?h(T,H)+"[]":V.reduce(q(T),[]).join("&"):h(T,H)+"="+h(V,H)}).filter(T=>T.length>0).join("&")},r.parseUrl=(P,H)=>{H=Object.assign({decode:!0},H);const[F,q]=n(P,"#");return Object.assign({url:F.split("?")[0]||"",query:L(M(P),H)},H&&H.parseFragmentIdentifier&&q?{fragmentIdentifier:f(q,H)}:{})},r.stringifyUrl=(P,H)=>{H=Object.assign({encode:!0,strict:!0,[o]:!0},H);const F=y(P.url).split("?")[0]||"",q=r.extract(P.url),Y=r.parse(q,{sort:!1}),I=Object.assign(Y,P.query);let T=r.stringify(I,H);T&&(T=`?${T}`);let V=A(P.url);return P.fragmentIdentifier&&(V=`#${H[o]?h(P.fragmentIdentifier,H):P.fragmentIdentifier}`),`${F}${T}${V}`},r.pick=(P,H,F)=>{F=Object.assign({parseFragmentIdentifier:!0,[o]:!1},F);const{url:q,query:Y,fragmentIdentifier:I}=r.parseUrl(P,F);return r.stringifyUrl({url:q,query:i(Y,H),fragmentIdentifier:I},F)},r.exclude=(P,H,F)=>{const q=Array.isArray(H)?Y=>!H.includes(Y):(Y,I)=>!H(Y,I);return r.pick(P,q,F)}})(Fv);var eT={},M_={},Ar={},Uj={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});function e(a,c){var l=a>>>16&65535,h=a&65535,f=c>>>16&65535,v=c&65535;return h*v+(l*v+h*f<<16>>>0)|0}r.mul=Math.imul||e;function t(a,c){return a+c|0}r.add=t;function n(a,c){return a-c|0}r.sub=n;function i(a,c){return a<>>32-c}r.rotl=i;function s(a,c){return a<<32-c|a>>>c}r.rotr=s;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}r.isInteger=Number.isInteger||o,r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(a){return r.isInteger(a)&&a>=-r.MAX_SAFE_INTEGER&&a<=r.MAX_SAFE_INTEGER}})(Uj);Object.defineProperty(Ar,"__esModule",{value:!0});var Fj=Uj;function Kpe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])<<16>>16}Ar.readInt16BE=Kpe;function Gpe(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])>>>0}Ar.readUint16BE=Gpe;function Zpe(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])<<16>>16}Ar.readInt16LE=Zpe;function Ype(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])>>>0}Ar.readUint16LE=Ype;function jj(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>8,e[t+1]=r>>>0,e}Ar.writeUint16BE=jj;Ar.writeInt16BE=jj;function Hj(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e}Ar.writeUint16LE=Hj;Ar.writeInt16LE=Hj;function pC(r,e){return e===void 0&&(e=0),r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}Ar.readInt32BE=pC;function gC(r,e){return e===void 0&&(e=0),(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}Ar.readUint32BE=gC;function mC(r,e){return e===void 0&&(e=0),r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e]}Ar.readInt32LE=mC;function wC(r,e){return e===void 0&&(e=0),(r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e])>>>0}Ar.readUint32LE=wC;function r8(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>24,e[t+1]=r>>>16,e[t+2]=r>>>8,e[t+3]=r>>>0,e}Ar.writeUint32BE=r8;Ar.writeInt32BE=r8;function n8(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e[t+2]=r>>>16,e[t+3]=r>>>24,e}Ar.writeUint32LE=n8;Ar.writeInt32LE=n8;function Qpe(r,e){e===void 0&&(e=0);var t=pC(r,e),n=pC(r,e+4);return t*4294967296+n-(n>>31)*4294967296}Ar.readInt64BE=Qpe;function Jpe(r,e){e===void 0&&(e=0);var t=gC(r,e),n=gC(r,e+4);return t*4294967296+n}Ar.readUint64BE=Jpe;function Xpe(r,e){e===void 0&&(e=0);var t=mC(r,e),n=mC(r,e+4);return n*4294967296+t-(t>>31)*4294967296}Ar.readInt64LE=Xpe;function e1e(r,e){e===void 0&&(e=0);var t=wC(r,e),n=wC(r,e+4);return n*4294967296+t}Ar.readUint64LE=e1e;function Wj(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),r8(r/4294967296>>>0,e,t),r8(r>>>0,e,t+4),e}Ar.writeUint64BE=Wj;Ar.writeInt64BE=Wj;function zj(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),n8(r>>>0,e,t),n8(r/4294967296>>>0,e,t+4),e}Ar.writeUint64LE=zj;Ar.writeInt64LE=zj;function t1e(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=r/8+t-1;s>=t;s--)n+=e[s]*i,i*=256;return n}Ar.readUintBE=t1e;function r1e(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=t;s=n;s--)t[s]=e/i&255,i*=256;return t}Ar.writeUintBE=n1e;function i1e(r,e,t,n){if(t===void 0&&(t=new Uint8Array(r/8)),n===void 0&&(n=0),r%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Fj.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s>>16|m<<16,te=te+m|0,I^=te,I=I>>>20|I<<12,F=F+T|0,b^=F,b=b>>>16|b<<16,oe=oe+b|0,T^=oe,T=T>>>20|T<<12,q=q+V|0,E^=q,E=E>>>16|E<<16,d=d+E|0,V^=d,V=V>>>20|V<<12,Y=Y+Q|0,C^=Y,C=C>>>16|C<<16,g=g+C|0,Q^=g,Q=Q>>>20|Q<<12,q=q+V|0,E^=q,E=E>>>24|E<<8,d=d+E|0,V^=d,V=V>>>25|V<<7,Y=Y+Q|0,C^=Y,C=C>>>24|C<<8,g=g+C|0,Q^=g,Q=Q>>>25|Q<<7,F=F+T|0,b^=F,b=b>>>24|b<<8,oe=oe+b|0,T^=oe,T=T>>>25|T<<7,H=H+I|0,m^=H,m=m>>>24|m<<8,te=te+m|0,I^=te,I=I>>>25|I<<7,H=H+T|0,C^=H,C=C>>>16|C<<16,d=d+C|0,T^=d,T=T>>>20|T<<12,F=F+V|0,m^=F,m=m>>>16|m<<16,g=g+m|0,V^=g,V=V>>>20|V<<12,q=q+Q|0,b^=q,b=b>>>16|b<<16,te=te+b|0,Q^=te,Q=Q>>>20|Q<<12,Y=Y+I|0,E^=Y,E=E>>>16|E<<16,oe=oe+E|0,I^=oe,I=I>>>20|I<<12,q=q+Q|0,b^=q,b=b>>>24|b<<8,te=te+b|0,Q^=te,Q=Q>>>25|Q<<7,Y=Y+I|0,E^=Y,E=E>>>24|E<<8,oe=oe+E|0,I^=oe,I=I>>>25|I<<7,F=F+V|0,m^=F,m=m>>>24|m<<8,g=g+m|0,V^=g,V=V>>>25|V<<7,H=H+T|0,C^=H,C=C>>>24|C<<8,d=d+C|0,T^=d,T=T>>>25|T<<7;bs.writeUint32LE(H+n|0,r,0),bs.writeUint32LE(F+i|0,r,4),bs.writeUint32LE(q+s|0,r,8),bs.writeUint32LE(Y+o|0,r,12),bs.writeUint32LE(I+a|0,r,16),bs.writeUint32LE(T+c|0,r,20),bs.writeUint32LE(V+l|0,r,24),bs.writeUint32LE(Q+h|0,r,28),bs.writeUint32LE(te+f|0,r,32),bs.writeUint32LE(oe+v|0,r,36),bs.writeUint32LE(d+y|0,r,40),bs.writeUint32LE(g+A|0,r,44),bs.writeUint32LE(m+M|0,r,48),bs.writeUint32LE(b+$|0,r,52),bs.writeUint32LE(E+L|0,r,56),bs.writeUint32LE(C+P|0,r,60)}function Vj(r,e,t,n,i){if(i===void 0&&(i=0),r.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var qj={},h0={};Object.defineProperty(h0,"__esModule",{value:!0});function v1e(r,e,t){return~(r-1)&e|r-1&t}h0.select=v1e;function y1e(r,e){return(r|0)-(e|0)-1>>>31&1}h0.lessOrEqual=y1e;function Kj(r,e){if(r.length!==e.length)return 0;for(var t=0,n=0;n>>8}h0.compare=Kj;function b1e(r,e){return r.length===0||e.length===0?!1:Kj(r,e)!==0}h0.equal=b1e;(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=h0,t=Ca;r.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=a[0]|a[1]<<8;this._r[0]=c&8191;var l=a[2]|a[3]<<8;this._r[1]=(c>>>13|l<<3)&8191;var h=a[4]|a[5]<<8;this._r[2]=(l>>>10|h<<6)&7939;var f=a[6]|a[7]<<8;this._r[3]=(h>>>7|f<<9)&8191;var v=a[8]|a[9]<<8;this._r[4]=(f>>>4|v<<12)&255,this._r[5]=v>>>1&8190;var y=a[10]|a[11]<<8;this._r[6]=(v>>>14|y<<2)&8191;var A=a[12]|a[13]<<8;this._r[7]=(y>>>11|A<<5)&8065;var M=a[14]|a[15]<<8;this._r[8]=(A>>>8|M<<8)&8191,this._r[9]=M>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,c,l){for(var h=this._fin?0:2048,f=this._h[0],v=this._h[1],y=this._h[2],A=this._h[3],M=this._h[4],$=this._h[5],L=this._h[6],P=this._h[7],H=this._h[8],F=this._h[9],q=this._r[0],Y=this._r[1],I=this._r[2],T=this._r[3],V=this._r[4],Q=this._r[5],te=this._r[6],oe=this._r[7],d=this._r[8],g=this._r[9];l>=16;){var m=a[c+0]|a[c+1]<<8;f+=m&8191;var b=a[c+2]|a[c+3]<<8;v+=(m>>>13|b<<3)&8191;var E=a[c+4]|a[c+5]<<8;y+=(b>>>10|E<<6)&8191;var C=a[c+6]|a[c+7]<<8;A+=(E>>>7|C<<9)&8191;var B=a[c+8]|a[c+9]<<8;M+=(C>>>4|B<<12)&8191,$+=B>>>1&8191;var R=a[c+10]|a[c+11]<<8;L+=(B>>>14|R<<2)&8191;var w=a[c+12]|a[c+13]<<8;P+=(R>>>11|w<<5)&8191;var O=a[c+14]|a[c+15]<<8;H+=(w>>>8|O<<8)&8191,F+=O>>>5|h;var pe=0,be=pe;be+=f*q,be+=v*(5*g),be+=y*(5*d),be+=A*(5*oe),be+=M*(5*te),pe=be>>>13,be&=8191,be+=$*(5*Q),be+=L*(5*V),be+=P*(5*T),be+=H*(5*I),be+=F*(5*Y),pe+=be>>>13,be&=8191;var x=pe;x+=f*Y,x+=v*q,x+=y*(5*g),x+=A*(5*d),x+=M*(5*oe),pe=x>>>13,x&=8191,x+=$*(5*te),x+=L*(5*Q),x+=P*(5*V),x+=H*(5*T),x+=F*(5*I),pe+=x>>>13,x&=8191;var Z=pe;Z+=f*I,Z+=v*Y,Z+=y*q,Z+=A*(5*g),Z+=M*(5*d),pe=Z>>>13,Z&=8191,Z+=$*(5*oe),Z+=L*(5*te),Z+=P*(5*Q),Z+=H*(5*V),Z+=F*(5*T),pe+=Z>>>13,Z&=8191;var k=pe;k+=f*T,k+=v*I,k+=y*Y,k+=A*q,k+=M*(5*g),pe=k>>>13,k&=8191,k+=$*(5*d),k+=L*(5*oe),k+=P*(5*te),k+=H*(5*Q),k+=F*(5*V),pe+=k>>>13,k&=8191;var W=pe;W+=f*V,W+=v*T,W+=y*I,W+=A*Y,W+=M*q,pe=W>>>13,W&=8191,W+=$*(5*g),W+=L*(5*d),W+=P*(5*oe),W+=H*(5*te),W+=F*(5*Q),pe+=W>>>13,W&=8191;var J=pe;J+=f*Q,J+=v*V,J+=y*T,J+=A*I,J+=M*Y,pe=J>>>13,J&=8191,J+=$*q,J+=L*(5*g),J+=P*(5*d),J+=H*(5*oe),J+=F*(5*te),pe+=J>>>13,J&=8191;var S=pe;S+=f*te,S+=v*Q,S+=y*V,S+=A*T,S+=M*I,pe=S>>>13,S&=8191,S+=$*Y,S+=L*q,S+=P*(5*g),S+=H*(5*d),S+=F*(5*oe),pe+=S>>>13,S&=8191;var D=pe;D+=f*oe,D+=v*te,D+=y*Q,D+=A*V,D+=M*T,pe=D>>>13,D&=8191,D+=$*I,D+=L*Y,D+=P*q,D+=H*(5*g),D+=F*(5*d),pe+=D>>>13,D&=8191;var G=pe;G+=f*d,G+=v*oe,G+=y*te,G+=A*Q,G+=M*V,pe=G>>>13,G&=8191,G+=$*T,G+=L*I,G+=P*Y,G+=H*q,G+=F*(5*g),pe+=G>>>13,G&=8191;var z=pe;z+=f*g,z+=v*d,z+=y*oe,z+=A*te,z+=M*Q,pe=z>>>13,z&=8191,z+=$*V,z+=L*T,z+=P*I,z+=H*Y,z+=F*q,pe+=z>>>13,z&=8191,pe=(pe<<2)+pe|0,pe=pe+be|0,be=pe&8191,pe=pe>>>13,x+=pe,f=be,v=x,y=Z,A=k,M=W,$=J,L=S,P=D,H=G,F=z,c+=16,l-=16}this._h[0]=f,this._h[1]=v,this._h[2]=y,this._h[3]=A,this._h[4]=M,this._h[5]=$,this._h[6]=L,this._h[7]=P,this._h[8]=H,this._h[9]=F},o.prototype.finish=function(a,c){c===void 0&&(c=0);var l=new Uint16Array(10),h,f,v,y;if(this._leftover){for(y=this._leftover,this._buffer[y++]=1;y<16;y++)this._buffer[y]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(h=this._h[1]>>>13,this._h[1]&=8191,y=2;y<10;y++)this._h[y]+=h,h=this._h[y]>>>13,this._h[y]&=8191;for(this._h[0]+=h*5,h=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=h,h=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=h,l[0]=this._h[0]+5,h=l[0]>>>13,l[0]&=8191,y=1;y<10;y++)l[y]=this._h[y]+h,h=l[y]>>>13,l[y]&=8191;for(l[9]-=8192,f=(h^1)-1,y=0;y<10;y++)l[y]&=f;for(f=~f,y=0;y<10;y++)this._h[y]=this._h[y]&f|l[y];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,v=this._h[0]+this._pad[0],this._h[0]=v&65535,y=1;y<8;y++)v=(this._h[y]+this._pad[y]|0)+(v>>>16)|0,this._h[y]=v&65535;return a[c+0]=this._h[0]>>>0,a[c+1]=this._h[0]>>>8,a[c+2]=this._h[1]>>>0,a[c+3]=this._h[1]>>>8,a[c+4]=this._h[2]>>>0,a[c+5]=this._h[2]>>>8,a[c+6]=this._h[3]>>>0,a[c+7]=this._h[3]>>>8,a[c+8]=this._h[4]>>>0,a[c+9]=this._h[4]>>>8,a[c+10]=this._h[5]>>>0,a[c+11]=this._h[5]>>>8,a[c+12]=this._h[6]>>>0,a[c+13]=this._h[6]>>>8,a[c+14]=this._h[7]>>>0,a[c+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var c=0,l=a.length,h;if(this._leftover){h=16-this._leftover,h>l&&(h=l);for(var f=0;f=16&&(h=l-l%16,this._blocks(a,c,h),c+=h,l-=h),l){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var y=new Uint8Array(16);y.set(l,y.length-l.length);var A=new Uint8Array(32);e.stream(this._key,y,A,4);var M=h.length+this.tagLength,$;if(v){if(v.length!==M)throw new Error("ChaCha20Poly1305: incorrect destination length");$=v}else $=new Uint8Array(M);return e.streamXOR(this._key,y,h,$,4),this._authenticate($.subarray($.length-this.tagLength,$.length),A,$.subarray(0,$.length-this.tagLength),f),n.wipe(y),$},c.prototype.open=function(l,h,f,v){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(h.length0&&y.update(o.subarray(v.length%16))),y.update(f),f.length%16>0&&y.update(o.subarray(f.length%16));var A=new Uint8Array(8);v&&i.writeUint64LE(v.length,A),y.update(A),i.writeUint64LE(f.length,A),y.update(A);for(var M=y.digest(),$=0;$this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},r.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n256)throw new Error("randomString charset is too long");let v="";const y=h.length,A=256-256%y;for(;l>0;){const M=i(Math.ceil(l*256/A),f);for(let $=0;$0;$++){const L=M[$];L0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[h++],l--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(h=s(this._temp,this._state,c,h,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[h++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,h=this._bufferLength,f=l/536870912|0,v=l<<3,y=l%64<56?64:128;this._buffer[h]=128;for(var A=h+1;A0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(c){t.wipe(c.state),c.buffer&&t.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();r.SHA256=n;var i=new Int32Array([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]);function s(a,c,l,h,f){for(;f>=64;){for(var v=c[0],y=c[1],A=c[2],M=c[3],$=c[4],L=c[5],P=c[6],H=c[7],F=0;F<16;F++){var q=h+F*4;a[F]=e.readUint32BE(l,q)}for(var F=16;F<64;F++){var Y=a[F-2],I=(Y>>>17|Y<<15)^(Y>>>19|Y<<13)^Y>>>10;Y=a[F-15];var T=(Y>>>7|Y<<25)^(Y>>>18|Y<<14)^Y>>>3;a[F]=(I+a[F-7]|0)+(T+a[F-16]|0)}for(var F=0;F<64;F++){var I=((($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7))+($&L^~$&P)|0)+(H+(i[F]+a[F]|0)|0)|0,T=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&y^v&A^y&A)|0;H=P,P=L,L=$,$=M+I|0,M=A,A=y,y=v,v=I+T|0}c[0]+=v,c[1]+=y,c[2]+=A,c[3]+=M,c[4]+=$,c[5]+=L,c[6]+=P,c[7]+=H,h+=64,f-=64}return h}function o(a){var c=new n;c.update(a);var l=c.digest();return c.clean(),l}r.hash=o})(L_);var nT={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sharedKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.scalarMultBase=r.scalarMult=r.SHARED_KEY_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;const e=Xw,t=Ca;r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=32,r.SHARED_KEY_LENGTH=32;function n(F){const q=new Float64Array(16);if(F)for(let Y=0;Y>16&1),Y[Q-1]&=65535;Y[15]=I[15]-32767-(Y[14]>>16&1);const V=Y[15]>>16&1;Y[14]&=65535,a(I,Y,1-V)}for(let T=0;T<16;T++)F[2*T]=I[T]&255,F[2*T+1]=I[T]>>8}function l(F,q){for(let Y=0;Y<16;Y++)F[Y]=q[2*Y]+(q[2*Y+1]<<8);F[15]&=32767}function h(F,q,Y){for(let I=0;I<16;I++)F[I]=q[I]+Y[I]}function f(F,q,Y){for(let I=0;I<16;I++)F[I]=q[I]-Y[I]}function v(F,q,Y){let I,T,V=0,Q=0,te=0,oe=0,d=0,g=0,m=0,b=0,E=0,C=0,B=0,R=0,w=0,O=0,pe=0,be=0,x=0,Z=0,k=0,W=0,J=0,S=0,D=0,G=0,z=0,K=0,ue=0,ye=0,we=0,je=0,Me=0,Ie=Y[0],Be=Y[1],xe=Y[2],$e=Y[3],We=Y[4],Ne=Y[5],Ue=Y[6],X=Y[7],N=Y[8],U=Y[9],ie=Y[10],le=Y[11],me=Y[12],Ee=Y[13],ze=Y[14],qe=Y[15];I=q[0],V+=I*Ie,Q+=I*Be,te+=I*xe,oe+=I*$e,d+=I*We,g+=I*Ne,m+=I*Ue,b+=I*X,E+=I*N,C+=I*U,B+=I*ie,R+=I*le,w+=I*me,O+=I*Ee,pe+=I*ze,be+=I*qe,I=q[1],Q+=I*Ie,te+=I*Be,oe+=I*xe,d+=I*$e,g+=I*We,m+=I*Ne,b+=I*Ue,E+=I*X,C+=I*N,B+=I*U,R+=I*ie,w+=I*le,O+=I*me,pe+=I*Ee,be+=I*ze,x+=I*qe,I=q[2],te+=I*Ie,oe+=I*Be,d+=I*xe,g+=I*$e,m+=I*We,b+=I*Ne,E+=I*Ue,C+=I*X,B+=I*N,R+=I*U,w+=I*ie,O+=I*le,pe+=I*me,be+=I*Ee,x+=I*ze,Z+=I*qe,I=q[3],oe+=I*Ie,d+=I*Be,g+=I*xe,m+=I*$e,b+=I*We,E+=I*Ne,C+=I*Ue,B+=I*X,R+=I*N,w+=I*U,O+=I*ie,pe+=I*le,be+=I*me,x+=I*Ee,Z+=I*ze,k+=I*qe,I=q[4],d+=I*Ie,g+=I*Be,m+=I*xe,b+=I*$e,E+=I*We,C+=I*Ne,B+=I*Ue,R+=I*X,w+=I*N,O+=I*U,pe+=I*ie,be+=I*le,x+=I*me,Z+=I*Ee,k+=I*ze,W+=I*qe,I=q[5],g+=I*Ie,m+=I*Be,b+=I*xe,E+=I*$e,C+=I*We,B+=I*Ne,R+=I*Ue,w+=I*X,O+=I*N,pe+=I*U,be+=I*ie,x+=I*le,Z+=I*me,k+=I*Ee,W+=I*ze,J+=I*qe,I=q[6],m+=I*Ie,b+=I*Be,E+=I*xe,C+=I*$e,B+=I*We,R+=I*Ne,w+=I*Ue,O+=I*X,pe+=I*N,be+=I*U,x+=I*ie,Z+=I*le,k+=I*me,W+=I*Ee,J+=I*ze,S+=I*qe,I=q[7],b+=I*Ie,E+=I*Be,C+=I*xe,B+=I*$e,R+=I*We,w+=I*Ne,O+=I*Ue,pe+=I*X,be+=I*N,x+=I*U,Z+=I*ie,k+=I*le,W+=I*me,J+=I*Ee,S+=I*ze,D+=I*qe,I=q[8],E+=I*Ie,C+=I*Be,B+=I*xe,R+=I*$e,w+=I*We,O+=I*Ne,pe+=I*Ue,be+=I*X,x+=I*N,Z+=I*U,k+=I*ie,W+=I*le,J+=I*me,S+=I*Ee,D+=I*ze,G+=I*qe,I=q[9],C+=I*Ie,B+=I*Be,R+=I*xe,w+=I*$e,O+=I*We,pe+=I*Ne,be+=I*Ue,x+=I*X,Z+=I*N,k+=I*U,W+=I*ie,J+=I*le,S+=I*me,D+=I*Ee,G+=I*ze,z+=I*qe,I=q[10],B+=I*Ie,R+=I*Be,w+=I*xe,O+=I*$e,pe+=I*We,be+=I*Ne,x+=I*Ue,Z+=I*X,k+=I*N,W+=I*U,J+=I*ie,S+=I*le,D+=I*me,G+=I*Ee,z+=I*ze,K+=I*qe,I=q[11],R+=I*Ie,w+=I*Be,O+=I*xe,pe+=I*$e,be+=I*We,x+=I*Ne,Z+=I*Ue,k+=I*X,W+=I*N,J+=I*U,S+=I*ie,D+=I*le,G+=I*me,z+=I*Ee,K+=I*ze,ue+=I*qe,I=q[12],w+=I*Ie,O+=I*Be,pe+=I*xe,be+=I*$e,x+=I*We,Z+=I*Ne,k+=I*Ue,W+=I*X,J+=I*N,S+=I*U,D+=I*ie,G+=I*le,z+=I*me,K+=I*Ee,ue+=I*ze,ye+=I*qe,I=q[13],O+=I*Ie,pe+=I*Be,be+=I*xe,x+=I*$e,Z+=I*We,k+=I*Ne,W+=I*Ue,J+=I*X,S+=I*N,D+=I*U,G+=I*ie,z+=I*le,K+=I*me,ue+=I*Ee,ye+=I*ze,we+=I*qe,I=q[14],pe+=I*Ie,be+=I*Be,x+=I*xe,Z+=I*$e,k+=I*We,W+=I*Ne,J+=I*Ue,S+=I*X,D+=I*N,G+=I*U,z+=I*ie,K+=I*le,ue+=I*me,ye+=I*Ee,we+=I*ze,je+=I*qe,I=q[15],be+=I*Ie,x+=I*Be,Z+=I*xe,k+=I*$e,W+=I*We,J+=I*Ne,S+=I*Ue,D+=I*X,G+=I*N,z+=I*U,K+=I*ie,ue+=I*le,ye+=I*me,we+=I*Ee,je+=I*ze,Me+=I*qe,V+=38*x,Q+=38*Z,te+=38*k,oe+=38*W,d+=38*J,g+=38*S,m+=38*D,b+=38*G,E+=38*z,C+=38*K,B+=38*ue,R+=38*ye,w+=38*we,O+=38*je,pe+=38*Me,T=1,I=V+T+65535,T=Math.floor(I/65536),V=I-T*65536,I=Q+T+65535,T=Math.floor(I/65536),Q=I-T*65536,I=te+T+65535,T=Math.floor(I/65536),te=I-T*65536,I=oe+T+65535,T=Math.floor(I/65536),oe=I-T*65536,I=d+T+65535,T=Math.floor(I/65536),d=I-T*65536,I=g+T+65535,T=Math.floor(I/65536),g=I-T*65536,I=m+T+65535,T=Math.floor(I/65536),m=I-T*65536,I=b+T+65535,T=Math.floor(I/65536),b=I-T*65536,I=E+T+65535,T=Math.floor(I/65536),E=I-T*65536,I=C+T+65535,T=Math.floor(I/65536),C=I-T*65536,I=B+T+65535,T=Math.floor(I/65536),B=I-T*65536,I=R+T+65535,T=Math.floor(I/65536),R=I-T*65536,I=w+T+65535,T=Math.floor(I/65536),w=I-T*65536,I=O+T+65535,T=Math.floor(I/65536),O=I-T*65536,I=pe+T+65535,T=Math.floor(I/65536),pe=I-T*65536,I=be+T+65535,T=Math.floor(I/65536),be=I-T*65536,V+=T-1+37*(T-1),T=1,I=V+T+65535,T=Math.floor(I/65536),V=I-T*65536,I=Q+T+65535,T=Math.floor(I/65536),Q=I-T*65536,I=te+T+65535,T=Math.floor(I/65536),te=I-T*65536,I=oe+T+65535,T=Math.floor(I/65536),oe=I-T*65536,I=d+T+65535,T=Math.floor(I/65536),d=I-T*65536,I=g+T+65535,T=Math.floor(I/65536),g=I-T*65536,I=m+T+65535,T=Math.floor(I/65536),m=I-T*65536,I=b+T+65535,T=Math.floor(I/65536),b=I-T*65536,I=E+T+65535,T=Math.floor(I/65536),E=I-T*65536,I=C+T+65535,T=Math.floor(I/65536),C=I-T*65536,I=B+T+65535,T=Math.floor(I/65536),B=I-T*65536,I=R+T+65535,T=Math.floor(I/65536),R=I-T*65536,I=w+T+65535,T=Math.floor(I/65536),w=I-T*65536,I=O+T+65535,T=Math.floor(I/65536),O=I-T*65536,I=pe+T+65535,T=Math.floor(I/65536),pe=I-T*65536,I=be+T+65535,T=Math.floor(I/65536),be=I-T*65536,V+=T-1+37*(T-1),F[0]=V,F[1]=Q,F[2]=te,F[3]=oe,F[4]=d,F[5]=g,F[6]=m,F[7]=b,F[8]=E,F[9]=C,F[10]=B,F[11]=R,F[12]=w,F[13]=O,F[14]=pe,F[15]=be}function y(F,q){v(F,q,q)}function A(F,q){const Y=n();for(let I=0;I<16;I++)Y[I]=q[I];for(let I=253;I>=0;I--)y(Y,Y),I!==2&&I!==4&&v(Y,Y,q);for(let I=0;I<16;I++)F[I]=Y[I]}function M(F,q){const Y=new Uint8Array(32),I=new Float64Array(80),T=n(),V=n(),Q=n(),te=n(),oe=n(),d=n();for(let E=0;E<31;E++)Y[E]=F[E];Y[31]=F[31]&127|64,Y[0]&=248,l(I,q);for(let E=0;E<16;E++)V[E]=I[E];T[0]=te[0]=1;for(let E=254;E>=0;--E){const C=Y[E>>>3]>>>(E&7)&1;a(T,V,C),a(Q,te,C),h(oe,T,Q),f(T,T,Q),h(Q,V,te),f(V,V,te),y(te,oe),y(d,T),v(T,Q,T),v(Q,V,oe),h(oe,T,Q),f(T,T,Q),y(V,T),f(Q,te,d),v(T,Q,s),h(T,T,te),v(Q,Q,T),v(T,te,d),v(te,V,I),y(V,oe),a(T,V,C),a(Q,te,C)}for(let E=0;E<16;E++)I[E+16]=T[E],I[E+32]=Q[E],I[E+48]=V[E],I[E+64]=te[E];const g=I.subarray(32),m=I.subarray(16);A(g,g),v(m,m,g);const b=new Uint8Array(32);return c(b,m),b}r.scalarMult=M;function $(F){return M(F,i)}r.scalarMultBase=$;function L(F){if(F.length!==r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${r.SECRET_KEY_LENGTH} bytes`);const q=new Uint8Array(F);return{publicKey:$(q),secretKey:q}}r.generateKeyPairFromSeed=L;function P(F){const q=(0,e.randomBytes)(32,F),Y=L(q);return(0,t.wipe)(q),Y}r.generateKeyPair=P;function H(F,q,Y=!1){if(F.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(q.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const I=M(F,q);if(Y){let T=0;for(let V=0;Vi+s.length,0));const t=Yj(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return t}function $1e(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,F=new Uint8Array(H);L!==P;){for(var q=A[L],Y=0,I=H-1;(q!==0||Y<$)&&I!==-1;I--,Y++)q+=256*F[I]>>>0,F[I]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");$=Y,L++}for(var T=H-$;T!==H&&F[T]===0;)T++;for(var V=c.repeat(M);T>>0,H=new Uint8Array(P);A[M];){var F=t[A.charCodeAt(M)];if(F===255)return;for(var q=0,Y=P-1;(F!==0||q>>0,H[Y]=F%256>>>0,F=F/256>>>0;if(F!==0)throw new Error("Non-zero carry");L=q,M++}if(A[M]!==" "){for(var I=P-L;I!==P&&H[I]===0;)I++;for(var T=new Uint8Array($+(P-I)),V=$;I!==P;)T[V++]=H[I++];return T}}}function y(A){var M=v(A);if(M)return M;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:v,decode:y}}var B1e=$1e,L1e=B1e;const U1e=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},F1e=r=>new TextEncoder().encode(r),j1e=r=>new TextDecoder().decode(r);class H1e{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class W1e{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Qj(this,e)}}class z1e{constructor(e){this.decoders=e}or(e){return Qj(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Qj=(r,e)=>new z1e({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class V1e{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new H1e(e,t,n),this.decoder=new W1e(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const U_=({name:r,prefix:e,encode:t,decode:n})=>new V1e(r,e,t,n),Jy=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=L1e(t,e);return U_({prefix:r,name:e,encode:n,decode:s=>U1e(i(s))})},q1e=(r,e,t,n)=>{const i={};for(let h=0;h=8&&(a-=8,o[l++]=255&c>>a)}if(a>=t||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},K1e=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)o-=t,s+=e[i&a>>o];if(o&&(s+=e[i&a<U_({prefix:e,name:r,encode(i){return K1e(i,n,t)},decode(i){return q1e(i,n,t,r)}}),G1e=U_({prefix:"\0",name:"identity",encode:r=>j1e(r),decode:r=>F1e(r)}),Z1e=Object.freeze(Object.defineProperty({__proto__:null,identity:G1e},Symbol.toStringTag,{value:"Module"})),Y1e=fs({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Q1e=Object.freeze(Object.defineProperty({__proto__:null,base2:Y1e},Symbol.toStringTag,{value:"Module"})),J1e=fs({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),X1e=Object.freeze(Object.defineProperty({__proto__:null,base8:J1e},Symbol.toStringTag,{value:"Module"})),ege=Jy({prefix:"9",name:"base10",alphabet:"0123456789"}),tge=Object.freeze(Object.defineProperty({__proto__:null,base10:ege},Symbol.toStringTag,{value:"Module"})),rge=fs({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),nge=fs({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),ige=Object.freeze(Object.defineProperty({__proto__:null,base16:rge,base16upper:nge},Symbol.toStringTag,{value:"Module"})),sge=fs({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),oge=fs({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),age=fs({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),cge=fs({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),lge=fs({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),uge=fs({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),hge=fs({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),dge=fs({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),fge=fs({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),pge=Object.freeze(Object.defineProperty({__proto__:null,base32:sge,base32hex:lge,base32hexpad:hge,base32hexpadupper:dge,base32hexupper:uge,base32pad:age,base32padupper:cge,base32upper:oge,base32z:fge},Symbol.toStringTag,{value:"Module"})),gge=Jy({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),mge=Jy({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),wge=Object.freeze(Object.defineProperty({__proto__:null,base36:gge,base36upper:mge},Symbol.toStringTag,{value:"Module"})),vge=Jy({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),yge=Jy({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),bge=Object.freeze(Object.defineProperty({__proto__:null,base58btc:vge,base58flickr:yge},Symbol.toStringTag,{value:"Module"})),_ge=fs({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),xge=fs({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Age=fs({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ege=fs({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Cge=Object.freeze(Object.defineProperty({__proto__:null,base64:_ge,base64pad:xge,base64url:Age,base64urlpad:Ege},Symbol.toStringTag,{value:"Module"})),Jj=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Sge=Jj.reduce((r,e,t)=>(r[t]=e,r),[]),Ige=Jj.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function Tge(r){return r.reduce((e,t)=>(e+=Sge[t],e),"")}function Rge(r){const e=[];for(const t of r){const n=Ige[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const kge=U_({prefix:"🚀",name:"base256emoji",encode:Tge,decode:Rge}),Nge=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:kge},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const HO={...Z1e,...Q1e,...X1e,...tge,...ige,...pge,...wge,...bge,...Cge,...Nge};function Xj(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const WO=Xj("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),BE=Xj("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=Yj(r.length);for(let t=0;t{if(e.length&&!e.includes(n))return;const i=r[n];t.push(...i.accounts)}),t}function tH(r,e){return r.includes(":")?[r]:e.chains||[]}var Mge=Object.defineProperty,VO=Object.getOwnPropertySymbols,Dge=Object.prototype.hasOwnProperty,$ge=Object.prototype.propertyIsEnumerable,qO=(r,e,t)=>e in r?Mge(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,KO=(r,e)=>{for(var t in e||(e={}))Dge.call(e,t)&&qO(r,t,e[t]);if(VO)for(var t of VO(e))$ge.call(e,t)&&qO(r,t,e[t]);return r};const Bge="ReactNative",ha={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Lge="js";function jv(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function e2(){return!QI()&&!!JI()&&navigator.product===Bge}function t2(){return!jv()&&!!JI()&&!!QI()}function Xy(){return e2()?ha.reactNative:jv()?ha.node:t2()?ha.browser:ha.unknown}function Uge(){var r;try{return e2()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(r=global.Application)==null?void 0:r.applicationId:void 0}catch{return}}function Fge(r,e){let t=Fv.parse(r);return t=KO(KO({},t),e),r=Fv.stringify(t),r}function jge(){return Bj()||{name:"",description:"",url:"",icons:[""]}}function Hge(){if(Xy()===ha.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:t,Version:n}=global.Platform;return[t,n].join("-")}const r=Y0e();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function Wge(){var r;const e=Xy();return e===ha.browser?[e,((r=$j())==null?void 0:r.host)||"unknown"].join(":"):e}function zge(r,e,t){const n=Hge(),i=Wge();return[[r,e].join("-"),[Lge,t].join("-"),n,i].join("/")}function Vge({protocol:r,version:e,relayUrl:t,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a}){const c=t.split("?"),l=zge(r,e,n),h={auth:i,ua:l,projectId:s,useOnCloseEvent:o||void 0,origin:a||void 0},f=Fge(c[1]||"",h);return c[0]+"?"+f}function Z0(r,e){return r.filter(t=>e.includes(t)).length===r.length}function rH(r){return Object.fromEntries(r.entries())}function nH(r){return new Map(Object.entries(r))}function B0(r=Tt.FIVE_MINUTES,e){const t=Tt.toMiliseconds(r||Tt.FIVE_MINUTES);let n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},t),n=o,i=a})}}function Jg(r,e,t){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(t)),e);try{const o=await r;n(o)}catch(o){i(o)}clearTimeout(s)})}function iH(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function qge(r){return iH("topic",r)}function Kge(r){return iH("id",r)}function sH(r){const[e,t]=r.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")n.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return n}function as(r,e){return Tt.fromMiliseconds(Date.now()+Tt.toMiliseconds(r))}function Yd(r){return Date.now()>=Tt.toMiliseconds(r)}function Mr(r,e){return`${r}${e?`:${e}`:""}`}function R4(r=[],e=[]){return[...new Set([...r,...e])]}async function Gge({id:r,topic:e,wcDeepLink:t}){try{if(!t)return;const n=typeof t=="string"?JSON.parse(t):t;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${r}&sessionTopic=${e}`,o=Xy();o===ha.browser?s.startsWith("https://")||s.startsWith("http://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===ha.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(s)}catch(n){console.error(n)}}async function Zge(r,e){try{return await r.getItem(e)||(t2()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}var oH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yge(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 aH={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=oH: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 QO=Xge();var bC;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(bC||(bC={}));var Uc;(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"})(Uc||(Uc={}));const JO="0123456789abcdef";let ls=class ki{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();k4[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(YO>k4[n])&&console.log.apply(console,t)}debug(...e){this._log(ki.levels.DEBUG,e)}info(...e){this._log(ki.levels.INFO,e)}warn(...e){this._log(ki.levels.WARNING,e)}makeError(e,t,n){if(ZO)return this.makeError("censored error",t,{});t||(t=ki.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+=JO[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 Uc.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 Uc.CALL_EXCEPTION:case Uc.INSUFFICIENT_FUNDS:case Uc.MISSING_NEW:case Uc.NONCE_EXPIRED:case Uc.REPLACEMENT_UNDERPRICED:case Uc.TRANSACTION_REPLACED:case Uc.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,ki.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){QO&&this.throwError("platform missing String.prototype.normalize",ki.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:QO})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,ki.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,ki.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,ki.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",ki.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",ki.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ki.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return LE||(LE=new ki(Jge)),LE}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",ki.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),GO){if(!e)return;this.globalLogger().throwError("error censorship permanent",ki.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ZO=!!e,GO=!!t}static setLogLevel(e){const t=k4[e.toLowerCase()];if(t==null){ki.globalLogger().warn("invalid log level - "+e);return}YO=t}static from(e){return new ki(e)}};ls.errors=Uc,ls.levels=bC;const eme="bytes/5.7.0",hi=new ls(eme);function cH(r){return!!r.toHexString}function Xg(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return Xg(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function tme(r){return fa(r)&&!(r.length%2)||r2(r)}function XO(r){return typeof r=="number"&&r==r&&r%1===0}function r2(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!XO(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function si(r,e){if(e||(e={}),typeof r=="number"){hi.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),Xg(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),cH(r)&&(r=r.toHexString()),fa(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":hi.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;isi(i)),t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Xg(n)}function nme(r,e){r=si(r),r.length>e&&hi.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),Xg(t)}function fa(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const UE="0123456789abcdef";function No(r,e){if(e||(e={}),typeof r=="number"){hi.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=UE[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),cH(r))return r.toHexString();if(fa(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":hi.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(r2(r)){let t="0x";for(let n=0;n>4]+UE[i&15]}return t}return hi.throwArgumentError("invalid hexlify value","value",r)}function ime(r){if(typeof r!="string")r=No(r);else if(!fa(r)||r.length%2)return null;return(r.length-2)/2}function eM(r,e,t){return typeof r!="string"?r=No(r):(!fa(r)||r.length%2)&&hi.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function wu(r,e){for(typeof r!="string"?r=No(r):fa(r)||hi.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&hi.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function lH(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(tme(r)){let t=si(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=No(t.slice(0,32)),e.s=No(t.slice(32,64))):t.length===65?(e.r=No(t.slice(0,32)),e.s=No(t.slice(32,64)),e.v=t[64]):hi.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:hi.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=No(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const i=nme(si(e._vs),32);e._vs=No(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&hi.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const o=No(i);e.s==null?e.s=o:e.s!==o&&hi.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?hi.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&hi.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!fa(e.r)?hi.throwArgumentError("signature missing or invalid r","signature",r):e.r=wu(e.r,32),e.s==null||!fa(e.s)?hi.throwArgumentError("signature missing or invalid s","signature",r):e.s=wu(e.s,32);const t=si(e.s);t[0]>=128&&hi.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const n=No(t);e._vs&&(fa(e._vs)||hi.throwArgumentError("signature invalid _vs","signature",r),e._vs=wu(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&hi.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function iT(r){return"0x"+Qge.keccak_256(si(r))}var uH={exports:{}},sme={},ome=Object.freeze({__proto__:null,default:sme}),ame=Yge(ome);(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=ame.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,oH)})(uH);var mr=uH.exports;const hH="bignumber/5.7.0";var i8=mr.BN;const Ch=new ls(hH),FE={},tM=9007199254740991;function cme(r){return r!=null&&(ho.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||fa(r)||typeof r=="bigint"||r2(r))}let rM=!1,ho=class Oc{constructor(e,t){e!==FE&&Ch.throwError("cannot call constructor directly; use BigNumber.from",ls.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Ao($r(this).fromTwos(e))}toTwos(e){return Ao($r(this).toTwos(e))}abs(){return this._hex[0]==="-"?Oc.from(this._hex.substring(1)):this}add(e){return Ao($r(this).add($r(e)))}sub(e){return Ao($r(this).sub($r(e)))}div(e){return Oc.from(e).isZero()&&La("division-by-zero","div"),Ao($r(this).div($r(e)))}mul(e){return Ao($r(this).mul($r(e)))}mod(e){const t=$r(e);return t.isNeg()&&La("division-by-zero","mod"),Ao($r(this).umod(t))}pow(e){const t=$r(e);return t.isNeg()&&La("negative-power","pow"),Ao($r(this).pow(t))}and(e){const t=$r(e);return(this.isNegative()||t.isNeg())&&La("unbound-bitwise-result","and"),Ao($r(this).and(t))}or(e){const t=$r(e);return(this.isNegative()||t.isNeg())&&La("unbound-bitwise-result","or"),Ao($r(this).or(t))}xor(e){const t=$r(e);return(this.isNegative()||t.isNeg())&&La("unbound-bitwise-result","xor"),Ao($r(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&La("negative-width","mask"),Ao($r(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&La("negative-width","shl"),Ao($r(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&La("negative-width","shr"),Ao($r(this).shrn(e))}eq(e){return $r(this).eq($r(e))}lt(e){return $r(this).lt($r(e))}lte(e){return $r(this).lte($r(e))}gt(e){return $r(this).gt($r(e))}gte(e){return $r(this).gte($r(e))}isNegative(){return this._hex[0]==="-"}isZero(){return $r(this).isZero()}toNumber(){try{return $r(this).toNumber()}catch{La("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Ch.throwError("this platform does not support BigInt",ls.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?rM||(rM=!0,Ch.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ch.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ls.errors.UNEXPECTED_ARGUMENT,{}):Ch.throwError("BigNumber.toString does not accept parameters",ls.errors.UNEXPECTED_ARGUMENT,{})),$r(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Oc)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Oc(FE,Hv(e)):e.match(/^-?[0-9]+$/)?new Oc(FE,Hv(new i8(e))):Ch.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&La("underflow","BigNumber.from",e),(e>=tM||e<=-tM)&&La("overflow","BigNumber.from",e),Oc.from(String(e));const t=e;if(typeof t=="bigint")return Oc.from(t.toString());if(r2(t))return Oc.from(No(t));if(t)if(t.toHexString){const n=t.toHexString();if(typeof n=="string")return Oc.from(n)}else{let n=t._hex;if(n==null&&t.type==="BigNumber"&&(n=t.hex),typeof n=="string"&&(fa(n)||n[0]==="-"&&fa(n.substring(1))))return Oc.from(n)}return Ch.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Hv(r){if(typeof r!="string")return Hv(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Ch.throwArgumentError("invalid hex","value",r),r=Hv(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 Ao(r){return ho.from(Hv(r))}function $r(r){const e=ho.from(r).toHexString();return e[0]==="-"?new i8("-"+e.substring(3),16):new i8(e.substring(2),16)}function La(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Ch.throwError(r,ls.errors.NUMERIC_FAULT,n)}function lme(r){return new i8(r,36).toString(16)}const Qs=new ls(hH),O3={},dH=ho.from(0),fH=ho.from(-1);function pH(r,e,t,n){const i={fault:e,operation:t};return n!==void 0&&(i.value=n),Qs.throwError(r,ls.errors.NUMERIC_FAULT,i)}let M3="0";for(;M3.length<256;)M3+=M3;function sT(r){if(typeof r!="number")try{r=ho.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+M3.substring(0,r):Qs.throwArgumentError("invalid decimal size","decimals",r)}function jE(r,e){e==null&&(e=0);const t=sT(e);r=ho.from(r);const n=r.lt(dH);n&&(r=r.mul(fH));let i=r.mod(t).toString();for(;i.length2&&Qs.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&&pH("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Qs.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&&Qs.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Qs.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new _C(O3,t,n,i)}},gH=class zs{constructor(e,t,n,i){e!==O3&&Qs.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ls.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&&Qs.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=wh(this._value,this.format.decimals),n=wh(e._value,e.format.decimals);return zs.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=wh(this._value,this.format.decimals),n=wh(e._value,e.format.decimals);return zs.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=wh(this._value,this.format.decimals),n=wh(e._value,e.format.decimals);return zs.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=wh(this._value,this.format.decimals),n=wh(e._value,e.format.decimals);return zs.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=zs.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(nM.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=zs.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(nM.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)&&Qs.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=zs.from("1"+M3.substring(0,e),this.format),i=ume.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&&Qs.throwArgumentError("invalid byte width","width",e);const t=ho.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return wu(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return zs.fromString(this._value,e)}static fromValue(e,t,n){return n==null&&t!=null&&!cme(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),zs.fromString(jE(e,t),HE.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=HE.from(t),i=wh(e,n.decimals);!n.signed&&i.lt(dH)&&pH("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=wu(s,n.width/8));const o=jE(i,n.decimals);return new zs(O3,s,o,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=HE.from(t);if(si(e).length>n.width/8)throw new Error("overflow");let i=ho.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=jE(i,n.decimals);return new zs(O3,s,o,n)}static from(e,t){if(typeof e=="string")return zs.fromString(e,t);if(r2(e))return zs.fromBytes(e,t);try{return zs.fromValue(e,0,t)}catch(n){if(n.code!==ls.errors.INVALID_ARGUMENT)throw n}return Qs.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}};const nM=gH.from(1),ume=gH.from("0.5"),hme="strings/5.7.0",dme=new ls(hme);var s8;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(s8||(s8={}));var iM;(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"})(iM||(iM={}));function WE(r,e=s8.current){e!=s8.current&&(dme.checkNormalize(),r=r.normalize(e));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);if(n>=r.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);t.push(o>>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 si(t)}function fme(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 sM(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}})}sM("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)),zE("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"),zE("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"),zE("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",fme),sM("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 pme(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 gme(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 wme(r){let e=0;return()=>r[e++]}function vme(r){return wme(mme(r))}function yme(r){return r&1?~r>>1:r>>1}function bme(r,e){let t=Array(r);for(let n=0;ne[o]):t}function xme(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(Eme(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(Cme(t,r))}return gme(mH(e))}function Ame(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function wH(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function Eme(r,e){let t=1+e(),n=e(),i=Ame(e),s=wH(i.length,1+r,e);return mH(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 Cme(r,e){let t=1+e();return wH(t,1+r,e).map(n=>[n[0],n.slice(1)])}function Sme(r){let e=o8(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=o8(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 Ime(){return vme(pme("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const j5=Ime();new Set(o8(j5)),new Set(o8(j5)),xme(j5),Sme(j5);const Tme=new Uint8Array(32);Tme.fill(0);const Rme=`Ethereum Signed Message: +`;function vH(r){return typeof r=="string"&&(r=WE(r)),iT(rme([WE(Rme),WE(String(r.length)),r]))}const kme="address/5.7.0",o3=new ls(kme);function aM(r){fa(r,20)||o3.throwArgumentError("invalid address","address",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=si(iT(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 Nme=9007199254740991;function Pme(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}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 cM=Math.floor(Pme(Nme));function Ome(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>=cM;){let n=e.substring(0,cM);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}function Mme(r){let e=null;if(typeof r!="string"&&o3.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=aM(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&o3.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Ome(r)&&o3.throwArgumentError("bad icap checksum","address",r),e=lme(r.substring(4));e.length<40;)e="0"+e;e=aM("0x"+e)}else o3.throwArgumentError("invalid address","address",r);return e}function z2(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}const Dme=new Uint8Array(32);Dme.fill(0),ho.from(-1);const $me=ho.from(0),Bme=ho.from(1);ho.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),wu(Bme.toHexString(),32),wu($me.toHexString(),32);var Fl={},Ur={},eb=yH;function yH(r,e){if(!r)throw new Error(e||"Assertion failed")}yH.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var xC={exports:{}};typeof Object.create=="function"?xC.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:xC.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 Lme=eb,Ume=xC.exports;Ur.inherits=Ume;function Fme(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function jme(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):Fme(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}Ur.htonl=bH;function Wme(r,e){for(var t="",n=0;n>>0}return s}Ur.join32=zme;function Vme(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}Ur.split32=Vme;function qme(r,e){return r>>>e|r<<32-e}Ur.rotr32=qme;function Kme(r,e){return r<>>32-e}Ur.rotl32=Kme;function Gme(r,e){return r+e>>>0}Ur.sum32=Gme;function Zme(r,e,t){return r+e+t>>>0}Ur.sum32_3=Zme;function Yme(r,e,t,n){return r+e+t+n>>>0}Ur.sum32_4=Yme;function Qme(r,e,t,n,i){return r+e+t+n+i>>>0}Ur.sum32_5=Qme;function Jme(r,e,t,n){var i=r[e],s=r[e+1],o=n+s>>>0,a=(o>>0,r[e+1]=o}Ur.sum64=Jme;function Xme(r,e,t,n){var i=e+n>>>0,s=(i>>0}Ur.sum64_hi=Xme;function ewe(r,e,t,n){var i=e+n;return i>>>0}Ur.sum64_lo=ewe;function twe(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}Ur.sum64_4_hi=twe;function rwe(r,e,t,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Ur.sum64_4_lo=rwe;function nwe(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}Ur.sum64_5_hi=nwe;function iwe(r,e,t,n,i,s,o,a,c,l){var h=e+n+s+a+l;return h>>>0}Ur.sum64_5_lo=iwe;function swe(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}Ur.rotr64_hi=swe;function owe(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Ur.rotr64_lo=owe;function awe(r,e,t){return r>>>t}Ur.shr64_hi=awe;function cwe(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Ur.shr64_lo=cwe;var n2={},lM=Ur,lwe=eb;function H5(){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}n2.BlockHash=H5,H5.prototype.update=function(r,e){if(r=lM.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=lM.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}Qu.g0_256=pwe;function gwe(r){return vu(r,17)^vu(r,19)^r>>>10}Qu.g1_256=gwe;var Iw=Ur,mwe=n2,wwe=Qu,VE=Iw.rotl32,V2=Iw.sum32,vwe=Iw.sum32_5,ywe=wwe.ft_1,SH=mwe.BlockHash,bwe=[1518500249,1859775393,2400959708,3395469782];function iu(){if(!(this instanceof iu))return new iu;SH.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Iw.inherits(iu,SH);var _we=iu;iu.blockSize=512,iu.outSize=160,iu.hmacStrength=80,iu.padLength=64,iu.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()),c2e(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 mr(c,"hex","le")}t.intFromLE=a}),z5=va.getNAF,h2e=va.getJSF,a8=va.assert;function nf(r,e){this.type=r,this.p=new mr(e.p,16),this.red=e.prime?mr.red(e.prime):mr.mont(this.p),this.zero=new mr(0).toRed(this.red),this.one=new mr(1).toRed(this.red),this.two=new mr(2).toRed(this.red),this.n=e.n&&new mr(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 T1=nf;nf.prototype.point=function(){throw new Error("Not implemented")},nf.prototype.validate=function(){throw new Error("Not implemented")},nf.prototype._fixedNafMul=function(r,e){a8(r.precomputed);var t=r._getDoubles(),n=z5(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];a8(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},nf.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]=z5(t[y],s[y],this._bitLength),a[A]=z5(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=h2e(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},Ua.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}]},oc.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}},oc.prototype.pointFromX=function(r,e){r=new mr(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)},oc.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},oc.prototype._endoWnafMulAdd=function(r,e,t){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s":""},zi.prototype.isInfinity=function(){return this.inf},zi.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)},zi.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)},zi.prototype.getX=function(){return this.x.fromRed()},zi.prototype.getY=function(){return this.y.fromRed()},zi.prototype.mul=function(r){return r=new mr(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)},zi.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)},zi.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)},zi.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)},zi.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},zi.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 es(r,e,t,n){T1.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new mr(0)):(this.x=new mr(e,16),this.y=new mr(t,16),this.z=new mr(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}cT(es,T1.BasePoint),oc.prototype.jpoint=function(r,e,t){return new es(this,r,e,t)},es.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)},es.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},es.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)},es.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)},es.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}},es.prototype.inspect=function(){return this.isInfinity()?"":""},es.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var N4=s2(function(r,e){var t=e;t.base=T1,t.short=f2e,t.mont=null,t.edwards=null}),P4=s2(function(r,e){var t=e,n=va.assert;function i(a){a.type==="short"?this.curve=new N4.short(a):a.type==="edwards"?this.curve=new N4.edwards(a):this.curve=new N4.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:Fl.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:Fl.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:Fl.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:Fl.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:Fl.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:Fl.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:Fl.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:Fl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function sf(r){if(!(this instanceof sf))return new sf(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=tl.toArray(r.entropy,r.entropyEnc||"hex"),t=tl.toArray(r.nonce,r.nonceEnc||"hex"),n=tl.toArray(r.pers,r.persEnc||"hex");aT(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var fM=sf;sf.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},sf.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=tl.toArray(t,n||"hex"),this._update(t));for(var i=[];i.length"};var p2e=va.assert;function F_(r,e){if(r instanceof F_)return r;this._importDER(r,e)||(p2e(r.r&&r.s,"Signature without r or s"),this.r=new mr(r.r,16),this.s=new mr(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var V5=F_;function g2e(){this.place=0}function YE(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 pM(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)}F_.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=pM(e),t=pM(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var n=[2];QE(n,e.length),n=n.concat(e),n.push(2),QE(n,t.length);var i=n.concat(t),s=[48];return QE(s,i.length),s=s.concat(i),va.encode(s,r)};var m2e=function(){throw new Error("unsupported")},LH=va.assert;function Ja(r){if(!(this instanceof Ja))return new Ja(r);typeof r=="string"&&(LH(Object.prototype.hasOwnProperty.call(P4,r),"Unknown curve "+r),r=P4[r]),r instanceof P4.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 w2e=Ja;Ja.prototype.keyPair=function(r){return new ZE(this,r)},Ja.prototype.keyFromPrivate=function(r,e){return ZE.fromPrivate(this,r,e)},Ja.prototype.keyFromPublic=function(r,e){return ZE.fromPublic(this,r,e)},Ja.prototype.genKeyPair=function(r){r||(r={});for(var e=new fM({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||m2e(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new mr(2));;){var i=new mr(e.generate(t));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Ja.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},Ja.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 mr(r,16));for(var i=this.n.byteLength(),s=e.getPrivate().toArray("be",i),o=r.toArray("be",i),a=new fM({hash:this.hash,entropy:s,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new mr(1)),l=0;;l++){var h=n.k?n.k(l):new mr(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 V5({r:y,s:A,recoveryParam:M})}}}}}},Ja.prototype.verify=function(r,e,t,n){r=this._truncateToN(new mr(r,16)),t=this.keyFromPublic(t,n),e=new V5(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)},Ja.prototype.recoverPubKey=function(r,e,t,n){LH((3&t)===t,"The recovery param is more than two bits"),e=new V5(e,n);var i=this.n,s=new mr(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)},Ja.prototype.getKeyRecoveryParam=function(r,e,t,n){if(e=new V5(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 v2e=s2(function(r,e){var t=e;t.version="6.5.4",t.utils=va,t.rand=function(){throw new Error("unsupported")},t.curve=N4,t.curves=P4,t.ec=w2e,t.eddsa=null}),y2e=v2e.ec;const b2e="signing-key/5.7.0",CC=new ls(b2e);let JE=null;function Qd(){return JE||(JE=new y2e("secp256k1")),JE}class _2e{constructor(e){z2(this,"curve","secp256k1"),z2(this,"privateKey",No(e)),ime(this.privateKey)!==32&&CC.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Qd().keyFromPrivate(si(this.privateKey));z2(this,"publicKey","0x"+t.getPublic(!1,"hex")),z2(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),z2(this,"_isSigningKey",!0)}_addPoint(e){const t=Qd().keyFromPublic(si(this.publicKey)),n=Qd().keyFromPublic(si(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=Qd().keyFromPrivate(si(this.privateKey)),n=si(e);n.length!==32&&CC.throwArgumentError("bad digest length","digest",e);const i=t.sign(n,{canonical:!0});return lH({recoveryParam:i.recoveryParam,r:wu("0x"+i.r.toString(16),32),s:wu("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=Qd().keyFromPrivate(si(this.privateKey)),n=Qd().keyFromPublic(si(UH(e)));return wu("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function x2e(r,e){const t=lH(e),n={r:si(t.r),s:si(t.s)};return"0x"+Qd().recoverPubKey(si(r),n,t.recoveryParam).encode("hex",!1)}function UH(r,e){const t=si(r);return t.length===32?new _2e(t).publicKey:t.length===33?"0x"+Qd().keyFromPublic(t).getPublic(!1,"hex"):t.length===65?No(t):CC.throwArgumentError("invalid public or private key","key","[REDACTED]")}var gM;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(gM||(gM={}));function A2e(r){const e=UH(r);return Mme(eM(iT(eM(e,1)),12))}function E2e(r,e){return A2e(x2e(si(r),e))}const C2e="https://rpc.walletconnect.com/v1";async function S2e(r,e,t,n,i,s){switch(t.t){case"eip191":return I2e(r,e,t.s);case"eip1271":return await T2e(r,e,t.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}function I2e(r,e,t){return E2e(vH(e),t).toLowerCase()===r.toLowerCase()}async function T2e(r,e,t,n,i,s){try{const o="0x1626ba7e",a="0000000000000000000000000000000000000000000000000000000000000040",c="0000000000000000000000000000000000000000000000000000000000000041",l=t.substring(2),h=vH(e).substring(2),f=o+h+a+c+l,v=await fetch(`${s||C2e}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:R2e(),jsonrpc:"2.0",method:"eth_call",params:[{to:r,data:f},"latest"]})}),{result:y}=await v.json();return y?y.slice(0,o.length).toLowerCase()===o.toLowerCase():!1}catch(o){return console.error("isValidEip1271Signature: ",o),!1}}function R2e(){return Date.now()+Math.floor(Math.random()*1e3)}var k2e=Object.defineProperty,N2e=Object.defineProperties,P2e=Object.getOwnPropertyDescriptors,mM=Object.getOwnPropertySymbols,O2e=Object.prototype.hasOwnProperty,M2e=Object.prototype.propertyIsEnumerable,wM=(r,e,t)=>e in r?k2e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,D2e=(r,e)=>{for(var t in e||(e={}))O2e.call(e,t)&&wM(r,t,e[t]);if(mM)for(var t of mM(e))M2e.call(e,t)&&wM(r,t,e[t]);return r},$2e=(r,e)=>N2e(r,P2e(e));const B2e="did:pkh:",lT=r=>r==null?void 0:r.split(":"),FH=r=>{const e=r&&lT(r);if(e)return r.includes(B2e)?e[3]:e[1]},vM=r=>{const e=r&&lT(r);if(e)return e[2]+":"+e[3]},c8=r=>{const e=r&&lT(r);if(e)return e.pop()};async function yM(r){const{cacao:e,projectId:t}=r,{s:n,p:i}=e,s=jH(i,i.iss),o=c8(i.iss);return await S2e(o,s,n,FH(i.iss),t)}const jH=(r,e)=>{const t=`${r.domain} wants you to sign in with your Ethereum account:`,n=c8(e);if(!r.aud&&!r.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=r.statement||void 0;const s=`URI: ${r.aud||r.uri}`,o=`Version: ${r.version}`,a=`Chain ID: ${FH(e)}`,c=`Nonce: ${r.nonce}`,l=`Issued At: ${r.iat}`,h=r.exp?`Expiration Time: ${r.exp}`:void 0,f=r.nbf?`Not Before: ${r.nbf}`:void 0,v=r.requestId?`Request ID: ${r.requestId}`:void 0,y=r.resources?`Resources:${r.resources.map(M=>` +- ${M}`).join("")}`:void 0,A=O4(r.resources);if(A){const M=Wv(A);i=q2e(i,M)}return[t,n,"",i,"",s,o,a,c,l,h,f,v,y].filter(M=>M!=null).join(` +`)};function L2e(r){return Buffer.from(JSON.stringify(r)).toString("base64")}function U2e(r){return JSON.parse(Buffer.from(r,"base64").toString("utf-8"))}function s1(r){if(!r)throw new Error("No recap provided, value is undefined");if(!r.att)throw new Error("No `att` property found");const e=Object.keys(r.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(t=>{const n=r.att[t];if(Array.isArray(n))throw new Error(`Resource must be an object: ${t}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function F2e(r,e,t,n={}){return t==null||t.sort((i,s)=>i.localeCompare(s)),{att:{[r]:j2e(e,t,n)}}}function j2e(r,e,t={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${r}/${i}`]:[t]}));return Object.assign({},...n)}function HH(r){return s1(r),`urn:recap:${L2e(r).replace(/=/g,"")}`}function Wv(r){const e=U2e(r.replace("urn:recap:",""));return s1(e),e}function H2e(r,e,t){const n=F2e(r,e,t);return HH(n)}function W2e(r){return r&&r.includes("urn:recap:")}function z2e(r,e){const t=Wv(r),n=Wv(e),i=V2e(t,n);return HH(i)}function V2e(r,e){s1(r),s1(e);const t=Object.keys(r.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return t.forEach(i=>{var s,o;Object.keys(((s=r.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=$2e(D2e({},n.att[i]),{[a]:((c=r.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function q2e(r="",e){s1(e);const t="I further authorize the stated URI to perform the following actions on my behalf: ";if(r.includes(t))return r;const n=[];let i=0;Object.keys(e.att).forEach(a=>{const c=Object.keys(e.att[a]).map(f=>({ability:f.split("/")[0],action:f.split("/")[1]}));c.sort((f,v)=>f.action.localeCompare(v.action));const l={};c.forEach(f=>{l[f.ability]||(l[f.ability]=[]),l[f.ability].push(f.action)});const h=Object.keys(l).map(f=>(i++,`(${i}) '${f}': '${l[f].join("', '")}' for '${a}'.`));n.push(h.join(", ").replace(".,","."))});const s=n.join(" "),o=`${t}${s}`;return`${r?r+" ":""}${o}`}function bM(r){var e;const t=Wv(r);s1(t);const n=(e=t.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function _M(r){const e=Wv(r);s1(e);const t=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&t.push(i[0].chains)})}),[...new Set(t.flat())]}function O4(r){if(!r)return;const e=r==null?void 0:r[r.length-1];return W2e(e)?e:void 0}const WH="base10",so="base16",SC="base64pad",uT="utf8",zH=0,td=1,K2e=0,xM=1,IC=12,hT=32;function G2e(){const r=nT.generateKeyPair();return{privateKey:uo(r.secretKey,so),publicKey:uo(r.publicKey,so)}}function TC(){const r=Xw.randomBytes(hT);return uo(r,so)}function Z2e(r,e){const t=nT.sharedKey(Bo(r,so),Bo(e,so),!0),n=new S1e(L_.SHA256,t).expand(hT);return uo(n,so)}function M4(r){const e=L_.hash(Bo(r,so));return uo(e,so)}function Y0(r){const e=L_.hash(Bo(r,uT));return uo(e,so)}function Y2e(r){return Bo(`${r}`,WH)}function tb(r){return Number(uo(r,WH))}function Q2e(r){const e=Y2e(typeof r.type<"u"?r.type:zH);if(tb(e)===td&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?Bo(r.senderPublicKey,so):void 0,n=typeof r.iv<"u"?Bo(r.iv,so):Xw.randomBytes(IC),i=new eT.ChaCha20Poly1305(Bo(r.symKey,so)).seal(n,Bo(r.message,uT));return X2e({type:e,sealed:i,iv:n,senderPublicKey:t})}function J2e(r){const e=new eT.ChaCha20Poly1305(Bo(r.symKey,so)),{sealed:t,iv:n}=l8(r.encoded),i=e.open(n,t);if(i===null)throw new Error("Failed to decrypt");return uo(i,uT)}function X2e(r){if(tb(r.type)===td){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return uo(yC([r.type,r.senderPublicKey,r.iv,r.sealed]),SC)}return uo(yC([r.type,r.iv,r.sealed]),SC)}function l8(r){const e=Bo(r,SC),t=e.slice(K2e,xM),n=xM;if(tb(t)===td){const a=n+hT,c=a+IC,l=e.slice(n,a),h=e.slice(a,c),f=e.slice(c);return{type:t,sealed:f,iv:h,senderPublicKey:l}}const i=n+IC,s=e.slice(n,i),o=e.slice(i);return{type:t,sealed:o,iv:s}}function e3e(r,e){const t=l8(r);return VH({type:tb(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?uo(t.senderPublicKey,so):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function VH(r){const e=(r==null?void 0:r.type)||zH;if(e===td){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function AM(r){return r.type===td&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}const t3e="irn";function RC(r){return(r==null?void 0:r.relay)||{protocol:t3e}}function a3(r){const e=Pge[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var r3e=Object.defineProperty,n3e=Object.defineProperties,i3e=Object.getOwnPropertyDescriptors,EM=Object.getOwnPropertySymbols,s3e=Object.prototype.hasOwnProperty,o3e=Object.prototype.propertyIsEnumerable,CM=(r,e,t)=>e in r?r3e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,SM=(r,e)=>{for(var t in e||(e={}))s3e.call(e,t)&&CM(r,t,e[t]);if(EM)for(var t of EM(e))o3e.call(e,t)&&CM(r,t,e[t]);return r},a3e=(r,e)=>n3e(r,i3e(e));function c3e(r,e="-"){const t={},n="relay"+e;return Object.keys(r).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=r[i];t[s]=o}}),t}function IM(r){r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,n=r.substring(0,e),i=r.substring(e+1,t).split("@"),s=typeof t<"u"?r.substring(t):"",o=Fv.parse(s),a=typeof o.methods=="string"?o.methods.split(","):void 0;return{protocol:n,topic:l3e(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:c3e(o),methods:a,expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function l3e(r){return r.startsWith("//")?r.substring(2):r}function u3e(r,e="-"){const t="relay",n={};return Object.keys(r).forEach(i=>{const s=t+e+i;r[i]&&(n[s]=r[i])}),n}function h3e(r){return`${r.protocol}:${r.topic}@${r.version}?`+Fv.stringify(SM(a3e(SM({symKey:r.symKey},u3e(r.relay)),{expiryTimestamp:r.expiryTimestamp}),r.methods?{methods:r.methods.join(",")}:{}))}function o2(r){const e=[];return r.forEach(t=>{const[n,i]=t.split(":");e.push(`${n}:${i}`)}),e}function d3e(r){const e=[];return Object.values(r).forEach(t=>{e.push(...o2(t.accounts))}),e}function f3e(r,e){const t=[];return Object.values(r).forEach(n=>{o2(n.accounts).includes(e)&&t.push(...n.methods)}),t}function p3e(r,e){const t=[];return Object.values(r).forEach(n=>{o2(n.accounts).includes(e)&&t.push(...n.events)}),t}function dT(r){return r.includes(":")}function c3(r){return dT(r)?r.split(":")[0]:r}function g3e(r){const e={};return r==null||r.forEach(t=>{const[n,i]=t.split(":");e[n]||(e[n]={accounts:[],chains:[],events:[]}),e[n].accounts.push(t),e[n].chains.push(`${n}:${i}`)}),e}function TM(r,e){e=e.map(n=>n.replace("did:pkh:",""));const t=g3e(e);for(const[n,i]of Object.entries(t))i.methods?i.methods=R4(i.methods,r):i.methods=r,i.events=["chainChanged","accountsChanged"];return t}const m3e={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},w3e={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function ut(r,e){const{message:t,code:n}=w3e[r];return{message:e?`${t} ${e}`:t,code:n}}function pn(r,e){const{message:t,code:n}=m3e[r];return{message:e?`${t} ${e}`:t,code:n}}function ju(r,e){return!!Array.isArray(r)}function zv(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function Do(r){return typeof r>"u"}function di(r,e){return e&&Do(r)?!0:typeof r=="string"&&!!r.trim().length}function fT(r,e){return typeof r=="number"&&!isNaN(r)}function v3e(r,e){const{requiredNamespaces:t}=e,n=Object.keys(r.namespaces),i=Object.keys(t);let s=!0;return Z0(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=r.namespaces[o],h=o2(a),f=t[o];(!Z0(tH(o,f),h)||!Z0(f.methods,c)||!Z0(f.events,l))&&(s=!1)}),s):!1}function u8(r){return di(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function y3e(r){if(di(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&u8(t)}}return!1}function b3e(r){if(di(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}function _3e(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function x3e(r){return r==null?void 0:r.topic}function A3e(r,e){let t=null;return di(r==null?void 0:r.publicKey,!1)||(t=ut("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function RM(r){let e=!0;return ju(r)?r.length&&(e=r.every(t=>di(t,!1))):e=!1,e}function E3e(r,e,t){let n=null;return ju(e)&&e.length?e.forEach(i=>{n||u8(i)||(n=pn("UNSUPPORTED_CHAINS",`${t}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):u8(r)||(n=pn("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function C3e(r,e,t){let n=null;return Object.entries(r).forEach(([i,s])=>{if(n)return;const o=E3e(i,tH(i,s),`${e} ${t}`);o&&(n=o)}),n}function S3e(r,e){let t=null;return ju(r)?r.forEach(n=>{t||y3e(n)||(t=pn("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=pn("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function I3e(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=S3e(n==null?void 0:n.accounts,`${e} namespace`);i&&(t=i)}),t}function T3e(r,e){let t=null;return RM(r==null?void 0:r.methods)?RM(r==null?void 0:r.events)||(t=pn("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=pn("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function qH(r,e){let t=null;return Object.values(r).forEach(n=>{if(t)return;const i=T3e(n,`${e}, namespace`);i&&(t=i)}),t}function R3e(r,e,t){let n=null;if(r&&zv(r)){const i=qH(r,e);i&&(n=i);const s=C3e(r,e,t);s&&(n=s)}else n=ut("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return n}function XE(r,e){let t=null;if(r&&zv(r)){const n=qH(r,e);n&&(t=n);const i=I3e(r,e);i&&(t=i)}else t=ut("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function KH(r){return di(r.protocol,!0)}function k3e(r,e){let t=!1;return r?r&&ju(r)&&r.length&&r.forEach(n=>{t=KH(n)}):t=!0,t}function N3e(r){return typeof r=="number"}function To(r){return typeof r<"u"&&typeof r!==null}function P3e(r){return!(!r||typeof r!="object"||!r.code||!fT(r.code)||!r.message||!di(r.message,!1))}function O3e(r){return!(Do(r)||!di(r.method,!1))}function M3e(r){return!(Do(r)||Do(r.result)&&Do(r.error)||!fT(r.id)||!di(r.jsonrpc,!1))}function D3e(r){return!(Do(r)||!di(r.name,!1))}function kM(r,e){return!(!u8(e)||!d3e(r).includes(e))}function $3e(r,e,t){return di(t,!1)?f3e(r,e).includes(t):!1}function B3e(r,e,t){return di(t,!1)?p3e(r,e).includes(t):!1}function NM(r,e,t){let n=null;const i=L3e(r),s=U3e(e),o=Object.keys(i),a=Object.keys(s),c=PM(Object.keys(r)),l=PM(Object.keys(e)),h=c.filter(f=>!l.includes(f));return h.length&&(n=ut("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. + Required: ${h.toString()} + Received: ${Object.keys(e).toString()}`)),Z0(o,a)||(n=ut("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. + Required: ${o.toString()} + Approved: ${a.toString()}`)),Object.keys(e).forEach(f=>{if(!f.includes(":")||n)return;const v=o2(e[f].accounts);v.includes(f)||(n=ut("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${f} + Required: ${f} + Approved: ${v.toString()}`))}),o.forEach(f=>{n||(Z0(i[f].methods,s[f].methods)?Z0(i[f].events,s[f].events)||(n=ut("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${f}`)):n=ut("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function L3e(r){const e={};return Object.keys(r).forEach(t=>{var n;t.includes(":")?e[t]=r[t]:(n=r[t].chains)==null||n.forEach(i=>{e[i]={methods:r[t].methods,events:r[t].events}})}),e}function PM(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function U3e(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const n=o2(r[t].accounts);n==null||n.forEach(i=>{e[i]={accounts:r[t].accounts.filter(s=>s.includes(`${i}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function F3e(r,e){return fT(r)&&r<=e.max&&r>=e.min}function OM(){const r=Xy();return new Promise(e=>{switch(r){case ha.browser:e(j3e());break;case ha.reactNative:e(H3e());break;case ha.node:e(W3e());break;default:e(!0)}})}function j3e(){return t2()&&(navigator==null?void 0:navigator.onLine)}async function H3e(){if(e2()&&typeof global<"u"&&global!=null&&global.NetInfo){const r=await(global==null?void 0:global.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function W3e(){return!0}function z3e(r){switch(Xy()){case ha.browser:V3e(r);break;case ha.reactNative:q3e(r);break}}function V3e(r){!e2()&&t2()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function q3e(r){e2()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const e7={};class K2{static get(e){return e7[e]}static set(e,t){e7[e]=t}static delete(e){delete e7[e]}}const K3e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,G3e=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Z3e=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Y3e(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Q3e(r);return}return e}function Q3e(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function q5(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const n=t.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!Z3e.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(K3e.test(r)||G3e.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Y3e)}return JSON.parse(r)}catch(n){if(e.strict)throw n;return r}}function J3e(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function Gi(r,...e){try{return J3e(r(...e))}catch(t){return Promise.reject(t)}}function X3e(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function eve(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function D4(r){if(X3e(r))return String(r);if(eve(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return D4(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function GH(){if(typeof Buffer>"u")throw new TypeError("[unstorage] Buffer is not supported!")}const kC="base64:";function tve(r){if(typeof r=="string")return r;GH();const e=Buffer.from(r).toString("base64");return kC+e}function rve(r){return typeof r!="string"||!r.startsWith(kC)?r:(GH(),Buffer.from(r.slice(kC.length),"base64"))}function Io(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function nve(...r){return Io(r.join(":"))}function K5(r){return r=Io(r),r?r+":":""}const ive="memory",sve=()=>{const r=new Map;return{name:ive,getInstance:()=>r,hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return[...r.keys()]},clear(){r.clear()},dispose(){r.clear()}}};function ove(r={}){const e={mounts:{"":r.driver||sve()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=l=>{for(const h of e.mountpoints)if(l.startsWith(h))return{base:h,relativeKey:l.slice(h.length),driver:e.mounts[h]};return{base:"",relativeKey:l,driver:e.mounts[""]}},n=(l,h)=>e.mountpoints.filter(f=>f.startsWith(l)||h&&l.startsWith(f)).map(f=>({relativeBase:l.length>f.length?l.slice(f.length):void 0,mountpoint:f,driver:e.mounts[f]})),i=(l,h)=>{if(e.watching){h=Io(h);for(const f of e.watchListeners)f(l,h)}},s=async()=>{if(!e.watching){e.watching=!0;for(const l in e.mounts)e.unwatch[l]=await MM(e.mounts[l],i,l)}},o=async()=>{if(e.watching){for(const l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},a=(l,h,f)=>{const v=new Map,y=A=>{let M=v.get(A.base);return M||(M={driver:A.driver,base:A.base,items:[]},v.set(A.base,M)),M};for(const A of l){const M=typeof A=="string",$=Io(M?A:A.key),L=M?void 0:A.value,P=M||!A.options?h:{...h,...A.options},H=t($);y(H).items.push({key:$,value:L,relativeKey:H.relativeKey,options:P})}return Promise.all([...v.values()].map(A=>f(A))).then(A=>A.flat())},c={hasItem(l,h={}){l=Io(l);const{relativeKey:f,driver:v}=t(l);return Gi(v.hasItem,f,h)},getItem(l,h={}){l=Io(l);const{relativeKey:f,driver:v}=t(l);return Gi(v.getItem,f,h).then(y=>q5(y))},getItems(l,h){return a(l,h,f=>f.driver.getItems?Gi(f.driver.getItems,f.items.map(v=>({key:v.relativeKey,options:v.options})),h).then(v=>v.map(y=>({key:nve(f.base,y.key),value:q5(y.value)}))):Promise.all(f.items.map(v=>Gi(f.driver.getItem,v.relativeKey,v.options).then(y=>({key:v.key,value:q5(y)})))))},getItemRaw(l,h={}){l=Io(l);const{relativeKey:f,driver:v}=t(l);return v.getItemRaw?Gi(v.getItemRaw,f,h):Gi(v.getItem,f,h).then(y=>rve(y))},async setItem(l,h,f={}){if(h===void 0)return c.removeItem(l);l=Io(l);const{relativeKey:v,driver:y}=t(l);y.setItem&&(await Gi(y.setItem,v,D4(h),f),y.watch||i("update",l))},async setItems(l,h){await a(l,h,async f=>{if(f.driver.setItems)return Gi(f.driver.setItems,f.items.map(v=>({key:v.relativeKey,value:D4(v.value),options:v.options})),h);f.driver.setItem&&await Promise.all(f.items.map(v=>Gi(f.driver.setItem,v.relativeKey,D4(v.value),v.options)))})},async setItemRaw(l,h,f={}){if(h===void 0)return c.removeItem(l,f);l=Io(l);const{relativeKey:v,driver:y}=t(l);if(y.setItemRaw)await Gi(y.setItemRaw,v,h,f);else if(y.setItem)await Gi(y.setItem,v,tve(h),f);else return;y.watch||i("update",l)},async removeItem(l,h={}){typeof h=="boolean"&&(h={removeMeta:h}),l=Io(l);const{relativeKey:f,driver:v}=t(l);v.removeItem&&(await Gi(v.removeItem,f,h),(h.removeMeta||h.removeMata)&&await Gi(v.removeItem,f+"$",h),v.watch||i("remove",l))},async getMeta(l,h={}){typeof h=="boolean"&&(h={nativeOnly:h}),l=Io(l);const{relativeKey:f,driver:v}=t(l),y=Object.create(null);if(v.getMeta&&Object.assign(y,await Gi(v.getMeta,f,h)),!h.nativeOnly){const A=await Gi(v.getItem,f+"$",h).then(M=>q5(M));A&&typeof A=="object"&&(typeof A.atime=="string"&&(A.atime=new Date(A.atime)),typeof A.mtime=="string"&&(A.mtime=new Date(A.mtime)),Object.assign(y,A))}return y},setMeta(l,h,f={}){return this.setItem(l+"$",h,f)},removeMeta(l,h={}){return this.removeItem(l+"$",h)},async getKeys(l,h={}){l=K5(l);const f=n(l,!0);let v=[];const y=[];for(const A of f){const M=await Gi(A.driver.getKeys,A.relativeBase,h);for(const $ of M){const L=A.mountpoint+Io($);v.some(P=>L.startsWith(P))||y.push(L)}v=[A.mountpoint,...v.filter($=>!$.startsWith(A.mountpoint))]}return l?y.filter(A=>A.startsWith(l)&&A[A.length-1]!=="$"):y.filter(A=>A[A.length-1]!=="$")},async clear(l,h={}){l=K5(l),await Promise.all(n(l,!1).map(async f=>{if(f.driver.clear)return Gi(f.driver.clear,f.relativeBase,h);if(f.driver.removeItem){const v=await f.driver.getKeys(f.relativeBase||"",h);return Promise.all(v.map(y=>f.driver.removeItem(y,h)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>DM(l)))},async watch(l){return await s(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(h=>h!==l),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(l,h){if(l=K5(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((f,v)=>v.length-f.length)),e.mounts[l]=h,e.watching&&Promise.resolve(MM(h,i,l)).then(f=>{e.unwatch[l]=f}).catch(console.error),c},async unmount(l,h=!0){l=K5(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&(e.unwatch[l](),delete e.unwatch[l]),h&&await DM(e.mounts[l]),e.mountpoints=e.mountpoints.filter(f=>f!==l),delete e.mounts[l])},getMount(l=""){l=Io(l)+":";const h=t(l);return{driver:h.driver,base:h.base}},getMounts(l="",h={}){return l=Io(l),n(l,h.parents).map(v=>({driver:v.driver,base:v.mountpoint}))},keys:(l,h={})=>c.getKeys(l,h),get:(l,h={})=>c.getItem(l,h),set:(l,h,f={})=>c.setItem(l,h,f),has:(l,h={})=>c.hasItem(l,h),del:(l,h={})=>c.removeItem(l,h),remove:(l,h={})=>c.removeItem(l,h)};return c}function MM(r,e,t){return r.watch?r.watch((n,i)=>e(n,t+i)):()=>{}}async function DM(r){typeof r.dispose=="function"&&await Gi(r.dispose)}function R1(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function ZH(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const n=R1(t);return(i,s)=>n.then(o=>s(o.transaction(e,i).objectStore(e)))}let t7;function rb(){return t7||(t7=ZH("keyval-store","keyval")),t7}function $M(r,e=rb()){return e("readonly",t=>R1(t.get(r)))}function ave(r,e,t=rb()){return t("readwrite",n=>(n.put(e,r),R1(n.transaction)))}function cve(r,e=rb()){return e("readwrite",t=>(t.delete(r),R1(t.transaction)))}function lve(r=rb()){return r("readwrite",e=>(e.clear(),R1(e.transaction)))}function uve(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},R1(r.transaction)}function hve(r=rb()){return r("readonly",e=>{if(e.getAllKeys)return R1(e.getAllKeys());const t=[];return uve(e,n=>t.push(n.key)).then(()=>t)})}const dve="idb-keyval";var fve=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=i=>e+i;let n;return r.dbName&&r.storeName&&(n=ZH(r.dbName,r.storeName)),{name:dve,options:r,async hasItem(i){return!(typeof await $M(t(i),n)>"u")},async getItem(i){return await $M(t(i),n)??null},setItem(i,s){return ave(t(i),s,n)},removeItem(i){return cve(t(i),n)},getKeys(){return hve(n)},clear(){return lve(n)}}};const pve="WALLET_CONNECT_V2_INDEXED_DB",gve="keyvaluestorage";let mve=class{constructor(){this.indexedDb=ove({driver:fve({dbName:pve,storeName:gve})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,id(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};var r7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$4={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,n){this[t]=String(n)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(n){t[n]=void 0,delete t[n]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof r7<"u"&&r7.localStorage?$4.exports=r7.localStorage:typeof window<"u"&&window.localStorage?$4.exports=window.localStorage:$4.exports=new e})();function wve(r){var e;return[r[0],Sy((e=r[1])!=null?e:"")]}let vve=class{constructor(){this.localStorage=$4.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(wve)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Sy(t)}async setItem(e,t){this.localStorage.setItem(e,id(t))}async removeItem(e){this.localStorage.removeItem(e)}};const yve="wc_storage_version",BM=1,bve=async(r,e,t)=>{const n=yve,i=await e.getItem(n);if(i&&i>=BM){t(e);return}const s=await r.getKeys();if(!s.length){t(e);return}const o=[];for(;s.length;){const a=s.shift();if(!a)continue;const c=a.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await r.getItem(a);await e.setItem(a,l),o.push(a)}}await e.setItem(n,BM),t(e),_ve(r,o)},_ve=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let xve=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new vve;this.storage=e;try{const t=new mve;bve(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};class k1{}let Ave=class extends k1{constructor(e){super()}};const LM=Tt.FIVE_SECONDS,nb={pulse:"heartbeat_pulse"};let Eve=class YH extends Ave{constructor(e){super(e),this.events=new mo.EventEmitter,this.interval=LM,this.interval=(e==null?void 0:e.interval)||LM}static async init(e){const t=new YH(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),Tt.toMiliseconds(this.interval))}pulse(){this.events.emit(nb.pulse)}},Cve=class extends k1{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},Sve=class extends k1{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},Ive=class{constructor(e,t){this.logger=e,this.core=t}},Tve=class extends k1{constructor(e,t){super(),this.relayer=e,this.logger=t}},Rve=class extends k1{constructor(e){super()}},kve=class{constructor(e,t,n,i){this.core=e,this.logger=t,this.name=n}},Nve=class extends k1{constructor(e,t){super(),this.relayer=e,this.logger=t}},Pve=class extends k1{constructor(e,t){super(),this.core=e,this.logger=t}},Ove=class{constructor(e,t){this.projectId=e,this.logger=t}},Mve=class{constructor(e,t){this.projectId=e,this.logger=t}},Dve=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},$ve=class{constructor(e){this.client=e}};var pT={},QH={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Ar,t=Ca;r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128;var n=function(){function a(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return a.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},a.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},a.prototype.clean=function(){t.wipe(this._buffer),t.wipe(this._tempHi),t.wipe(this._tempLo),this.reset()},a.prototype.update=function(c,l){if(l===void 0&&(l=c.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var h=0;if(this._bytesHashed+=l,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[h++],l--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(h=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,h,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[h++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,h=this._bufferLength,f=l/536870912|0,v=l<<3,y=l%128<112?128:256;this._buffer[h]=128;for(var A=h+1;A0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(c){return this._stateHi.set(c.stateHi),this._stateLo.set(c.stateLo),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(c){t.wipe(c.stateHi),t.wipe(c.stateLo),c.buffer&&t.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();r.SHA512=n;var i=new Int32Array([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]);function s(a,c,l,h,f,v,y){for(var A=l[0],M=l[1],$=l[2],L=l[3],P=l[4],H=l[5],F=l[6],q=l[7],Y=h[0],I=h[1],T=h[2],V=h[3],Q=h[4],te=h[5],oe=h[6],d=h[7],g,m,b,E,C,B,R,w;y>=128;){for(var O=0;O<16;O++){var pe=8*O+v;a[O]=e.readUint32BE(f,pe),c[O]=e.readUint32BE(f,pe+4)}for(var O=0;O<80;O++){var be=A,x=M,Z=$,k=L,W=P,J=H,S=F,D=q,G=Y,z=I,K=T,ue=V,ye=Q,we=te,je=oe,Me=d;if(g=q,m=d,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=(P>>>14|Q<<18)^(P>>>18|Q<<14)^(Q>>>9|P<<23),m=(Q>>>14|P<<18)^(Q>>>18|P<<14)^(P>>>9|Q<<23),C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,g=P&H^~P&F,m=Q&te^~Q&oe,C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,g=i[O*2],m=i[O*2+1],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,g=a[O%16],m=c[O%16],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,b=R&65535|w<<16,E=C&65535|B<<16,g=b,m=E,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=(A>>>28|Y<<4)^(Y>>>2|A<<30)^(Y>>>7|A<<25),m=(Y>>>28|A<<4)^(A>>>2|Y<<30)^(A>>>7|Y<<25),C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,g=A&M^A&$^M&$,m=Y&I^Y&T^I&T,C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,D=R&65535|w<<16,Me=C&65535|B<<16,g=k,m=ue,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=b,m=E,C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,k=R&65535|w<<16,ue=C&65535|B<<16,M=be,$=x,L=Z,P=k,H=W,F=J,q=S,A=D,I=G,T=z,V=K,Q=ue,te=ye,oe=we,d=je,Y=Me,O%16===15)for(var pe=0;pe<16;pe++)g=a[pe],m=c[pe],C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=a[(pe+9)%16],m=c[(pe+9)%16],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,b=a[(pe+1)%16],E=c[(pe+1)%16],g=(b>>>1|E<<31)^(b>>>8|E<<24)^b>>>7,m=(E>>>1|b<<31)^(E>>>8|b<<24)^(E>>>7|b<<25),C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,b=a[(pe+14)%16],E=c[(pe+14)%16],g=(b>>>19|E<<13)^(E>>>29|b<<3)^b>>>6,m=(E>>>19|b<<13)^(b>>>29|E<<3)^(E>>>6|b<<26),C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,a[pe]=R&65535|w<<16,c[pe]=C&65535|B<<16}g=A,m=Y,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[0],m=h[0],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[0]=A=R&65535|w<<16,h[0]=Y=C&65535|B<<16,g=M,m=I,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[1],m=h[1],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[1]=M=R&65535|w<<16,h[1]=I=C&65535|B<<16,g=$,m=T,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[2],m=h[2],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[2]=$=R&65535|w<<16,h[2]=T=C&65535|B<<16,g=L,m=V,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[3],m=h[3],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[3]=L=R&65535|w<<16,h[3]=V=C&65535|B<<16,g=P,m=Q,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[4],m=h[4],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[4]=P=R&65535|w<<16,h[4]=Q=C&65535|B<<16,g=H,m=te,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[5],m=h[5],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[5]=H=R&65535|w<<16,h[5]=te=C&65535|B<<16,g=F,m=oe,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[6],m=h[6],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[6]=F=R&65535|w<<16,h[6]=oe=C&65535|B<<16,g=q,m=d,C=m&65535,B=m>>>16,R=g&65535,w=g>>>16,g=l[7],m=h[7],C+=m&65535,B+=m>>>16,R+=g&65535,w+=g>>>16,B+=C>>>16,R+=B>>>16,w+=R>>>16,l[7]=q=R&65535|w<<16,h[7]=d=C&65535|B<<16,v+=128,y-=128}return v}function o(a){var c=new n;c.update(a);var l=c.digest();return c.clean(),l}r.hash=o})(QH);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSecretKeyToX25519=r.convertPublicKeyToX25519=r.verify=r.sign=r.extractPublicKeyFromSecretKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.SEED_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=r.SIGNATURE_LENGTH=void 0;const e=Xw,t=QH,n=Ca;r.SIGNATURE_LENGTH=64,r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=64,r.SEED_LENGTH=32;function i(k){const W=new Float64Array(16);if(k)for(let J=0;J>16&1),J[z-1]&=65535;J[15]=S[15]-32767-(J[14]>>16&1);const G=J[15]>>16&1;J[14]&=65535,M(S,J,1-G)}for(let D=0;D<16;D++)k[2*D]=S[D]&255,k[2*D+1]=S[D]>>8}function L(k,W){let J=0;for(let S=0;S<32;S++)J|=k[S]^W[S];return(1&J-1>>>8)-1}function P(k,W){const J=new Uint8Array(32),S=new Uint8Array(32);return $(J,k),$(S,W),L(J,S)}function H(k){const W=new Uint8Array(32);return $(W,k),W[0]&1}function F(k,W){for(let J=0;J<16;J++)k[J]=W[2*J]+(W[2*J+1]<<8);k[15]&=32767}function q(k,W,J){for(let S=0;S<16;S++)k[S]=W[S]+J[S]}function Y(k,W,J){for(let S=0;S<16;S++)k[S]=W[S]-J[S]}function I(k,W,J){let S,D,G=0,z=0,K=0,ue=0,ye=0,we=0,je=0,Me=0,Ie=0,Be=0,xe=0,$e=0,We=0,Ne=0,Ue=0,X=0,N=0,U=0,ie=0,le=0,me=0,Ee=0,ze=0,qe=0,St=0,Je=0,nt=0,jr=0,jt=0,Ht=0,bn=0,pt=J[0],ht=J[1],yr=J[2],gt=J[3],ft=J[4],ur=J[5],_t=J[6],xt=J[7],br=J[8],At=J[9],mt=J[10],Er=J[11],wt=J[12],lt=J[13],Ir=J[14],Et=J[15];S=W[0],G+=S*pt,z+=S*ht,K+=S*yr,ue+=S*gt,ye+=S*ft,we+=S*ur,je+=S*_t,Me+=S*xt,Ie+=S*br,Be+=S*At,xe+=S*mt,$e+=S*Er,We+=S*wt,Ne+=S*lt,Ue+=S*Ir,X+=S*Et,S=W[1],z+=S*pt,K+=S*ht,ue+=S*yr,ye+=S*gt,we+=S*ft,je+=S*ur,Me+=S*_t,Ie+=S*xt,Be+=S*br,xe+=S*At,$e+=S*mt,We+=S*Er,Ne+=S*wt,Ue+=S*lt,X+=S*Ir,N+=S*Et,S=W[2],K+=S*pt,ue+=S*ht,ye+=S*yr,we+=S*gt,je+=S*ft,Me+=S*ur,Ie+=S*_t,Be+=S*xt,xe+=S*br,$e+=S*At,We+=S*mt,Ne+=S*Er,Ue+=S*wt,X+=S*lt,N+=S*Ir,U+=S*Et,S=W[3],ue+=S*pt,ye+=S*ht,we+=S*yr,je+=S*gt,Me+=S*ft,Ie+=S*ur,Be+=S*_t,xe+=S*xt,$e+=S*br,We+=S*At,Ne+=S*mt,Ue+=S*Er,X+=S*wt,N+=S*lt,U+=S*Ir,ie+=S*Et,S=W[4],ye+=S*pt,we+=S*ht,je+=S*yr,Me+=S*gt,Ie+=S*ft,Be+=S*ur,xe+=S*_t,$e+=S*xt,We+=S*br,Ne+=S*At,Ue+=S*mt,X+=S*Er,N+=S*wt,U+=S*lt,ie+=S*Ir,le+=S*Et,S=W[5],we+=S*pt,je+=S*ht,Me+=S*yr,Ie+=S*gt,Be+=S*ft,xe+=S*ur,$e+=S*_t,We+=S*xt,Ne+=S*br,Ue+=S*At,X+=S*mt,N+=S*Er,U+=S*wt,ie+=S*lt,le+=S*Ir,me+=S*Et,S=W[6],je+=S*pt,Me+=S*ht,Ie+=S*yr,Be+=S*gt,xe+=S*ft,$e+=S*ur,We+=S*_t,Ne+=S*xt,Ue+=S*br,X+=S*At,N+=S*mt,U+=S*Er,ie+=S*wt,le+=S*lt,me+=S*Ir,Ee+=S*Et,S=W[7],Me+=S*pt,Ie+=S*ht,Be+=S*yr,xe+=S*gt,$e+=S*ft,We+=S*ur,Ne+=S*_t,Ue+=S*xt,X+=S*br,N+=S*At,U+=S*mt,ie+=S*Er,le+=S*wt,me+=S*lt,Ee+=S*Ir,ze+=S*Et,S=W[8],Ie+=S*pt,Be+=S*ht,xe+=S*yr,$e+=S*gt,We+=S*ft,Ne+=S*ur,Ue+=S*_t,X+=S*xt,N+=S*br,U+=S*At,ie+=S*mt,le+=S*Er,me+=S*wt,Ee+=S*lt,ze+=S*Ir,qe+=S*Et,S=W[9],Be+=S*pt,xe+=S*ht,$e+=S*yr,We+=S*gt,Ne+=S*ft,Ue+=S*ur,X+=S*_t,N+=S*xt,U+=S*br,ie+=S*At,le+=S*mt,me+=S*Er,Ee+=S*wt,ze+=S*lt,qe+=S*Ir,St+=S*Et,S=W[10],xe+=S*pt,$e+=S*ht,We+=S*yr,Ne+=S*gt,Ue+=S*ft,X+=S*ur,N+=S*_t,U+=S*xt,ie+=S*br,le+=S*At,me+=S*mt,Ee+=S*Er,ze+=S*wt,qe+=S*lt,St+=S*Ir,Je+=S*Et,S=W[11],$e+=S*pt,We+=S*ht,Ne+=S*yr,Ue+=S*gt,X+=S*ft,N+=S*ur,U+=S*_t,ie+=S*xt,le+=S*br,me+=S*At,Ee+=S*mt,ze+=S*Er,qe+=S*wt,St+=S*lt,Je+=S*Ir,nt+=S*Et,S=W[12],We+=S*pt,Ne+=S*ht,Ue+=S*yr,X+=S*gt,N+=S*ft,U+=S*ur,ie+=S*_t,le+=S*xt,me+=S*br,Ee+=S*At,ze+=S*mt,qe+=S*Er,St+=S*wt,Je+=S*lt,nt+=S*Ir,jr+=S*Et,S=W[13],Ne+=S*pt,Ue+=S*ht,X+=S*yr,N+=S*gt,U+=S*ft,ie+=S*ur,le+=S*_t,me+=S*xt,Ee+=S*br,ze+=S*At,qe+=S*mt,St+=S*Er,Je+=S*wt,nt+=S*lt,jr+=S*Ir,jt+=S*Et,S=W[14],Ue+=S*pt,X+=S*ht,N+=S*yr,U+=S*gt,ie+=S*ft,le+=S*ur,me+=S*_t,Ee+=S*xt,ze+=S*br,qe+=S*At,St+=S*mt,Je+=S*Er,nt+=S*wt,jr+=S*lt,jt+=S*Ir,Ht+=S*Et,S=W[15],X+=S*pt,N+=S*ht,U+=S*yr,ie+=S*gt,le+=S*ft,me+=S*ur,Ee+=S*_t,ze+=S*xt,qe+=S*br,St+=S*At,Je+=S*mt,nt+=S*Er,jr+=S*wt,jt+=S*lt,Ht+=S*Ir,bn+=S*Et,G+=38*N,z+=38*U,K+=38*ie,ue+=38*le,ye+=38*me,we+=38*Ee,je+=38*ze,Me+=38*qe,Ie+=38*St,Be+=38*Je,xe+=38*nt,$e+=38*jr,We+=38*jt,Ne+=38*Ht,Ue+=38*bn,D=1,S=G+D+65535,D=Math.floor(S/65536),G=S-D*65536,S=z+D+65535,D=Math.floor(S/65536),z=S-D*65536,S=K+D+65535,D=Math.floor(S/65536),K=S-D*65536,S=ue+D+65535,D=Math.floor(S/65536),ue=S-D*65536,S=ye+D+65535,D=Math.floor(S/65536),ye=S-D*65536,S=we+D+65535,D=Math.floor(S/65536),we=S-D*65536,S=je+D+65535,D=Math.floor(S/65536),je=S-D*65536,S=Me+D+65535,D=Math.floor(S/65536),Me=S-D*65536,S=Ie+D+65535,D=Math.floor(S/65536),Ie=S-D*65536,S=Be+D+65535,D=Math.floor(S/65536),Be=S-D*65536,S=xe+D+65535,D=Math.floor(S/65536),xe=S-D*65536,S=$e+D+65535,D=Math.floor(S/65536),$e=S-D*65536,S=We+D+65535,D=Math.floor(S/65536),We=S-D*65536,S=Ne+D+65535,D=Math.floor(S/65536),Ne=S-D*65536,S=Ue+D+65535,D=Math.floor(S/65536),Ue=S-D*65536,S=X+D+65535,D=Math.floor(S/65536),X=S-D*65536,G+=D-1+37*(D-1),D=1,S=G+D+65535,D=Math.floor(S/65536),G=S-D*65536,S=z+D+65535,D=Math.floor(S/65536),z=S-D*65536,S=K+D+65535,D=Math.floor(S/65536),K=S-D*65536,S=ue+D+65535,D=Math.floor(S/65536),ue=S-D*65536,S=ye+D+65535,D=Math.floor(S/65536),ye=S-D*65536,S=we+D+65535,D=Math.floor(S/65536),we=S-D*65536,S=je+D+65535,D=Math.floor(S/65536),je=S-D*65536,S=Me+D+65535,D=Math.floor(S/65536),Me=S-D*65536,S=Ie+D+65535,D=Math.floor(S/65536),Ie=S-D*65536,S=Be+D+65535,D=Math.floor(S/65536),Be=S-D*65536,S=xe+D+65535,D=Math.floor(S/65536),xe=S-D*65536,S=$e+D+65535,D=Math.floor(S/65536),$e=S-D*65536,S=We+D+65535,D=Math.floor(S/65536),We=S-D*65536,S=Ne+D+65535,D=Math.floor(S/65536),Ne=S-D*65536,S=Ue+D+65535,D=Math.floor(S/65536),Ue=S-D*65536,S=X+D+65535,D=Math.floor(S/65536),X=S-D*65536,G+=D-1+37*(D-1),k[0]=G,k[1]=z,k[2]=K,k[3]=ue,k[4]=ye,k[5]=we,k[6]=je,k[7]=Me,k[8]=Ie,k[9]=Be,k[10]=xe,k[11]=$e,k[12]=We,k[13]=Ne,k[14]=Ue,k[15]=X}function T(k,W){I(k,W,W)}function V(k,W){const J=i();let S;for(S=0;S<16;S++)J[S]=W[S];for(S=253;S>=0;S--)T(J,J),S!==2&&S!==4&&I(J,J,W);for(S=0;S<16;S++)k[S]=J[S]}function Q(k,W){const J=i();let S;for(S=0;S<16;S++)J[S]=W[S];for(S=250;S>=0;S--)T(J,J),S!==1&&I(J,J,W);for(S=0;S<16;S++)k[S]=J[S]}function te(k,W){const J=i(),S=i(),D=i(),G=i(),z=i(),K=i(),ue=i(),ye=i(),we=i();Y(J,k[1],k[0]),Y(we,W[1],W[0]),I(J,J,we),q(S,k[0],k[1]),q(we,W[0],W[1]),I(S,S,we),I(D,k[3],W[3]),I(D,D,l),I(G,k[2],W[2]),q(G,G,G),Y(z,S,J),Y(K,G,D),q(ue,G,D),q(ye,S,J),I(k[0],z,K),I(k[1],ye,ue),I(k[2],ue,K),I(k[3],z,ye)}function oe(k,W,J){for(let S=0;S<4;S++)M(k[S],W[S],J)}function d(k,W){const J=i(),S=i(),D=i();V(D,W[2]),I(J,W[0],D),I(S,W[1],D),$(k,S),k[31]^=H(J)<<7}function g(k,W,J){y(k[0],o),y(k[1],a),y(k[2],a),y(k[3],o);for(let S=255;S>=0;--S){const D=J[S/8|0]>>(S&7)&1;oe(k,W,D),te(W,k),te(k,k),oe(k,W,D)}}function m(k,W){const J=[i(),i(),i(),i()];y(J[0],h),y(J[1],f),y(J[2],a),I(J[3],h,f),g(k,J,W)}function b(k){if(k.length!==r.SEED_LENGTH)throw new Error(`ed25519: seed must be ${r.SEED_LENGTH} bytes`);const W=(0,t.hash)(k);W[0]&=248,W[31]&=127,W[31]|=64;const J=new Uint8Array(32),S=[i(),i(),i(),i()];m(S,W),d(J,S);const D=new Uint8Array(64);return D.set(k),D.set(J,32),{publicKey:J,secretKey:D}}r.generateKeyPairFromSeed=b;function E(k){const W=(0,e.randomBytes)(32,k),J=b(W);return(0,n.wipe)(W),J}r.generateKeyPair=E;function C(k){if(k.length!==r.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${r.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(k.subarray(32))}r.extractPublicKeyFromSecretKey=C;const B=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function R(k,W){let J,S,D,G;for(S=63;S>=32;--S){for(J=0,D=S-32,G=S-12;D>4)*B[D],J=W[D]>>8,W[D]&=255;for(D=0;D<32;D++)W[D]-=J*B[D];for(S=0;S<32;S++)W[S+1]+=W[S]>>8,k[S]=W[S]&255}function w(k){const W=new Float64Array(64);for(let J=0;J<64;J++)W[J]=k[J];for(let J=0;J<64;J++)k[J]=0;R(k,W)}function O(k,W){const J=new Float64Array(64),S=[i(),i(),i(),i()],D=(0,t.hash)(k.subarray(0,32));D[0]&=248,D[31]&=127,D[31]|=64;const G=new Uint8Array(64);G.set(D.subarray(32),32);const z=new t.SHA512;z.update(G.subarray(32)),z.update(W);const K=z.digest();z.clean(),w(K),m(S,K),d(G,S),z.reset(),z.update(G.subarray(0,32)),z.update(k.subarray(32)),z.update(W);const ue=z.digest();w(ue);for(let ye=0;ye<32;ye++)J[ye]=K[ye];for(let ye=0;ye<32;ye++)for(let we=0;we<32;we++)J[ye+we]+=ue[ye]*D[we];return R(G.subarray(32),J),G}r.sign=O;function pe(k,W){const J=i(),S=i(),D=i(),G=i(),z=i(),K=i(),ue=i();return y(k[2],a),F(k[1],W),T(D,k[1]),I(G,D,c),Y(D,D,k[2]),q(G,k[2],G),T(z,G),T(K,z),I(ue,K,z),I(J,ue,D),I(J,J,G),Q(J,J),I(J,J,D),I(J,J,G),I(J,J,G),I(k[0],J,G),T(S,k[0]),I(S,S,G),P(S,D)&&I(k[0],k[0],v),T(S,k[0]),I(S,S,G),P(S,D)?-1:(H(k[0])===W[31]>>7&&Y(k[0],o,k[0]),I(k[3],k[0],k[1]),0)}function be(k,W,J){const S=new Uint8Array(32),D=[i(),i(),i(),i()],G=[i(),i(),i(),i()];if(J.length!==r.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${r.SIGNATURE_LENGTH} bytes`);if(pe(G,k))return!1;const z=new t.SHA512;z.update(J.subarray(0,32)),z.update(k),z.update(W);const K=z.digest();return w(K),g(D,G,K),m(G,J.subarray(32)),te(D,G),d(S,D),!L(J,S)}r.verify=be;function x(k){let W=[i(),i(),i(),i()];if(pe(W,k))throw new Error("Ed25519: invalid public key");let J=i(),S=i(),D=W[1];q(J,a,D),Y(S,a,D),V(S,S),I(J,J,S);let G=new Uint8Array(32);return $(G,J),G}r.convertPublicKeyToX25519=x;function Z(k){const W=(0,t.hash)(k.subarray(0,32));W[0]&=248,W[31]&=127,W[31]|=64;const J=new Uint8Array(W.subarray(0,32));return(0,n.wipe)(W),J}r.convertSecretKeyToX25519=Z})(pT);const Bve="EdDSA",Lve="JWT",JH=".",XH="base64url",Uve="utf8",Fve="utf8",jve=":",Hve="did",Wve="key",UM="base58btc",zve="z",Vve="K36",qve=32;function h8(r){return uo(Bo(id(r),Uve),XH)}function eW(r){const e=Bo(Vve,UM),t=zve+uo(yC([e,r]),UM);return[Hve,Wve,t].join(jve)}function Kve(r){return uo(r,XH)}function Gve(r){return Bo([h8(r.header),h8(r.payload)].join(JH),Fve)}function Zve(r){return[h8(r.header),h8(r.payload),Kve(r.signature)].join(JH)}function FM(r=Xw.randomBytes(qve)){return pT.generateKeyPairFromSeed(r)}async function Yve(r,e,t,n,i=Tt.fromMiliseconds(Date.now())){const s={alg:Bve,typ:Lve},o=eW(n.publicKey),a=i+t,c={iss:o,sub:r,aud:e,iat:i,exp:a},l=Gve({header:s,payload:c}),h=pT.sign(n.secretKey,l);return Zve({header:s,payload:c,signature:h})}const Qve="PARSE_ERROR",Jve="INVALID_REQUEST",Xve="METHOD_NOT_FOUND",eye="INVALID_PARAMS",tW="INTERNAL_ERROR",gT="SERVER_ERROR",tye=[-32700,-32600,-32601,-32602,-32603],D3={[Qve]:{code:-32700,message:"Parse error"},[Jve]:{code:-32600,message:"Invalid Request"},[Xve]:{code:-32601,message:"Method not found"},[eye]:{code:-32602,message:"Invalid params"},[tW]:{code:-32603,message:"Internal error"},[gT]:{code:-32e3,message:"Server error"}},rW=gT;function rye(r){return tye.includes(r)}function jM(r){return Object.keys(D3).includes(r)?D3[r]:D3[rW]}function nye(r){const e=Object.values(D3).find(t=>t.code===r);return e||D3[rW]}function nW(r,e,t){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${t} RPC url at ${e}`):r}var iW={},vh={},HM;function iye(){if(HM)return vh;HM=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.isBrowserCryptoAvailable=vh.getSubtleCrypto=vh.getBrowerCrypto=void 0;function r(){return(Yr==null?void 0:Yr.crypto)||(Yr==null?void 0:Yr.msCrypto)||{}}vh.getBrowerCrypto=r;function e(){const n=r();return n.subtle||n.webkitSubtle}vh.getSubtleCrypto=e;function t(){return!!r()&&!!e()}return vh.isBrowserCryptoAvailable=t,vh}var yh={},WM;function sye(){if(WM)return yh;WM=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.isBrowser=yh.isNode=yh.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}yh.isReactNative=r;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}yh.isNode=e;function t(){return!r()&&!e()}return yh.isBrowser=t,yh}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=Yy;e.__exportStar(iye(),r),e.__exportStar(sye(),r)})(iW);function Jd(r=3){const e=Date.now()*Math.pow(10,r),t=Math.floor(Math.random()*Math.pow(10,r));return e+t}function Q0(r=6){return BigInt(Jd(r))}function tm(r,e,t){return{id:t||Jd(),jsonrpc:"2.0",method:r,params:e}}function j_(r,e){return{id:r,jsonrpc:"2.0",result:e}}function H_(r,e,t){return{id:r,jsonrpc:"2.0",error:oye(e)}}function oye(r,e){return typeof r>"u"?jM(tW):(typeof r=="string"&&(r=Object.assign(Object.assign({},jM(gT)),{message:r})),rye(r.code)&&(r=nye(r.code)),r)}let aye=class{},cye=class extends aye{constructor(){super()}},lye=class extends cye{constructor(e){super()}};const uye="^https?:",hye="^wss?:";function dye(r){const e=r.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function sW(r,e){const t=dye(r);return typeof t>"u"?!1:new RegExp(e).test(t)}function zM(r){return sW(r,uye)}function VM(r){return sW(r,hye)}function fye(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function oW(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function mT(r){return oW(r)&&"method"in r}function W_(r){return oW(r)&&(Hl(r)||ic(r))}function Hl(r){return"result"in r}function ic(r){return"error"in r}let Al=class extends lye{constructor(e){super(e),this.events=new mo.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(tm(e.method,e.params||[],e.id||Q0().toString()),t)}async requestStrict(e,t){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{ic(s)?i(s.error):n(s.result)});try{await this.connection.send(e,t)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),W_(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};const pye=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),gye=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",qM=r=>r.split("?")[0],KM=10,mye=pye();let wye=class{constructor(e){if(this.url=e,this.events=new mo.EventEmitter,this.registering=!1,!VM(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(id(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!VM(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,n)=>{const i=new URLSearchParams(e).get("origin"),s=iW.isReactNative()?{headers:{origin:i}}:{rejectUnauthorized:!fye(e)},o=new mye(e,[],s);gye()?o.onerror=a=>{const c=a;n(this.emitError(c.error))}:o.on("error",a=>{n(this.emitError(a))}),o.onopen=()=>{this.onOpen(o),t(o)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?Sy(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=H_(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return nW(e,qM(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>KM&&this.events.setMaxListeners(KM)}emitError(e){const t=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${qM(this.url)}`));return this.events.emit("register_error",t),t}};var d8={exports:{}};d8.exports;(function(r,e){var t=200,n="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",h="[object Boolean]",f="[object Date]",v="[object Error]",y="[object Function]",A="[object GeneratorFunction]",M="[object Map]",$="[object Number]",L="[object Null]",P="[object Object]",H="[object Promise]",F="[object Proxy]",q="[object RegExp]",Y="[object Set]",I="[object String]",T="[object Symbol]",V="[object Undefined]",Q="[object WeakMap]",te="[object ArrayBuffer]",oe="[object DataView]",d="[object Float32Array]",g="[object Float64Array]",m="[object Int8Array]",b="[object Int16Array]",E="[object Int32Array]",C="[object Uint8Array]",B="[object Uint8ClampedArray]",R="[object Uint16Array]",w="[object Uint32Array]",O=/[\\^$.*+?()[\]{}|]/g,pe=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,x={};x[d]=x[g]=x[m]=x[b]=x[E]=x[C]=x[B]=x[R]=x[w]=!0,x[a]=x[c]=x[te]=x[h]=x[oe]=x[f]=x[v]=x[y]=x[M]=x[$]=x[P]=x[q]=x[Y]=x[I]=x[Q]=!1;var Z=typeof Yr=="object"&&Yr&&Yr.Object===Object&&Yr,k=typeof self=="object"&&self&&self.Object===Object&&self,W=Z||k||Function("return this")(),J=e&&!e.nodeType&&e,S=J&&!0&&r&&!r.nodeType&&r,D=S&&S.exports===J,G=D&&Z.process,z=function(){try{return G&&G.binding&&G.binding("util")}catch{}}(),K=z&&z.isTypedArray;function ue(fe,Ce){for(var Ye=-1,Ot=fe==null?0:fe.length,xn=0,fr=[];++Ye-1}function Dn(fe,Ce){var Ye=this.__data__,Ot=p0(Ye,fe);return Ot<0?(++this.size,Ye.push([fe,Ce])):Ye[Ot][1]=Ce,this}Pt.prototype.clear=Nn,Pt.prototype.delete=Pn,Pt.prototype.get=On,Pt.prototype.has=Mn,Pt.prototype.set=Dn;function tn(fe){var Ce=-1,Ye=fe==null?0:fe.length;for(this.clear();++Cebi))return!1;var An=fr.get(fe);if(An&&fr.get(Ce))return An==Ce;var oi=-1,wo=!0,_i=Ye&s?new Li:void 0;for(fr.set(fe,Ce),fr.set(Ce,fe);++oi-1&&fe%1==0&&fe-1&&fe%1==0&&fe<=o}function Ub(fe){var Ce=typeof fe;return fe!=null&&(Ce=="object"||Ce=="function")}function w0(fe){return fe!=null&&typeof fe=="object"}var Fb=K?Me(K):Ib;function Ux(fe){return Bx(fe)?Cb(fe):Tb(fe)}function _n(){return[]}function mn(){return!1}r.exports=Lx})(d8,d8.exports);var vye=d8.exports;const yye=Xf(vye);var bye={};function _ye(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,F=new Uint8Array(H);L!==P;){for(var q=A[L],Y=0,I=H-1;(q!==0||Y<$)&&I!==-1;I--,Y++)q+=256*F[I]>>>0,F[I]=q%a>>>0,q=q/a>>>0;if(q!==0)throw new Error("Non-zero carry");$=Y,L++}for(var T=H-$;T!==H&&F[T]===0;)T++;for(var V=c.repeat(M);T>>0,H=new Uint8Array(P);A[M];){var F=t[A.charCodeAt(M)];if(F===255)return;for(var q=0,Y=P-1;(F!==0||q>>0,H[Y]=F%256>>>0,F=F/256>>>0;if(F!==0)throw new Error("Non-zero carry");L=q,M++}if(A[M]!==" "){for(var I=P-L;I!==P&&H[I]===0;)I++;for(var T=new Uint8Array($+(P-I)),V=$;I!==P;)T[V++]=H[I++];return T}}}function y(A){var M=v(A);if(M)return M;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:v,decode:y}}var xye=_ye,Aye=xye;const aW=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},Eye=r=>new TextEncoder().encode(r),Cye=r=>new TextDecoder().decode(r);let Sye=class{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}};class Iye{constructor(e,t,n){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return cW(this,e)}}class Tye{constructor(e){this.decoders=e}or(e){return cW(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const cW=(r,e)=>new Tye({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});let Rye=class{constructor(e,t,n,i){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=i,this.encoder=new Sye(e,t,n),this.decoder=new Iye(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const z_=({name:r,prefix:e,encode:t,decode:n})=>new Rye(r,e,t,n),ib=({prefix:r,name:e,alphabet:t})=>{const{encode:n,decode:i}=Aye(t,e);return z_({prefix:r,name:e,encode:n,decode:s=>aW(i(s))})},kye=(r,e,t,n)=>{const i={};for(let h=0;h=8&&(a-=8,o[l++]=255&c>>a)}if(a>=t||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},Nye=(r,e,t)=>{const n=e[e.length-1]==="=",i=(1<t;)o-=t,s+=e[i&a>>o];if(o&&(s+=e[i&a<z_({prefix:e,name:r,encode(i){return Nye(i,n,t)},decode(i){return kye(i,n,t,r)}}),Pye=z_({prefix:"\0",name:"identity",encode:r=>Cye(r),decode:r=>Eye(r)});var Oye=Object.freeze({__proto__:null,identity:Pye});const Mye=ps({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Dye=Object.freeze({__proto__:null,base2:Mye});const $ye=ps({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Bye=Object.freeze({__proto__:null,base8:$ye});const Lye=ib({prefix:"9",name:"base10",alphabet:"0123456789"});var Uye=Object.freeze({__proto__:null,base10:Lye});const Fye=ps({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),jye=ps({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Hye=Object.freeze({__proto__:null,base16:Fye,base16upper:jye});const Wye=ps({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),zye=ps({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Vye=ps({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),qye=ps({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Kye=ps({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Gye=ps({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Zye=ps({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Yye=ps({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Qye=ps({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Jye=Object.freeze({__proto__:null,base32:Wye,base32upper:zye,base32pad:Vye,base32padupper:qye,base32hex:Kye,base32hexupper:Gye,base32hexpad:Zye,base32hexpadupper:Yye,base32z:Qye});const Xye=ib({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ebe=ib({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var tbe=Object.freeze({__proto__:null,base36:Xye,base36upper:ebe});const rbe=ib({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),nbe=ib({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var ibe=Object.freeze({__proto__:null,base58btc:rbe,base58flickr:nbe});const sbe=ps({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),obe=ps({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),abe=ps({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),cbe=ps({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var lbe=Object.freeze({__proto__:null,base64:sbe,base64pad:obe,base64url:abe,base64urlpad:cbe});const lW=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ube=lW.reduce((r,e,t)=>(r[t]=e,r),[]),hbe=lW.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function dbe(r){return r.reduce((e,t)=>(e+=ube[t],e),"")}function fbe(r){const e=[];for(const t of r){const n=hbe[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(n)}return new Uint8Array(e)}const pbe=z_({prefix:"🚀",name:"base256emoji",encode:dbe,decode:fbe});var gbe=Object.freeze({__proto__:null,base256emoji:pbe}),mbe=uW,GM=128,wbe=127,vbe=~wbe,ybe=Math.pow(2,31);function uW(r,e,t){e=e||[],t=t||0;for(var n=t;r>=ybe;)e[t++]=r&255|GM,r/=128;for(;r&vbe;)e[t++]=r&255|GM,r>>>=7;return e[t]=r|0,uW.bytes=t-n+1,e}var bbe=NC,_be=128,ZM=127;function NC(r,n){var t=0,n=n||0,i=0,s=n,o,a=r.length;do{if(s>=a)throw NC.bytes=0,new RangeError("Could not decode varint");o=r[s++],t+=i<28?(o&ZM)<=_be);return NC.bytes=s-n,t}var xbe=Math.pow(2,7),Abe=Math.pow(2,14),Ebe=Math.pow(2,21),Cbe=Math.pow(2,28),Sbe=Math.pow(2,35),Ibe=Math.pow(2,42),Tbe=Math.pow(2,49),Rbe=Math.pow(2,56),kbe=Math.pow(2,63),Nbe=function(r){return r(hW.encode(r,e,t),e),QM=r=>hW.encodingLength(r),PC=(r,e)=>{const t=e.byteLength,n=QM(r),i=n+QM(t),s=new Uint8Array(i+t);return YM(r,s,0),YM(t,s,n),s.set(e,i),new Obe(r,t,e,s)};let Obe=class{constructor(e,t,n,i){this.code=e,this.size=t,this.digest=n,this.bytes=i}};const dW=({name:r,code:e,encode:t})=>new Mbe(r,e,t);let Mbe=class{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?PC(this.code,t):t.then(n=>PC(this.code,n))}else throw Error("Unknown type, must be binary type")}};const fW=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),Dbe=dW({name:"sha2-256",code:18,encode:fW("SHA-256")}),$be=dW({name:"sha2-512",code:19,encode:fW("SHA-512")});var Bbe=Object.freeze({__proto__:null,sha256:Dbe,sha512:$be});const pW=0,Lbe="identity",gW=aW,Ube=r=>PC(pW,gW(r)),Fbe={code:pW,name:Lbe,encode:gW,digest:Ube};var jbe=Object.freeze({__proto__:null,identity:Fbe});new TextEncoder,new TextDecoder;const JM={...Oye,...Dye,...Bye,...Uye,...Hye,...Jye,...tbe,...ibe,...lbe,...gbe};({...Bbe,...jbe});function Hbe(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}function mW(r,e,t,n){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:n}}}const XM=mW("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),n7=mW("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=Hbe(r.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=ut("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=go(t,this.name)}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,rH(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?nH(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class E5e{constructor(e,t,n){this.core=e,this.logger=t,this.name=Gbe,this.randomSessionIdentifier=TC(),this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),s=FM(i);return eW(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=G2e();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),o=FM(s),a=this.randomSessionIdentifier;return await Yve(a,i,Zbe,o)},this.generateSharedKey=(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),c=Z2e(a,s);return this.setSymKey(c,o)},this.setSymKey=async(i,s)=>{this.isInitialized();const o=s||M4(i);return await this.keychain.set(o,i),o},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,s,o)=>{this.isInitialized();const a=VH(o),c=id(s);if(AM(a)){const v=a.senderPublicKey,y=a.receiverPublicKey;i=await this.generateSharedKey(v,y)}const l=this.getSymKey(i),{type:h,senderPublicKey:f}=a;return Q2e({type:h,symKey:l,message:c,senderPublicKey:f})},this.decode=async(i,s,o)=>{this.isInitialized();const a=e3e(s,o);if(AM(a)){const c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=J2e({symKey:c,encoded:s});return Sy(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}},this.getPayloadType=i=>{const s=l8(i);return tb(s.type)},this.getPayloadSenderPublicKey=i=>{const s=l8(i);return s.senderPublicKey?uo(s.senderPublicKey,so):void 0},this.core=e,this.logger=go(t,this.name),this.keychain=n||new A5e(this.core,this.logger)}get context(){return zo(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(eD)}catch{e=TC(),await this.keychain.set(eD,e)}return zbe(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}let C5e=class extends Ive{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=Jbe,this.version=Xbe,this.initialized=!1,this.storagePrefix=Kf,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const s=Y0(i);let o=this.messages.get(n);return typeof o>"u"&&(o={}),typeof o[s]<"u"||(o[s]=i,this.messages.set(n,o),await this.persist()),s},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const s=this.get(n),o=Y0(i);return typeof s[o]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=go(e,this.name),this.core=t}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,rH(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?nH(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}},S5e=class extends Tve{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new mo.EventEmitter,this.name=t5e,this.queue=new Map,this.publishTimeout=Tt.toMiliseconds(Tt.ONE_MINUTE),this.failedPublishTimeout=Tt.toMiliseconds(Tt.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||e5e,c=RC(s),l=(s==null?void 0:s.prompt)||!1,h=(s==null?void 0:s.tag)||0,f=(s==null?void 0:s.id)||Q0().toString(),v={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:h,id:f,attestation:s==null?void 0:s.attestation}},y=`Failed to publish payload, please try again. id:${f} tag:${h}`,A=Date.now();let M,$=1;try{for(;M===void 0;){if(Date.now()-A>this.publishTimeout)throw new Error(y);this.logger.trace({id:f,attempts:$},`publisher.publish - attempt ${$}`),M=await await Jg(this.rpcPublish(n,i,a,c,l,h,f,s==null?void 0:s.attestation).catch(L=>this.logger.warn(L)),this.publishTimeout,y),$++,M||await new Promise(L=>setTimeout(L,this.failedPublishTimeout))}this.relayer.events.emit($o.publish,v),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:f,topic:n,message:i,opts:s}})}catch(L){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(L),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw L;this.queue.set(f,v)}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=go(t,this.name),this.registerEventListeners()}get context(){return zo(this.logger)}rpcPublish(e,t,n,i,s,o,a,c){var l,h,f,v;const y={method:a3(i.protocol).publish,params:{topic:e,message:t,ttl:n,prompt:s,tag:o,attestation:c},id:a};return Do((l=y.params)==null?void 0:l.prompt)&&((h=y.params)==null||delete h.prompt),Do((f=y.params)==null?void 0:f.tag)&&((v=y.params)==null||delete v.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:y}),this.relayer.request(y)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:n,opts:i}=e;await this.publish(t,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(nb.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit($o.connection_stalled);return}this.checkQueue()}),this.relayer.on($o.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},I5e=class{constructor(){this.map=new Map,this.set=(e,t)=>{const n=this.get(e);this.exists(e,t)||this.map.set(e,[...n,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,t))return;const i=n.filter(s=>s!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}};var T5e=Object.defineProperty,R5e=Object.defineProperties,k5e=Object.getOwnPropertyDescriptors,tD=Object.getOwnPropertySymbols,N5e=Object.prototype.hasOwnProperty,P5e=Object.prototype.propertyIsEnumerable,rD=(r,e,t)=>e in r?T5e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Z2=(r,e)=>{for(var t in e||(e={}))N5e.call(e,t)&&rD(r,t,e[t]);if(tD)for(var t of tD(e))P5e.call(e,t)&&rD(r,t,e[t]);return r},s7=(r,e)=>R5e(r,k5e(e));class O5e extends Nve{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new I5e,this.events=new mo.EventEmitter,this.name=u5e,this.version=h5e,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Kf,this.subscribeTimeout=Tt.toMiliseconds(Tt.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=RC(i),o={topic:n,relay:s};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>{if(this.topics.includes(n))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${n}`;return await new Promise((s,o)=>{const a=new Tt.Watch;a.start(i);const c=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(c),a.stop(i),s(!0)),a.elapsed(i)>=d5e&&(clearInterval(c),a.stop(i),o(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=go(t,this.name),this.clientId=""}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let n=!1;try{n=this.getSubscription(e).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,t)))}async unsubscribeById(e,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}});try{const i=RC(n);await this.rpcUnsubscribe(e,t,i);const s=pn("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,t){const n={method:a3(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Jg(this.relayer.request(n).catch(i=>this.logger.warn(i)),this.subscribeTimeout)?Y0(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit($o.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,n={method:a3(t.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Jg(this.relayer.request(n).catch(i=>this.logger.warn(i)),this.subscribeTimeout)}catch{this.relayer.events.emit($o.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t=e[0].relay,n={method:a3(t.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await Jg(this.relayer.request(n).catch(s=>this.logger.warn(s)),this.subscribeTimeout)}catch{this.relayer.events.emit($o.connection_stalled)}return i}rpcUnsubscribe(e,t,n){const i={method:a3(n.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,s7(Z2({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,Z2({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,Z2({},t)),this.topicMap.set(t.topic,e),this.events.emit(Wl.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:n}=ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Wl.deleted,s7(Z2({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Wl.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=ut("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);ju(t)&&this.onBatchSubscribe(t.map((n,i)=>s7(Z2({},e[i]),{id:n})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(nb.pulse,async()=>{await this.checkPending()}),this.events.on(Wl.created,async e=>{const t=Wl.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(Wl.deleted,async e=>{const t=Wl.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var M5e=Object.defineProperty,nD=Object.getOwnPropertySymbols,D5e=Object.prototype.hasOwnProperty,$5e=Object.prototype.propertyIsEnumerable,iD=(r,e,t)=>e in r?M5e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,B5e=(r,e)=>{for(var t in e||(e={}))D5e.call(e,t)&&iD(r,t,e[t]);if(nD)for(var t of nD(e))$5e.call(e,t)&&iD(r,t,e[t]);return r};let L5e=class extends Rve{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new mo.EventEmitter,this.name=n5e,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=Tt.toMiliseconds(Tt.THIRTY_SECONDS+Tt.ONE_SECOND),this.request=async t=>{var n,i;this.logger.debug("Publishing Request Payload");const s=t.id||Q0().toString();await this.toEstablishConnection();try{const o=this.provider.request(t);this.requestsInFlight.set(s,{promise:o,request:t}),this.logger.trace({id:s,method:t.method,topic:(n=t.params)==null?void 0:n.topic},"relayer.request - attempt to publish...");const a=await new Promise(async(c,l)=>{const h=()=>{l(new Error(`relayer.request - publish interrupted, id: ${s}`))};this.provider.on(Fa.disconnect,h);const f=await o;this.provider.off(Fa.disconnect,h),c(f)});return this.logger.trace({id:s,method:t.method,topic:(i=t.params)==null?void 0:i.topic},"relayer.request - published"),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}finally{this.requestsInFlight.delete(s)}},this.resetPingTimeout=()=>{if(jv())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,n,i;(i=(n=(t=this.provider)==null?void 0:t.connection)==null?void 0:n.socket)==null||i.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace("relayer connected"),this.startPingTimeout(),this.events.emit($o.connect)},this.onDisconnectHandler=()=>{this.logger.trace("relayer disconnected"),this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit($o.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Fa.payload,this.onPayloadHandler),this.provider.on(Fa.connect,this.onConnectHandler),this.provider.on(Fa.disconnect,this.onDisconnectHandler),this.provider.on(Fa.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?go(e.logger,this.name):Cy(Ty({level:e.logger||r5e})),this.messages=new C5e(this.logger,e.core),this.subscriber=new O5e(this,this.logger),this.publisher=new S5e(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||yW,this.projectId=e.projectId,this.bundleId=Uge(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),await this.transportOpen(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&this.subscriber.pending.size===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},a5e)}get context(){return zo(this.logger)}get connected(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===1}get connecting(){var e,t,n;return((n=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:n.readyState)===0}async publish(e,t,n){this.isInitialized(),await this.publisher.publish(e,t,n),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"",s;const o=a=>{a.topic===e&&(this.subscriber.off(Wl.created,o),s())};return await Promise.all([new Promise(a=>{s=a,this.subscriber.on(Wl.created,o)}),new Promise(async a=>{i=await this.subscriber.subscribe(e,t)||i,a()})]),i}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await Jg(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,n)=>{const i=()=>{this.provider.off(Fa.disconnect,i),n(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(Fa.disconnect,i),await Jg(this.provider.connect(),Tt.toMiliseconds(Tt.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(s=>{n(s)}),this.subscriber.start().catch(s=>{this.logger.error(s),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const n=t;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(n.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await OM())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const t=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.trace(`Batch of ${t.length} message events sorted`);for(const n of t)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i)}this.logger.trace(`Batch of ${t.length} message events processed`)}startPingTimeout(){var e,t,n,i,s;if(jv())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Al(new wye(Vge({sdkVersion:o5e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:n}=e;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(e){const{topic:t,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const i=this.messages.has(t,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),mT(e)){if(!e.method.endsWith(i5e))return;const t=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=t.data,a={topic:n,message:i,publishedAt:s,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(B5e({type:"event",event:t.id},a)),this.events.emit(t.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else W_(e)&&this.events.emit($o.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit($o.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=j_(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(Fa.payload,this.onPayloadHandler),this.provider.off(Fa.connect,this.onConnectHandler),this.provider.off(Fa.disconnect,this.onDisconnectHandler),this.provider.off(Fa.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await OM();z3e(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit($o.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},Tt.toMiliseconds(s5e))}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}};var U5e=Object.defineProperty,sD=Object.getOwnPropertySymbols,F5e=Object.prototype.hasOwnProperty,j5e=Object.prototype.propertyIsEnumerable,oD=(r,e,t)=>e in r?U5e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,aD=(r,e)=>{for(var t in e||(e={}))F5e.call(e,t)&&oD(r,t,e[t]);if(sD)for(var t of sD(e))j5e.call(e,t)&&oD(r,t,e[t]);return r};let N1=class extends kve{constructor(e,t,n,i=Kf,s=void 0){super(e,t,n,i),this.core=e,this.logger=t,this.name=n,this.map=new Map,this.version=c5e,this.cached=[],this.initialized=!1,this.storagePrefix=Kf,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!Do(o)?this.map.set(this.getKey(o),o):_3e(o)?this.map.set(o.id,o):x3e(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>yye(a[c],o[c]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const c=aD(aD({},this.getData(o)),a);this.map.set(o,c),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())},this.logger=go(t,this.name),this.storagePrefix=i,this.getKey=s}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:i}=ut("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=ut("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}},H5e=class{constructor(e,t){this.core=e,this.logger=t,this.name=f5e,this.version=p5e,this.events=new YI,this.initialized=!1,this.storagePrefix=Kf,this.ignoredPayloadTypes=[td],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async n=>{this.isInitialized();const i=TC(),s=await this.core.crypto.setSymKey(i),o=as(Tt.FIVE_MINUTES),a={protocol:vW},c={topic:s,expiry:o,relay:a,active:!1},l=h3e({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n==null?void 0:n.methods});return this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s),{topic:s,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:s,relay:o,expiryTimestamp:a,methods:c}=IM(n.uri);let l;if(this.pairings.keys.includes(i)&&(l=this.pairings.get(i),l.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);const h=a||as(Tt.FIVE_MINUTES),f={topic:i,relay:o,expiry:h,active:!1,methods:c};return this.core.expirer.set(i,h),await this.pairings.set(i,f),n.activatePairing&&await this.activate({topic:i}),this.events.emit(Pg.create,f),this.core.crypto.keychain.has(i)||await this.core.crypto.setSymKey(s,i),await this.core.relayer.subscribe(i,{relay:o}),f},this.activate=async({topic:n})=>{this.isInitialized();const i=as(Tt.THIRTY_DAYS);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=B0();this.events.once(Mr("pairing_ping",s),({error:l})=>{l?c(l):a()}),await o()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",pn("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,s)=>{const o=tm(i,s),a=await this.core.crypto.encode(n,o),c=G2[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id},this.sendResult=async(n,i,s)=>{const o=j_(n,s),a=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),l=G2[c.request.method].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)},this.sendError=async(n,i,s)=>{const o=H_(n,s),a=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),l=G2[c.request.method]?G2[c.request.method].res:G2.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,pn("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>Yd(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(Pg.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onPairingPingResponse=(n,i)=>{const{id:s}=i;setTimeout(()=>{Hl(i)?this.events.emit(Mr("pairing_ping",s),{}):ic(i)&&this.events.emit(Mr("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Pg.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=pn("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(pn("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var i;if(!To(n)){const{message:o}=ut("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!b3e(n.uri)){const{message:o}=ut("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}const s=IM(n.uri);if(!((i=s==null?void 0:s.relay)!=null&&i.protocol)){const{message:o}=ut("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(o)}if(!(s!=null&&s.symKey)){const{message:o}=ut("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(o)}if(s!=null&&s.expiryTimestamp&&Tt.toMiliseconds(s==null?void 0:s.expiryTimestamp){if(!To(n)){const{message:s}=ut("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!To(n)){const{message:s}=ut("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!di(n,!1)){const{message:i}=ut("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=ut("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(Yd(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=ut("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=go(t,this.name),this.pairings=new N1(this.core,this.logger,this.name,this.storagePrefix)}get context(){return zo(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on($o.message,async e=>{const{topic:t,message:n}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(t,n);try{mT(i)?(this.core.history.set(t,i),this.onRelayEventRequest({topic:t,payload:i})):W_(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:t,payload:i}),this.core.history.delete(t,i.id))}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(Ga.expired,async e=>{const{topic:t}=sH(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Pg.expire,{topic:t}))})}};class W5e extends Sve{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new mo.EventEmitter,this.name=g5e,this.version=m5e,this.cached=[],this.initialized=!1,this.storagePrefix=Kf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:as(Tt.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(Nc.created,o)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=ic(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Nc.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Nc.deleted,s)}}),this.persist()},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=go(t,this.name)}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:tm(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:n}=ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Nc.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=ut("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Nc.created,e=>{const t=Nc.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Nc.updated,e=>{const t=Nc.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Nc.deleted,e=>{const t=Nc.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(nb.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{Tt.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(Nc.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class z5e extends Pve{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new mo.EventEmitter,this.name=w5e,this.version=v5e,this.cached=[],this.initialized=!1,this.storagePrefix=Kf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Ga.created,{target:s,expiration:o})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Ga.deleted,{target:i,expiration:s})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=go(t,this.name)}get context(){return zo(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return qge(e);if(typeof e=="number")return Kge(e);const{message:t}=ut("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ga.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=ut("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:n}=ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return t}checkExpiry(e,t){const{expiry:n}=t;Tt.toMiliseconds(n)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(Ga.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(nb.pulse,()=>this.checkExpirations()),this.events.on(Ga.created,e=>{const t=Ga.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Ga.expired,e=>{const t=Ga.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(Ga.deleted,e=>{const t=Ga.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}let V5e=class extends Ove{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=i7,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||e2()||!t2())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);return this.fetchAttestation(n.attestationId,i)},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const s=this.startAbortTimer(Tt.ONE_SECOND*5),o=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(s),o.status===200?await o.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=s=>{s.data==="verify_ready"&&(this.onInit(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(s=>{const o=document.getElementById(i7);if(o)return this.iframe=o,this.onInit(),s();window.addEventListener("message",i);const a=document.createElement("iframe");a.id=i7,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display="none",document.body.append(a),this.iframe=a,n=s}),new Promise((s,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},Tt.toMiliseconds(Tt.FIVE_SECONDS)))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||l3;return b5e.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${l3}`),i=l3),i},this.logger=go(t,this.name),this.verifyUrl=l3,this.abortController=new AbortController,this.isDevEnv=jv()&&bye.IS_VITEST}get context(){return zo(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Tt.toMiliseconds(e))}};class q5e extends Mve{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=_5e,this.registerDeviceToken=async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${x5e}/${this.projectId}/clients`;await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})},this.logger=go(t,this.context)}}var K5e=Object.defineProperty,cD=Object.getOwnPropertySymbols,G5e=Object.prototype.hasOwnProperty,Z5e=Object.prototype.propertyIsEnumerable,lD=(r,e,t)=>e in r?K5e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,uD=(r,e)=>{for(var t in e||(e={}))G5e.call(e,t)&&lD(r,t,e[t]);if(cD)for(var t of cD(e))Z5e.call(e,t)&&lD(r,t,e[t]);return r};class vT extends Cve{constructor(e){var t;super(e),this.protocol=wW,this.version=Vbe,this.name=wT,this.events=new mo.EventEmitter,this.initialized=!1,this.on=(o,a)=>this.events.on(o,a),this.once=(o,a)=>this.events.once(o,a),this.off=(o,a)=>this.events.off(o,a),this.removeListener=(o,a)=>this.events.removeListener(o,a),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||yW,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=Ty({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:qbe.logger}),{logger:i,chunkLoggerController:s}=iF({opts:n,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=s,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var o,a;(o=this.logChunkController)!=null&&o.downloadLogsBlobInBrowser&&((a=this.logChunkController)==null||a.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=go(i,this.name),this.heartbeat=new Eve,this.crypto=new E5e(this,this.logger,e==null?void 0:e.keychain),this.history=new W5e(this,this.logger),this.expirer=new z5e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new xve(uD(uD({},Kbe),e==null?void 0:e.storageOptions)),this.relayer=new L5e({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new H5e(this,this.logger),this.verify=new V5e(this.projectId||"",this.logger),this.echoClient=new q5e(this.projectId||"",this.logger)}static async init(e){const t=new vT(e);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(l5e,n),t}get context(){return zo(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const Y5e=vT,_W="wc",xW=2,AW="client",yT=`${_W}@${xW}:${AW}:`,o7={name:AW,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},hD="WALLETCONNECT_DEEPLINK_CHOICE",Q5e="proposal",EW="Proposal expired",J5e="session",lg=Tt.SEVEN_DAYS,X5e="engine",ts={wc_sessionPropose:{req:{ttl:Tt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Tt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Tt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Tt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Tt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Tt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Tt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Tt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Tt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Tt.ONE_DAY,prompt:!1,tag:1114},res:{ttl:Tt.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:Tt.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:Tt.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:Tt.FIVE_MINUTES,prompt:!1,tag:1119}}},a7={min:Tt.FIVE_MINUTES,max:Tt.SEVEN_DAYS},$l={idle:"IDLE",active:"ACTIVE"},e4e="request",t4e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],r4e="wc",n4e="auth",i4e="authKeys",s4e="pairingTopics",o4e="requests",V_=`${r4e}@${1.5}:${n4e}:`,B4=`${V_}:PUB_KEY`;var a4e=Object.defineProperty,c4e=Object.defineProperties,l4e=Object.getOwnPropertyDescriptors,dD=Object.getOwnPropertySymbols,u4e=Object.prototype.hasOwnProperty,h4e=Object.prototype.propertyIsEnumerable,fD=(r,e,t)=>e in r?a4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ri=(r,e)=>{for(var t in e||(e={}))u4e.call(e,t)&&fD(r,t,e[t]);if(dD)for(var t of dD(e))h4e.call(e,t)&&fD(r,t,e[t]);return r},M0=(r,e)=>c4e(r,l4e(e));let d4e=class extends $ve{constructor(e){super(e),this.name=X5e,this.events=new YI,this.initialized=!1,this.requestQueue={state:$l.idle,queue:[]},this.sessionRequestQueue={state:$l.idle,queue:[]},this.requestQueueDelay=Tt.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(ts)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Tt.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const n=M0(Ri({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,relays:c}=n;let l=i,h,f=!1;try{l&&(f=this.client.core.pairing.pairings.get(l).active)}catch(F){throw this.client.logger.error(`connect() -> pairing.get(${l}) failed`),F}if(!l||!f){const{topic:F,uri:q}=await this.client.core.pairing.create();l=F,h=q}if(!l){const{message:F}=ut("NO_MATCHING_KEY",`connect() pairing topic: ${l}`);throw new Error(F)}const v=await this.client.core.crypto.generateKeyPair(),y=ts.wc_sessionPropose.req.ttl||Tt.FIVE_MINUTES,A=as(y),M=Ri({requiredNamespaces:s,optionalNamespaces:o,relays:c??[{protocol:vW}],proposer:{publicKey:v,metadata:this.client.metadata},expiryTimestamp:A,pairingTopic:l},a&&{sessionProperties:a}),{reject:$,resolve:L,done:P}=B0(y,EW);this.events.once(Mr("session_connect"),async({error:F,session:q})=>{if(F)$(F);else if(q){q.self.publicKey=v;const Y=M0(Ri({},q),{pairingTopic:M.pairingTopic,requiredNamespaces:M.requiredNamespaces,optionalNamespaces:M.optionalNamespaces});await this.client.session.set(q.topic,Y),await this.setExpiry(q.topic,q.expiry),l&&await this.client.core.pairing.updateMetadata({topic:l,metadata:q.peer.metadata}),this.cleanupDuplicatePairings(Y),L(Y)}});const H=await this.sendRequest({topic:l,method:"wc_sessionPropose",params:M,throwOnFailedPublish:!0});return await this.setProposal(H,Ri({id:H},M)),{uri:h,approval:P}},this.pair=async t=>{await this.isInitialized();try{return await this.client.core.pairing.pair(t)}catch(n){throw this.client.logger.error("pair() failed"),n}},this.approve=async t=>{await this.isInitialized();try{await this.isValidApprove(t)}catch(P){throw this.client.logger.error("approve() -> isValidApprove() failed"),P}const{id:n,relayProtocol:i,namespaces:s,sessionProperties:o,sessionConfig:a}=t;let c;try{c=this.client.proposal.get(n)}catch(P){throw this.client.logger.error(`approve() -> proposal.get(${n}) failed`),P}const{pairingTopic:l,proposer:h,requiredNamespaces:f,optionalNamespaces:v}=c,y=await this.client.core.crypto.generateKeyPair(),A=h.publicKey,M=await this.client.core.crypto.generateSharedKey(y,A),$=Ri(Ri({relay:{protocol:i??"irn"},namespaces:s,controller:{publicKey:y,metadata:this.client.metadata},expiry:as(lg)},o&&{sessionProperties:o}),a&&{sessionConfig:a});await this.client.core.relayer.subscribe(M);const L=M0(Ri({},$),{topic:M,requiredNamespaces:f,optionalNamespaces:v,pairingTopic:l,acknowledged:!1,self:$.controller,peer:{publicKey:h.publicKey,metadata:h.metadata},controller:y});await this.client.session.set(M,L);try{await this.sendRequest({topic:M,method:"wc_sessionSettle",params:$,throwOnFailedPublish:!0}),await this.sendResult({id:n,topic:l,result:{relay:{protocol:i??"irn"},responderPublicKey:y},throwOnFailedPublish:!0})}catch(P){throw this.client.logger.error(P),this.client.session.delete(M,pn("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(M),P}return await this.client.core.pairing.updateMetadata({topic:l,metadata:h.metadata}),await this.client.proposal.delete(n,pn("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}),await this.setExpiry(M,as(lg)),{topic:M,acknowledged:()=>Promise.resolve(this.client.session.get(M))}},this.reject=async t=>{await this.isInitialized();try{await this.isValidReject(t)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:n,reason:i}=t;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&(await this.sendError({id:n,topic:s,error:i,rpcOpts:ts.wc_sessionPropose.reject}),await this.client.proposal.delete(n,pn("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized();try{await this.isValidUpdate(t)}catch(f){throw this.client.logger.error("update() -> isValidUpdate() failed"),f}const{topic:n,namespaces:i}=t,{done:s,resolve:o,reject:a}=B0(),c=Jd(),l=Q0().toString(),h=this.client.session.get(n).namespaces;return this.events.once(Mr("session_update",c),({error:f})=>{f?a(f):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(f=>{this.client.logger.error(f),this.client.session.update(n,{namespaces:h}),a(f)}),{acknowledged:s}},this.extend=async t=>{await this.isInitialized();try{await this.isValidExtend(t)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:n}=t,i=Jd(),{done:s,resolve:o,reject:a}=B0();return this.events.once(Mr("session_extend",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,as(lg)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}},this.request=async t=>{await this.isInitialized();try{await this.isValidRequest(t)}catch(y){throw this.client.logger.error("request() -> isValidRequest() failed"),y}const{chainId:n,request:i,topic:s,expiry:o=ts.wc_sessionRequest.req.ttl}=t,a=this.client.session.get(s),c=Jd(),l=Q0().toString(),{done:h,resolve:f,reject:v}=B0(o,"Request expired. Please try again.");return this.events.once(Mr("session_request",c),({error:y,result:A})=>{y?v(y):f(A)}),await Promise.all([new Promise(async y=>{await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:"wc_sessionRequest",params:{request:M0(Ri({},i),{expiryTimestamp:as(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(A=>v(A)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),y()}),new Promise(async y=>{var A;if(!((A=a.sessionConfig)!=null&&A.disableDeepLink)){const M=await Zge(this.client.core.storage,hD);Gge({id:c,topic:s,wcDeepLink:M})}y()}),h()]).then(y=>y[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:i}=t,{id:s}=i;Hl(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0}):ic(i)&&await this.sendError({id:s,topic:n,error:i.error}),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized();try{await this.isValidPing(t)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=t;if(this.client.session.keys.includes(n)){const i=Jd(),s=Q0().toString(),{done:o,resolve:a,reject:c}=B0();this.events.once(Mr("session_ping",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:n,event:i,chainId:s}=t,o=Q0().toString();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:n}=t;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:pn("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=ut("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>v3e(n,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async t=>{this.isInitialized(),this.isValidAuthenticate(t);const{chains:n,statement:i="",uri:s,domain:o,nonce:a,type:c,exp:l,nbf:h,methods:f=[],expiry:v}=t,y=[...t.resources||[]],{topic:A,uri:M}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:A,uri:M}});const $=await this.client.core.crypto.generateKeyPair(),L=M4($);if(await Promise.all([this.client.auth.authKeys.set(B4,{responseTopic:L,publicKey:$}),this.client.auth.pairingTopics.set(L,{topic:L,pairingTopic:A})]),await this.client.core.relayer.subscribe(L),this.client.logger.info(`sending request to new pairing topic: ${A}`),f.length>0){const{namespace:d}=P3(n[0]);let g=H2e(d,"request",f);O4(y)&&(g=z2e(g,y.pop())),y.push(g)}const P=v&&v>ts.wc_sessionAuthenticate.req.ttl?v:ts.wc_sessionAuthenticate.req.ttl,H={authPayload:{type:c??"caip122",chains:n,statement:i,aud:s,domain:o,version:"1",nonce:a,iat:new Date().toISOString(),exp:l,nbf:h,resources:y},requester:{publicKey:$,metadata:this.client.metadata},expiryTimestamp:as(P)},F={eip155:{chains:n,methods:[...new Set(["personal_sign",...f])],events:["chainChanged","accountsChanged"]}},q={requiredNamespaces:{},optionalNamespaces:F,relays:[{protocol:"irn"}],pairingTopic:A,proposer:{publicKey:$,metadata:this.client.metadata},expiryTimestamp:as(ts.wc_sessionPropose.req.ttl)},{done:Y,resolve:I,reject:T}=B0(P,"Request expired"),V=async({error:d,session:g})=>{if(this.events.off(Mr("session_request",te),Q),d)T(d);else if(g){g.self.publicKey=$,await this.client.session.set(g.topic,g),await this.setExpiry(g.topic,g.expiry),A&&await this.client.core.pairing.updateMetadata({topic:A,metadata:g.peer.metadata});const m=this.client.session.get(g.topic);await this.deleteProposal(oe),I({session:m})}},Q=async d=>{if(await this.deletePendingAuthRequest(te,{message:"fulfilled",code:0}),d.error){const R=pn("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return d.error.code===R.code?void 0:(this.events.off(Mr("session_connect"),V),T(d.error.message))}await this.deleteProposal(oe),this.events.off(Mr("session_connect"),V);const{cacaos:g,responder:m}=d.result,b=[],E=[];for(const R of g){await yM({cacao:R,projectId:this.client.core.projectId})||(this.client.logger.error(R,"Signature verification failed"),T(pn("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:w}=R,O=O4(w.resources),pe=[vM(w.iss)],be=c8(w.iss);if(O){const x=bM(O),Z=_M(O);b.push(...x),pe.push(...Z)}for(const x of pe)E.push(`${x}:${be}`)}const C=await this.client.core.crypto.generateSharedKey($,m.publicKey);let B;b.length>0&&(B={topic:C,acknowledged:!0,self:{publicKey:$,metadata:this.client.metadata},peer:m,controller:m.publicKey,expiry:as(lg),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:A,namespaces:TM([...new Set(b)],[...new Set(E)])},await this.client.core.relayer.subscribe(C),await this.client.session.set(C,B),A&&await this.client.core.pairing.updateMetadata({topic:A,metadata:m.metadata}),B=this.client.session.get(C)),I({auths:g,session:B})},te=Jd(),oe=Jd();this.events.once(Mr("session_connect"),V),this.events.once(Mr("session_request",te),Q);try{await Promise.all([this.sendRequest({topic:A,method:"wc_sessionAuthenticate",params:H,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:te}),this.sendRequest({topic:A,method:"wc_sessionPropose",params:q,expiry:ts.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:oe})])}catch(d){throw this.events.off(Mr("session_connect"),V),this.events.off(Mr("session_request",te),Q),d}return await this.setProposal(oe,Ri({id:oe},q)),await this.setAuthRequest(te,{request:M0(Ri({},H),{verifyContext:{}}),pairingTopic:A}),{uri:M,response:Y}},this.approveSessionAuthenticate=async t=>{this.isInitialized();const{id:n,auths:i}=t,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=M4(o),l={type:td,receiverPublicKey:o,senderPublicKey:a},h=[],f=[];for(const A of i){if(!await yM({cacao:A,projectId:this.client.core.projectId})){const H=pn("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:c,error:H,encodeOpts:l}),new Error(H.message)}const{p:M}=A,$=O4(M.resources),L=[vM(M.iss)],P=c8(M.iss);if($){const H=bM($),F=_M($);h.push(...H),L.push(...F)}for(const H of L)f.push(`${H}:${P}`)}const v=await this.client.core.crypto.generateSharedKey(a,o);let y;return(h==null?void 0:h.length)>0&&(y={topic:v,acknowledged:!0,self:{publicKey:a,metadata:this.client.metadata},peer:{publicKey:o,metadata:s.requester.metadata},controller:o,expiry:as(lg),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:s.pairingTopic,namespaces:TM([...new Set(h)],[...new Set(f)])},await this.client.core.relayer.subscribe(v),await this.client.session.set(v,y),await this.client.core.pairing.updateMetadata({topic:s.pairingTopic,metadata:s.requester.metadata})),await this.sendResult({topic:c,id:n,result:{cacaos:i,responder:{publicKey:a,metadata:this.client.metadata}},encodeOpts:l,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:s.pairingTopic}),{session:y}},this.rejectSessionAuthenticate=async t=>{await this.isInitialized();const{id:n,reason:i}=t,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=M4(o),l={type:td,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:ts.wc_sessionAuthenticate.reject}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.client.proposal.delete(n,pn("USER_DISCONNECTED"))},this.formatAuthMessage=t=>{this.isInitialized();const{request:n,iss:i}=t;return jH(n,i)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const t=this.relayMessageCache.shift();t&&await this.onRelayMessage(t)}catch(t){this.client.logger.error(t)}},50)},this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===t.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async t=>{var n;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=t,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,pn("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(hD).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,pn("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=$l.idle),o&&this.client.events.emit("session_delete",{id:a,topic:i})},this.deleteProposal=async(t,n)=>{await Promise.all([this.client.proposal.delete(t,pn("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"proposal")},this.deletePendingSessionRequest=async(t,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==t),i&&(this.sessionRequestQueue.state=$l.idle,this.client.events.emit("session_request_expire",{id:t}))},this.deletePendingAuthRequest=async(t,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(t,n),i?Promise.resolve():this.client.core.expirer.del(t)])},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&(this.client.core.expirer.set(t,n),await this.client.session.update(t,{expiry:n}))},this.setProposal=async(t,n)=>{this.client.core.expirer.set(t,as(ts.wc_sessionPropose.req.ttl)),await this.client.proposal.set(t,n)},this.setAuthRequest=async(t,n)=>{const{request:i,pairingTopic:s}=n;this.client.core.expirer.set(t,i.expiryTimestamp),await this.client.auth.requests.set(t,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:t,pairingTopic:s,verifyContext:i.verifyContext})},this.setPendingSessionRequest=async t=>{const{id:n,topic:i,params:s,verifyContext:o}=t,a=s.request.expiryTimestamp||as(ts.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})},this.sendRequest=async t=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l}=t,h=tm(i,s,c);if(t2()&&t4e.includes(i)){const y=Y0(JSON.stringify(h));this.client.core.verify.register({attestationId:y})}let f;try{f=await this.client.core.crypto.encode(n,h)}catch(y){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),y}const v=ts[i].req;return o&&(v.ttl=o),a&&(v.id=a),this.client.core.history.set(n,h),l?(v.internal=M0(Ri({},v.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,f,v)):this.client.core.relayer.publish(n,f,v).catch(y=>this.client.logger.error(y)),h.id},this.sendResult=async t=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a}=t,c=j_(n,s);let l;try{l=await this.client.core.crypto.encode(i,c,a)}catch(v){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),v}let h;try{h=await this.client.core.history.get(i,n)}catch(v){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),v}const f=ts[h.request.method].res;o?(f.internal=M0(Ri({},f.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,l,f)):this.client.core.relayer.publish(i,l,f).catch(v=>this.client.logger.error(v)),await this.client.core.history.resolve(c)},this.sendError=async t=>{const{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a}=t,c=H_(n,s);let l;try{l=await this.client.core.crypto.encode(i,c,o)}catch(v){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),v}let h;try{h=await this.client.core.history.get(i,n)}catch(v){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),v}const f=a||ts[h.request.method].res;this.client.core.relayer.publish(i,l,f),await this.client.core.history.resolve(c)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;Yd(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&t.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{Yd(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...t.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===$l.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=$l.active;const t=this.requestQueue.queue.shift();if(t)try{await this.processRequest(t)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=$l.idle},this.processRequest=async t=>{const{topic:n,payload:i}=t,s=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:s}))switch(s){case"wc_sessionPropose":return await this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest(n,i);case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:i}=t,s=(await this.client.core.history.get(n,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:i}=ut("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.shouldIgnorePairingRequest=t=>{const{topic:n,requestMethod:i}=t,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(t,n)=>{const{params:i,id:s}=n;try{this.isValidConnect(Ri({},n.params));const o=i.expiryTimestamp||as(ts.wc_sessionPropose.req.ttl),a=Ri({id:s,pairingTopic:t,expiryTimestamp:o},i);await this.setProposal(s,a);const c=Y0(JSON.stringify(n)),l=await this.getVerifyContext(c,a.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:a,verifyContext:l})}catch(o){await this.sendError({id:s,topic:t,error:o,rpcOpts:ts.wc_sessionPropose.autoReject}),this.client.logger.error(o)}},this.onSessionProposeResponse=async(t,n)=>{const{id:i}=n;if(Hl(n)){const{result:s}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const a=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const c=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});const l=await this.client.core.crypto.generateSharedKey(a,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:l});const h=await this.client.core.relayer.subscribe(l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:t})}else if(ic(n)){await this.client.proposal.delete(i,pn("USER_DISCONNECTED"));const s=Mr("session_connect");if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners, 954`);this.events.emit(Mr("session_connect"),{error:n.error})}},this.onSessionSettleRequest=async(t,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:h,sessionConfig:f}=n.params,v=Ri(Ri({topic:t,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},h&&{sessionProperties:h}),f&&{sessionConfig:f}),y=Mr("session_connect");if(this.events.listenerCount(y)===0)throw new Error(`emitting ${y} without any listeners 997`);this.events.emit(Mr("session_connect"),{session:v}),await this.sendResult({id:n.id,topic:t,result:!0,throwOnFailedPublish:!0})}catch(o){await this.sendError({id:i,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionSettleResponse=async(t,n)=>{const{id:i}=n;Hl(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(Mr("session_approve",i),{})):ic(n)&&(await this.client.session.delete(t,pn("USER_DISCONNECTED")),this.events.emit(Mr("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:i,id:s}=n;try{const o=`${t}_session_update`,a=K2.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.info(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:t,error:pn("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(Ri({topic:t},i));try{K2.set(o,s),await this.client.session.update(t,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0})}catch(c){throw K2.delete(o),c}this.client.events.emit("session_update",{id:s,topic:t,params:i})}catch(o){await this.sendError({id:s,topic:t,error:o}),this.client.logger.error(o)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:i}=n,s=Mr("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Hl(n)?this.events.emit(Mr("session_update",i),{}):ic(n)&&this.events.emit(Mr("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:i}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,as(lg)),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionExtendResponse=(t,n)=>{const{id:i}=n,s=Mr("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Hl(n)?this.events.emit(Mr("session_extend",i),{}):ic(n)&&this.events.emit(Mr("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:i}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:t})}catch(s){await this.sendError({id:i,topic:t,error:s}),this.client.logger.error(s)}},this.onSessionPingResponse=(t,n)=>{const{id:i}=n,s=Mr("session_ping",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);setTimeout(()=>{Hl(n)?this.events.emit(Mr("session_ping",i),{}):ic(n)&&this.events.emit(Mr("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once($o.publish,async()=>{s(await this.deleteSession({topic:t,id:i}))})}),this.sendResult({id:i,topic:t,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:pn("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async(t,n)=>{var i;const{id:s,params:o}=n;try{await this.isValidRequest(Ri({topic:t},o));const a=Y0(JSON.stringify(tm("wc_sessionRequest",o,s))),c=this.client.session.get(t),l=await this.getVerifyContext(a,c.peer.metadata),h={id:s,topic:t,params:o,verifyContext:l};await this.setPendingSessionRequest(h),(i=this.client.signConfig)!=null&&i.disableRequestQueue?this.emitSessionRequest(h):(this.addSessionRequestToSessionRequestQueue(h),this.processSessionRequestQueue())}catch(a){await this.sendError({id:s,topic:t,error:a}),this.client.logger.error(a)}},this.onSessionRequestResponse=(t,n)=>{const{id:i}=n,s=Mr("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Hl(n)?this.events.emit(Mr("session_request",i),{result:n.result}):ic(n)&&this.events.emit(Mr("session_request",i),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:i,params:s}=n;try{const o=`${t}_session_event_${s.event.name}`,a=K2.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Ri({topic:t},s)),this.client.events.emit("session_event",{id:i,topic:t,params:s}),K2.set(o,i)}catch(o){await this.sendError({id:i,topic:t,error:o}),this.client.logger.error(o)}},this.onSessionAuthenticateResponse=(t,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:t,payload:n}),Hl(n)?this.events.emit(Mr("session_request",i),{result:n.result}):ic(n)&&this.events.emit(Mr("session_request",i),{error:n.error})},this.onSessionAuthenticateRequest=async(t,n)=>{try{const{requester:i,authPayload:s,expiryTimestamp:o}=n.params,a=Y0(JSON.stringify(n)),c=await this.getVerifyContext(a,this.client.metadata),l={requester:i,pairingTopic:t,id:n.id,authPayload:s,verifyContext:c,expiryTimestamp:o};await this.setAuthRequest(n.id,{request:l,pairingTopic:t}),this.client.events.emit("session_authenticate",{topic:t,params:n.params,id:n.id,verifyContext:c})}catch(i){this.client.logger.error(i);const s=n.params.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a={type:td,receiverPublicKey:s,senderPublicKey:o};await this.sendError({id:n.id,topic:t,error:i,encodeOpts:a,rpcOpts:ts.wc_sessionAuthenticate.autoReject})}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=$l.idle,this.processSessionRequestQueue()},Tt.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===t&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=Mr("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(Mr("session_request",s.request.id),{error:n})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===$l.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=$l.active,this.emitSessionRequest(t)}catch(n){this.client.logger.error(n)}},this.emitSessionRequest=t=>{this.client.events.emit("session_request",t)},this.onPairingCreated=t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===t.topic);n&&this.onSessionProposeRequest(t.topic,tm("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=async t=>{if(!To(t)){const{message:c}=ut("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(c)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,relays:a}=t;if(Do(n)||await this.isValidPairingTopic(n),!k3e(a)){const{message:c}=ut("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(c)}!Do(i)&&zv(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!Do(s)&&zv(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),Do(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(t,n)=>{const i=R3e(t,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async t=>{if(!To(t))throw new Error(ut("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o}=t;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const a=this.client.proposal.get(n),c=XE(i,"approve()");if(c)throw new Error(c.message);const l=NM(a.requiredNamespaces,i,"approve()");if(l)throw new Error(l.message);if(!di(s,!0)){const{message:h}=ut("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(h)}Do(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async t=>{if(!To(t)){const{message:s}=ut("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(s)}const{id:n,reason:i}=t;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!P3e(i)){const{message:s}=ut("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=t=>{if(!To(t)){const{message:l}=ut("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(l)}const{relay:n,controller:i,namespaces:s,expiry:o}=t;if(!KH(n)){const{message:l}=ut("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const a=A3e(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const c=XE(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(Yd(o)){const{message:l}=ut("EXPIRED","onSessionSettleRequest()");throw new Error(l)}},this.isValidUpdate=async t=>{if(!To(t)){const{message:c}=ut("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(c)}const{topic:n,namespaces:i}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=XE(i,"update()");if(o)throw new Error(o.message);const a=NM(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async t=>{if(!To(t)){const{message:i}=ut("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(i)}const{topic:n}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!To(t)){const{message:c}=ut("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(c)}const{topic:n,request:i,chainId:s,expiry:o}=t;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!kM(a,s)){const{message:c}=ut("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!O3e(i)){const{message:c}=ut("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!$3e(a,s,i.method)){const{message:c}=ut("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!F3e(o,a7)){const{message:c}=ut("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${a7.min} and ${a7.max}`);throw new Error(c)}},this.isValidRespond=async t=>{var n;if(!To(t)){const{message:o}=ut("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(o)}const{topic:i,response:s}=t;try{await this.isValidSessionTopic(i)}catch(o){throw(n=t==null?void 0:t.response)!=null&&n.id&&this.cleanupAfterResponse(t),o}if(!M3e(s)){const{message:o}=ut("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}},this.isValidPing=async t=>{if(!To(t)){const{message:i}=ut("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!To(t)){const{message:a}=ut("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=t;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!kM(o,s)){const{message:a}=ut("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!D3e(i)){const{message:a}=ut("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!B3e(o,s,i.name)){const{message:a}=ut("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidDisconnect=async t=>{if(!To(t)){const{message:i}=ut("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(i)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidAuthenticate=t=>{const{chains:n,uri:i,domain:s,nonce:o}=t;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!di(i,!1))throw new Error("uri is required parameter");if(!di(s,!1))throw new Error("domain is required parameter");if(!di(o,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(c=>P3(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=P3(n[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(t,n)=>{const i={verified:{verifyUrl:n.verifyUrl||l3,validation:"UNKNOWN",origin:n.url||""}};try{const s=await this.client.core.verify.resolve({attestationId:t,verifyUrl:n.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(i=>{if(!di(i,!1)){const{message:s}=ut("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})},this.getPendingAuthRequest=t=>{const n=this.client.auth.requests.get(t);return typeof n=="object"?n:void 0},this.addToRecentlyDeleted=(t,n)=>{if(this.recentlyDeletedMap.set(t,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}},this.checkRecentlyDeleted=t=>{const n=this.recentlyDeletedMap.get(t);if(n){const{message:i}=ut("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${t}`);throw new Error(i)}}}async isInitialized(){if(!this.initialized){const{message:e}=ut("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on($o.message,e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):this.onRelayMessage(e)})}async onRelayMessage(e){const{topic:t,message:n,attestation:i}=e,{publicKey:s}=this.client.auth.authKeys.keys.includes(B4)?this.client.auth.authKeys.get(B4):{responseTopic:void 0,publicKey:void 0},o=await this.client.core.crypto.decode(t,n,{receiverPublicKey:s});try{mT(o)?(this.client.core.history.set(t,o),this.onRelayEventRequest({topic:t,payload:o,attestation:i})):W_(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:t,payload:o}),this.client.core.history.delete(t,o.id)):this.onRelayEventUnknownPayload({topic:t,payload:o})}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(Ga.expired,async e=>{const{topic:t,id:n}=sH(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,ut("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,ut("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Pg.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(Pg.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!di(e,!1)){const{message:t}=ut("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=ut("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(Yd(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=ut("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!di(e,!1)){const{message:t}=ut("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=ut("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(Yd(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=ut("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=ut("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(di(e,!1)){const{message:t}=ut("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=ut("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!N3e(e)){const{message:t}=ut("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=ut("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(Yd(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=ut("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}};class f4e extends N1{constructor(e,t){super(e,t,Q5e,yT),this.core=e,this.logger=t}}let p4e=class extends N1{constructor(e,t){super(e,t,J5e,yT),this.core=e,this.logger=t}};class g4e extends N1{constructor(e,t){super(e,t,e4e,yT,n=>n.id),this.core=e,this.logger=t}}let m4e=class extends N1{constructor(e,t){super(e,t,i4e,V_,()=>B4),this.core=e,this.logger=t}};class w4e extends N1{constructor(e,t){super(e,t,s4e,V_),this.core=e,this.logger=t}}class v4e extends N1{constructor(e,t){super(e,t,o4e,V_,n=>n.id),this.core=e,this.logger=t}}class y4e{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new m4e(this.core,this.logger),this.pairingTopics=new w4e(this.core,this.logger),this.requests=new v4e(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}let b4e=class CW extends Dve{constructor(e){super(e),this.protocol=_W,this.version=xW,this.name=o7.name,this.events=new mo.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.authenticate=async n=>{try{return await this.engine.authenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.formatAuthMessage=n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}},this.approveSessionAuthenticate=async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.rejectSessionAuthenticate=async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}},this.name=(e==null?void 0:e.name)||o7.name,this.metadata=(e==null?void 0:e.metadata)||jge(),this.signConfig=e==null?void 0:e.signConfig;const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Cy(Ty({level:(e==null?void 0:e.logger)||o7.logger}));this.core=(e==null?void 0:e.core)||new Y5e(e),this.logger=go(t,this.name),this.session=new p4e(this.core,this.logger),this.proposal=new f4e(this.core,this.logger),this.pendingRequest=new g4e(this.core,this.logger),this.engine=new d4e(this),this.auth=new y4e(this.core,this.logger)}static async init(e){const t=new CW(e);return await t.initialize(),t}get context(){return zo(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success"),this.engine.processRelayMessageCache()}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var OC={exports:{}};(function(r,e){var t=typeof self<"u"?self:Yr,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(g){return g&&DataView.prototype.isPrototypeOf(g)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(g){return g&&l.indexOf(Object.prototype.toString.call(g))>-1};function f(g){if(typeof g!="string"&&(g=String(g)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(g))throw new TypeError("Invalid character in header field name");return g.toLowerCase()}function v(g){return typeof g!="string"&&(g=String(g)),g}function y(g){var m={next:function(){var b=g.shift();return{done:b===void 0,value:b}}};return a.iterable&&(m[Symbol.iterator]=function(){return m}),m}function A(g){this.map={},g instanceof A?g.forEach(function(m,b){this.append(b,m)},this):Array.isArray(g)?g.forEach(function(m){this.append(m[0],m[1])},this):g&&Object.getOwnPropertyNames(g).forEach(function(m){this.append(m,g[m])},this)}A.prototype.append=function(g,m){g=f(g),m=v(m);var b=this.map[g];this.map[g]=b?b+", "+m:m},A.prototype.delete=function(g){delete this.map[f(g)]},A.prototype.get=function(g){return g=f(g),this.has(g)?this.map[g]:null},A.prototype.has=function(g){return this.map.hasOwnProperty(f(g))},A.prototype.set=function(g,m){this.map[f(g)]=v(m)},A.prototype.forEach=function(g,m){for(var b in this.map)this.map.hasOwnProperty(b)&&g.call(m,this.map[b],b,this)},A.prototype.keys=function(){var g=[];return this.forEach(function(m,b){g.push(b)}),y(g)},A.prototype.values=function(){var g=[];return this.forEach(function(m){g.push(m)}),y(g)},A.prototype.entries=function(){var g=[];return this.forEach(function(m,b){g.push([b,m])}),y(g)},a.iterable&&(A.prototype[Symbol.iterator]=A.prototype.entries);function M(g){if(g.bodyUsed)return Promise.reject(new TypeError("Already read"));g.bodyUsed=!0}function $(g){return new Promise(function(m,b){g.onload=function(){m(g.result)},g.onerror=function(){b(g.error)}})}function L(g){var m=new FileReader,b=$(m);return m.readAsArrayBuffer(g),b}function P(g){var m=new FileReader,b=$(m);return m.readAsText(g),b}function H(g){for(var m=new Uint8Array(g),b=new Array(m.length),E=0;E-1?m:g}function T(g,m){m=m||{};var b=m.body;if(g instanceof T){if(g.bodyUsed)throw new TypeError("Already read");this.url=g.url,this.credentials=g.credentials,m.headers||(this.headers=new A(g.headers)),this.method=g.method,this.mode=g.mode,this.signal=g.signal,!b&&g._bodyInit!=null&&(b=g._bodyInit,g.bodyUsed=!0)}else this.url=String(g);if(this.credentials=m.credentials||this.credentials||"same-origin",(m.headers||!this.headers)&&(this.headers=new A(m.headers)),this.method=I(m.method||this.method||"GET"),this.mode=m.mode||this.mode||null,this.signal=m.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&b)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(b)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function V(g){var m=new FormData;return g.trim().split("&").forEach(function(b){if(b){var E=b.split("="),C=E.shift().replace(/\+/g," "),B=E.join("=").replace(/\+/g," ");m.append(decodeURIComponent(C),decodeURIComponent(B))}}),m}function Q(g){var m=new A,b=g.replace(/\r?\n[\t ]+/g," ");return b.split(/\r?\n/).forEach(function(E){var C=E.split(":"),B=C.shift().trim();if(B){var R=C.join(":").trim();m.append(B,R)}}),m}q.call(T.prototype);function te(g,m){m||(m={}),this.type="default",this.status=m.status===void 0?200:m.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in m?m.statusText:"OK",this.headers=new A(m.headers),this.url=m.url||"",this._initBody(g)}q.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new A(this.headers),url:this.url})},te.error=function(){var g=new te(null,{status:0,statusText:""});return g.type="error",g};var oe=[301,302,303,307,308];te.redirect=function(g,m){if(oe.indexOf(m)===-1)throw new RangeError("Invalid status code");return new te(null,{status:m,headers:{location:g}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(m,b){this.message=m,this.name=b;var E=Error(m);this.stack=E.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function d(g,m){return new Promise(function(b,E){var C=new T(g,m);if(C.signal&&C.signal.aborted)return E(new o.DOMException("Aborted","AbortError"));var B=new XMLHttpRequest;function R(){B.abort()}B.onload=function(){var w={status:B.status,statusText:B.statusText,headers:Q(B.getAllResponseHeaders()||"")};w.url="responseURL"in B?B.responseURL:w.headers.get("X-Request-URL");var O="response"in B?B.response:B.responseText;b(new te(O,w))},B.onerror=function(){E(new TypeError("Network request failed"))},B.ontimeout=function(){E(new TypeError("Network request failed"))},B.onabort=function(){E(new o.DOMException("Aborted","AbortError"))},B.open(C.method,C.url,!0),C.credentials==="include"?B.withCredentials=!0:C.credentials==="omit"&&(B.withCredentials=!1),"responseType"in B&&a.blob&&(B.responseType="blob"),C.headers.forEach(function(w,O){B.setRequestHeader(O,w)}),C.signal&&(C.signal.addEventListener("abort",R),B.onreadystatechange=function(){B.readyState===4&&C.signal.removeEventListener("abort",R)}),B.send(typeof C._bodyInit>"u"?null:C._bodyInit)})}return d.polyfill=!0,s.fetch||(s.fetch=d,s.Headers=A,s.Request=T,s.Response=te),o.Headers=A,o.Request=T,o.Response=te,o.fetch=d,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e})(OC,OC.exports);var _4e=OC.exports;const pD=Xf(_4e);var x4e=Object.defineProperty,A4e=Object.defineProperties,E4e=Object.getOwnPropertyDescriptors,gD=Object.getOwnPropertySymbols,C4e=Object.prototype.hasOwnProperty,S4e=Object.prototype.propertyIsEnumerable,mD=(r,e,t)=>e in r?x4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,wD=(r,e)=>{for(var t in e||(e={}))C4e.call(e,t)&&mD(r,t,e[t]);if(gD)for(var t of gD(e))S4e.call(e,t)&&mD(r,t,e[t]);return r},vD=(r,e)=>A4e(r,E4e(e));const I4e={Accept:"application/json","Content-Type":"application/json"},T4e="POST",yD={headers:I4e,method:T4e},bD=10;let Ju=class{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new mo.EventEmitter,this.isAvailable=!1,this.registering=!1,!zM(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=id(e),n=await(await pD(this.url,vD(wD({},yD),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!zM(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=id({id:1,jsonrpc:"2.0",method:"test",params:[]});await pD(e,vD(wD({},yD),{body:t}))}this.onOpen()}catch(t){const n=this.parseError(t);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?Sy(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),i=n.message||n.toString(),s=H_(e,i);this.events.emit("payload",s)}parseError(e,t=this.url){return nW(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>bD&&this.events.setMaxListeners(bD)}};const _D="error",R4e="wss://relay.walletconnect.com",k4e="wc",N4e="universal_provider",xD=`${k4e}@2:${N4e}:`,P4e="https://rpc.walletconnect.com/v1/",Sg="generic",El={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Y2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},MC={exports:{}};/** +* @license +* Lodash +* Copyright OpenJS Foundation and other contributors +* Released under MIT license +* Based on Underscore.js 1.8.3 +* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +*/(function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",f=1,v=2,y=4,A=1,M=2,$=1,L=2,P=4,H=8,F=16,q=32,Y=64,I=128,T=256,V=512,Q=30,te="...",oe=800,d=16,g=1,m=2,b=3,E=1/0,C=9007199254740991,B=17976931348623157e292,R=NaN,w=4294967295,O=w-1,pe=w>>>1,be=[["ary",I],["bind",$],["bindKey",L],["curry",H],["curryRight",F],["flip",V],["partial",q],["partialRight",Y],["rearg",T]],x="[object Arguments]",Z="[object Array]",k="[object AsyncFunction]",W="[object Boolean]",J="[object Date]",S="[object DOMException]",D="[object Error]",G="[object Function]",z="[object GeneratorFunction]",K="[object Map]",ue="[object Number]",ye="[object Null]",we="[object Object]",je="[object Promise]",Me="[object Proxy]",Ie="[object RegExp]",Be="[object Set]",xe="[object String]",$e="[object Symbol]",We="[object Undefined]",Ne="[object WeakMap]",Ue="[object WeakSet]",X="[object ArrayBuffer]",N="[object DataView]",U="[object Float32Array]",ie="[object Float64Array]",le="[object Int8Array]",me="[object Int16Array]",Ee="[object Int32Array]",ze="[object Uint8Array]",qe="[object Uint8ClampedArray]",St="[object Uint16Array]",Je="[object Uint32Array]",nt=/\b__p \+= '';/g,jr=/\b(__p \+=) '' \+/g,jt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ht=/&(?:amp|lt|gt|quot|#39);/g,bn=/[&<>"']/g,pt=RegExp(Ht.source),ht=RegExp(bn.source),yr=/<%-([\s\S]+?)%>/g,gt=/<%([\s\S]+?)%>/g,ft=/<%=([\s\S]+?)%>/g,ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_t=/^\w*$/,xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,br=/[\\^$.*+?()[\]{}|]/g,At=RegExp(br.source),mt=/^\s+/,Er=/\s/,wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ir=/,? & /,Et=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gt=/[()=,{}\[\]\/\s]/,Vn=/\\(\\)?/g,Zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,Nn=/^[-+]0x[0-9a-f]+$/i,Pn=/^0b[01]+$/i,On=/^\[object .+?Constructor\]$/,Mn=/^0o[0-7]+$/i,Dn=/^(?:0|[1-9]\d*)$/,tn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$i=/($^)/,$s=/['\n\r\u2028\u2029\\]/g,Bi="\\ud800-\\udfff",Bs="\\u0300-\\u036f",Ls="\\ufe20-\\ufe2f",Li="\\u20d0-\\u20ff",gs=Bs+Ls+Li,ms="\\u2700-\\u27bf",qn="a-z\\xdf-\\xf6\\xf8-\\xff",yc="\\xac\\xb1\\xd7\\xf7",bc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_c="\\u2000-\\u206f",xc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Eb="A-Z\\xc0-\\xd6\\xd8-\\xde",Cb="\\ufe0e\\ufe0f",p0=yc+bc+_c+xc,p2="['’]",g0="["+Bi+"]",g2="["+p0+"]",m0="["+gs+"]",Sb="\\d+",Mx="["+ms+"]",Ib="["+qn+"]",Tb="[^"+Bi+p0+Sb+ms+qn+Eb+"]",F1="\\ud83c[\\udffb-\\udfff]",Dx="(?:"+m0+"|"+F1+")",Rb="[^"+Bi+"]",j1="(?:\\ud83c[\\udde6-\\uddff]){2}",Sd="[\\ud800-\\udbff][\\udc00-\\udfff]",qo="["+Eb+"]",kb="\\u200d",Nb="(?:"+Ib+"|"+Tb+")",Il="(?:"+qo+"|"+Tb+")",Pb="(?:"+p2+"(?:d|ll|m|re|s|t|ve))?",Ob="(?:"+p2+"(?:D|LL|M|RE|S|T|VE))?",Mb=Dx+"?",Db="["+Cb+"]?",$x="(?:"+kb+"(?:"+[Rb,j1,Sd].join("|")+")"+Db+Mb+")*",rh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$b="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bb=Db+Mb+$x,H1="(?:"+[Mx,j1,Sd].join("|")+")"+Bb,Bx="(?:"+[Rb+m0+"?",m0,j1,Sd,g0].join("|")+")",m2=RegExp(p2,"g"),Lx=RegExp(m0,"g"),W1=RegExp(F1+"(?="+F1+")|"+Bx+Bb,"g"),Lb=RegExp([qo+"?"+Ib+"+"+Pb+"(?="+[g2,qo,"$"].join("|")+")",Il+"+"+Ob+"(?="+[g2,qo+Nb,"$"].join("|")+")",qo+"?"+Nb+"+"+Pb,qo+"+"+Ob,$b,rh,Sb,H1].join("|"),"g"),Ub=RegExp("["+kb+Bi+gs+Cb+"]"),w0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ux=-1,_n={};_n[U]=_n[ie]=_n[le]=_n[me]=_n[Ee]=_n[ze]=_n[qe]=_n[St]=_n[Je]=!0,_n[x]=_n[Z]=_n[X]=_n[W]=_n[N]=_n[J]=_n[D]=_n[G]=_n[K]=_n[ue]=_n[we]=_n[Ie]=_n[Be]=_n[xe]=_n[Ne]=!1;var mn={};mn[x]=mn[Z]=mn[X]=mn[N]=mn[W]=mn[J]=mn[U]=mn[ie]=mn[le]=mn[me]=mn[Ee]=mn[K]=mn[ue]=mn[we]=mn[Ie]=mn[Be]=mn[xe]=mn[$e]=mn[ze]=mn[qe]=mn[St]=mn[Je]=!0,mn[D]=mn[G]=mn[Ne]=!1;var fe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ce={"&":"&","<":"<",">":">",'"':""","'":"'"},Ye={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xn=parseFloat,fr=parseInt,$n=typeof Y2=="object"&&Y2&&Y2.Object===Object&&Y2,bi=typeof self=="object"&&self&&self.Object===Object&&self,Hr=$n||bi||Function("return this")(),An=e&&!e.nodeType&&e,oi=An&&!0&&r&&!r.nodeType&&r,wo=oi&&oi.exports===An,_i=wo&&$n.process,Bn=function(){try{var Se=oi&&oi.require&&oi.require("util").types;return Se||_i&&_i.binding&&_i.binding("util")}catch{}}(),Us=Bn&&Bn.isArrayBuffer,Ac=Bn&&Bn.isDate,Sa=Bn&&Bn.isMap,Tl=Bn&&Bn.isRegExp,w2=Bn&&Bn.isSet,v0=Bn&&Bn.isTypedArray;function Ui(Se,Ve,He){switch(He.length){case 0:return Se.call(Ve);case 1:return Se.call(Ve,He[0]);case 2:return Se.call(Ve,He[0],He[1]);case 3:return Se.call(Ve,He[0],He[1],He[2])}return Se.apply(Ve,He)}function IK(Se,Ve,He,$t){for(var hr=-1,rn=Se==null?0:Se.length;++hr-1}function Fx(Se,Ve,He){for(var $t=-1,hr=Se==null?0:Se.length;++$t-1;);return He}function gR(Se,Ve){for(var He=Se.length;He--&&z1(Ve,Se[He],0)>-1;);return He}function $K(Se,Ve){for(var He=Se.length,$t=0;He--;)Se[He]===Ve&&++$t;return $t}var BK=zx(fe),LK=zx(Ce);function UK(Se){return"\\"+Ot[Se]}function FK(Se,Ve){return Se==null?t:Se[Ve]}function V1(Se){return Ub.test(Se)}function jK(Se){return w0.test(Se)}function HK(Se){for(var Ve,He=[];!(Ve=Se.next()).done;)He.push(Ve.value);return He}function Gx(Se){var Ve=-1,He=Array(Se.size);return Se.forEach(function($t,hr){He[++Ve]=[hr,$t]}),He}function mR(Se,Ve){return function(He){return Se(Ve(He))}}function Rd(Se,Ve){for(var He=-1,$t=Se.length,hr=0,rn=[];++He<$t;){var Ii=Se[He];(Ii===Ve||Ii===h)&&(Se[He]=h,rn[hr++]=He)}return rn}function Wb(Se){var Ve=-1,He=Array(Se.size);return Se.forEach(function($t){He[++Ve]=$t}),He}function WK(Se){var Ve=-1,He=Array(Se.size);return Se.forEach(function($t){He[++Ve]=[$t,$t]}),He}function zK(Se,Ve,He){for(var $t=He-1,hr=Se.length;++$t-1}function RG(u,p){var _=this.__data__,j=i5(_,u);return j<0?(++this.size,_.push([u,p])):_[j][1]=p,this}nh.prototype.clear=CG,nh.prototype.delete=SG,nh.prototype.get=IG,nh.prototype.has=TG,nh.prototype.set=RG;function ih(u){var p=-1,_=u==null?0:u.length;for(this.clear();++p<_;){var j=u[p];this.set(j[0],j[1])}}function kG(){this.size=0,this.__data__={hash:new b0,map:new(b2||nh),string:new b0}}function NG(u){var p=m5(this,u).delete(u);return this.size-=p?1:0,p}function PG(u){return m5(this,u).get(u)}function OG(u){return m5(this,u).has(u)}function MG(u,p){var _=m5(this,u),j=_.size;return _.set(u,p),this.size+=_.size==j?0:1,this}ih.prototype.clear=kG,ih.prototype.delete=NG,ih.prototype.get=PG,ih.prototype.has=OG,ih.prototype.set=MG;function _0(u){var p=-1,_=u==null?0:u.length;for(this.__data__=new ih;++p<_;)this.add(u[p])}function DG(u){return this.__data__.set(u,c),this}function $G(u){return this.__data__.has(u)}_0.prototype.add=_0.prototype.push=DG,_0.prototype.has=$G;function Cc(u){var p=this.__data__=new nh(u);this.size=p.size}function BG(){this.__data__=new nh,this.size=0}function LG(u){var p=this.__data__,_=p.delete(u);return this.size=p.size,_}function UG(u){return this.__data__.get(u)}function FG(u){return this.__data__.has(u)}function jG(u,p){var _=this.__data__;if(_ instanceof nh){var j=_.__data__;if(!b2||j.length=p?u:p)),u}function ka(u,p,_,j,re,ae){var ve,_e=p&f,ke=p&v,Ke=p&y;if(_&&(ve=re?_(u,j,re,ae):_(u)),ve!==t)return ve;if(!Kn(u))return u;var Ge=pr(u);if(Ge){if(ve=OZ(u),!_e)return vo(u,ve)}else{var Xe=vs(u),Ct=Xe==G||Xe==z;if(Dd(u))return JR(u,_e);if(Xe==we||Xe==x||Ct&&!re){if(ve=ke||Ct?{}:wk(u),!_e)return ke?xZ(u,VG(ve,u)):_Z(u,TR(ve,u))}else{if(!mn[Xe])return re?u:{};ve=MZ(u,Xe,_e)}}ae||(ae=new Cc);var Kt=ae.get(u);if(Kt)return Kt;ae.set(u,ve),qk(u)?u.forEach(function(sr){ve.add(ka(sr,p,_,sr,u,ae))}):zk(u)&&u.forEach(function(sr,Or){ve.set(Or,ka(sr,p,_,Or,u,ae))});var ir=Ke?ke?bA:yA:ke?bo:Fi,Tr=Ge?t:ir(u);return Ia(Tr||u,function(sr,Or){Tr&&(Or=sr,sr=u[Or]),E2(ve,Or,ka(sr,p,_,Or,u,ae))}),ve}function qG(u){var p=Fi(u);return function(_){return RR(_,u,p)}}function RR(u,p,_){var j=_.length;if(u==null)return!j;for(u=En(u);j--;){var re=_[j],ae=p[re],ve=u[re];if(ve===t&&!(re in u)||!ae(ve))return!1}return!0}function kR(u,p,_){if(typeof u!="function")throw new Ta(o);return N2(function(){u.apply(t,_)},p)}function C2(u,p,_,j){var re=-1,ae=jb,ve=!0,_e=u.length,ke=[],Ke=p.length;if(!_e)return ke;_&&(p=Fn(p,Ko(_))),j?(ae=Fx,ve=!1):p.length>=i&&(ae=v2,ve=!1,p=new _0(p));e:for(;++re<_e;){var Ge=u[re],Xe=_==null?Ge:_(Ge);if(Ge=j||Ge!==0?Ge:0,ve&&Xe===Xe){for(var Ct=Ke;Ct--;)if(p[Ct]===Xe)continue e;ke.push(Ge)}else ae(p,Xe,j)||ke.push(Ge)}return ke}var Nd=nk(Rl),NR=nk(rA,!0);function KG(u,p){var _=!0;return Nd(u,function(j,re,ae){return _=!!p(j,re,ae),_}),_}function s5(u,p,_){for(var j=-1,re=u.length;++jre?0:re+_),j=j===t||j>re?re:Cr(j),j<0&&(j+=re),j=_>j?0:Gk(j);_0&&_(_e)?p>1?Xi(_e,p-1,_,j,re):Td(re,_e):j||(re[re.length]=_e)}return re}var tA=ik(),OR=ik(!0);function Rl(u,p){return u&&tA(u,p,Fi)}function rA(u,p){return u&&OR(u,p,Fi)}function o5(u,p){return Id(p,function(_){return lh(u[_])})}function A0(u,p){p=Od(p,u);for(var _=0,j=p.length;u!=null&&_p}function ZG(u,p){return u!=null&&dn.call(u,p)}function YG(u,p){return u!=null&&p in En(u)}function QG(u,p,_){return u>=ws(p,_)&&u=120&&Ge.length>=120)?new _0(ve&&Ge):t}Ge=u[0];var Xe=-1,Ct=_e[0];e:for(;++Xe-1;)_e!==u&&Qb.call(_e,ke,1),Qb.call(u,ke,1);return u}function zR(u,p){for(var _=u?p.length:0,j=_-1;_--;){var re=p[_];if(_==j||re!==ae){var ae=re;ch(re)?Qb.call(u,re,1):dA(u,re)}}return u}function lA(u,p){return u+e5(ER()*(p-u+1))}function uZ(u,p,_,j){for(var re=-1,ae=Ti(Xb((p-u)/(_||1)),0),ve=He(ae);ae--;)ve[j?ae:++re]=u,u+=_;return ve}function uA(u,p){var _="";if(!u||p<1||p>C)return _;do p%2&&(_+=u),p=e5(p/2),p&&(u+=u);while(p);return _}function Nr(u,p){return IA(bk(u,p,_o),u+"")}function hZ(u){return IR(rg(u))}function dZ(u,p){var _=rg(u);return w5(_,x0(p,0,_.length))}function T2(u,p,_,j){if(!Kn(u))return u;p=Od(p,u);for(var re=-1,ae=p.length,ve=ae-1,_e=u;_e!=null&&++rere?0:re+p),_=_>re?re:_,_<0&&(_+=re),re=p>_?0:_-p>>>0,p>>>=0;for(var ae=He(re);++j>>1,ve=u[ae];ve!==null&&!Zo(ve)&&(_?ve<=p:ve=i){var Ke=p?null:SZ(u);if(Ke)return Wb(Ke);ve=!1,re=v2,ke=new _0}else ke=p?[]:_e;e:for(;++j=j?u:Na(u,p,_)}var QR=nG||function(u){return Hr.clearTimeout(u)};function JR(u,p){if(p)return u.slice();var _=u.length,j=yR?yR(_):new u.constructor(_);return u.copy(j),j}function mA(u){var p=new u.constructor(u.byteLength);return new Zb(p).set(new Zb(u)),p}function wZ(u,p){var _=p?mA(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.byteLength)}function vZ(u){var p=new u.constructor(u.source,Pt.exec(u));return p.lastIndex=u.lastIndex,p}function yZ(u){return A2?En(A2.call(u)):{}}function XR(u,p){var _=p?mA(u.buffer):u.buffer;return new u.constructor(_,u.byteOffset,u.length)}function ek(u,p){if(u!==p){var _=u!==t,j=u===null,re=u===u,ae=Zo(u),ve=p!==t,_e=p===null,ke=p===p,Ke=Zo(p);if(!_e&&!Ke&&!ae&&u>p||ae&&ve&&ke&&!_e&&!Ke||j&&ve&&ke||!_&&ke||!re)return 1;if(!j&&!ae&&!Ke&&u=_e)return ke;var Ke=_[j];return ke*(Ke=="desc"?-1:1)}}return u.index-p.index}function tk(u,p,_,j){for(var re=-1,ae=u.length,ve=_.length,_e=-1,ke=p.length,Ke=Ti(ae-ve,0),Ge=He(ke+Ke),Xe=!j;++_e1?_[re-1]:t,ve=re>2?_[2]:t;for(ae=u.length>3&&typeof ae=="function"?(re--,ae):t,ve&&js(_[0],_[1],ve)&&(ae=re<3?t:ae,re=1),p=En(p);++j-1?re[ae?p[ve]:ve]:t}}function ak(u){return ah(function(p){var _=p.length,j=_,re=Ra.prototype.thru;for(u&&p.reverse();j--;){var ae=p[j];if(typeof ae!="function")throw new Ta(o);if(re&&!ve&&g5(ae)=="wrapper")var ve=new Ra([],!0)}for(j=ve?j:_;++j<_;){ae=p[j];var _e=g5(ae),ke=_e=="wrapper"?_A(ae):t;ke&&CA(ke[0])&&ke[1]==(I|H|q|T)&&!ke[4].length&&ke[9]==1?ve=ve[g5(ke[0])].apply(ve,ke[3]):ve=ae.length==1&&CA(ae)?ve[_e]():ve.thru(ae)}return function(){var Ke=arguments,Ge=Ke[0];if(ve&&Ke.length==1&&pr(Ge))return ve.plant(Ge).value();for(var Xe=0,Ct=_?p[Xe].apply(this,Ke):Ge;++Xe<_;)Ct=p[Xe].call(this,Ct);return Ct}})}function h5(u,p,_,j,re,ae,ve,_e,ke,Ke){var Ge=p&I,Xe=p&$,Ct=p&L,Kt=p&(H|F),ir=p&V,Tr=Ct?t:R2(u);function sr(){for(var Or=arguments.length,Wr=He(Or),Yo=Or;Yo--;)Wr[Yo]=arguments[Yo];if(Kt)var Hs=eg(sr),Qo=$K(Wr,Hs);if(j&&(Wr=tk(Wr,j,re,Kt)),ae&&(Wr=rk(Wr,ae,ve,Kt)),Or-=Qo,Kt&&Or1&&Wr.reverse(),Ge&&ke_e))return!1;var Ke=ae.get(u),Ge=ae.get(p);if(Ke&&Ge)return Ke==p&&Ge==u;var Xe=-1,Ct=!0,Kt=_&M?new _0:t;for(ae.set(u,p),ae.set(p,u);++Xe<_e;){var ir=u[Xe],Tr=p[Xe];if(j)var sr=ve?j(Tr,ir,Xe,p,u,ae):j(ir,Tr,Xe,u,p,ae);if(sr!==t){if(sr)continue;Ct=!1;break}if(Kt){if(!Hx(p,function(Or,Wr){if(!v2(Kt,Wr)&&(ir===Or||re(ir,Or,_,j,ae)))return Kt.push(Wr)})){Ct=!1;break}}else if(!(ir===Tr||re(ir,Tr,_,j,ae))){Ct=!1;break}}return ae.delete(u),ae.delete(p),Ct}function TZ(u,p,_,j,re,ae,ve){switch(_){case N:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case X:return!(u.byteLength!=p.byteLength||!ae(new Zb(u),new Zb(p)));case W:case J:case ue:return Sc(+u,+p);case D:return u.name==p.name&&u.message==p.message;case Ie:case xe:return u==p+"";case K:var _e=Gx;case Be:var ke=j&A;if(_e||(_e=Wb),u.size!=p.size&&!ke)return!1;var Ke=ve.get(u);if(Ke)return Ke==p;j|=M,ve.set(u,p);var Ge=pk(_e(u),_e(p),j,re,ae,ve);return ve.delete(u),Ge;case $e:if(A2)return A2.call(u)==A2.call(p)}return!1}function RZ(u,p,_,j,re,ae){var ve=_&A,_e=yA(u),ke=_e.length,Ke=yA(p),Ge=Ke.length;if(ke!=Ge&&!ve)return!1;for(var Xe=ke;Xe--;){var Ct=_e[Xe];if(!(ve?Ct in p:dn.call(p,Ct)))return!1}var Kt=ae.get(u),ir=ae.get(p);if(Kt&&ir)return Kt==p&&ir==u;var Tr=!0;ae.set(u,p),ae.set(p,u);for(var sr=ve;++Xe1?"& ":"")+p[j],p=p.join(_>2?", ":" "),u.replace(wt,`{ +/* [wrapped with `+p+`] */ +`)}function $Z(u){return pr(u)||S0(u)||!!(xR&&u&&u[xR])}function ch(u,p){var _=typeof u;return p=p??C,!!p&&(_=="number"||_!="symbol"&&Dn.test(u))&&u>-1&&u%1==0&&u0){if(++p>=oe)return arguments[0]}else p=0;return u.apply(t,arguments)}}function w5(u,p){var _=-1,j=u.length,re=j-1;for(p=p===t?j:p;++_1?u[p-1]:t;return _=typeof _=="function"?(u.pop(),_):t,Pk(u,_)});function Ok(u){var p=se(u);return p.__chain__=!0,p}function KY(u,p){return p(u),u}function v5(u,p){return p(u)}var GY=ah(function(u){var p=u.length,_=p?u[0]:0,j=this.__wrapped__,re=function(ae){return eA(ae,u)};return p>1||this.__actions__.length||!(j instanceof Dr)||!ch(_)?this.thru(re):(j=j.slice(_,+_+(p?1:0)),j.__actions__.push({func:v5,args:[re],thisArg:t}),new Ra(j,this.__chain__).thru(function(ae){return p&&!ae.length&&ae.push(t),ae}))});function ZY(){return Ok(this)}function YY(){return new Ra(this.value(),this.__chain__)}function QY(){this.__values__===t&&(this.__values__=Kk(this.value()));var u=this.__index__>=this.__values__.length,p=u?t:this.__values__[this.__index__++];return{done:u,value:p}}function JY(){return this}function XY(u){for(var p,_=this;_ instanceof n5;){var j=Sk(_);j.__index__=0,j.__values__=t,p?re.__wrapped__=j:p=j;var re=j;_=_.__wrapped__}return re.__wrapped__=u,p}function eQ(){var u=this.__wrapped__;if(u instanceof Dr){var p=u;return this.__actions__.length&&(p=new Dr(this)),p=p.reverse(),p.__actions__.push({func:v5,args:[TA],thisArg:t}),new Ra(p,this.__chain__)}return this.thru(TA)}function tQ(){return ZR(this.__wrapped__,this.__actions__)}var rQ=u5(function(u,p,_){dn.call(u,_)?++u[_]:sh(u,_,1)});function nQ(u,p,_){var j=pr(u)?cR:KG;return _&&js(u,p,_)&&(p=t),j(u,rr(p,3))}function iQ(u,p){var _=pr(u)?Id:PR;return _(u,rr(p,3))}var sQ=ok(Ik),oQ=ok(Tk);function aQ(u,p){return Xi(y5(u,p),1)}function cQ(u,p){return Xi(y5(u,p),E)}function lQ(u,p,_){return _=_===t?1:Cr(_),Xi(y5(u,p),_)}function Mk(u,p){var _=pr(u)?Ia:Nd;return _(u,rr(p,3))}function Dk(u,p){var _=pr(u)?TK:NR;return _(u,rr(p,3))}var uQ=u5(function(u,p,_){dn.call(u,_)?u[_].push(p):sh(u,_,[p])});function hQ(u,p,_,j){u=yo(u)?u:rg(u),_=_&&!j?Cr(_):0;var re=u.length;return _<0&&(_=Ti(re+_,0)),E5(u)?_<=re&&u.indexOf(p,_)>-1:!!re&&z1(u,p,_)>-1}var dQ=Nr(function(u,p,_){var j=-1,re=typeof p=="function",ae=yo(u)?He(u.length):[];return Nd(u,function(ve){ae[++j]=re?Ui(p,ve,_):S2(ve,p,_)}),ae}),fQ=u5(function(u,p,_){sh(u,_,p)});function y5(u,p){var _=pr(u)?Fn:LR;return _(u,rr(p,3))}function pQ(u,p,_,j){return u==null?[]:(pr(p)||(p=p==null?[]:[p]),_=j?t:_,pr(_)||(_=_==null?[]:[_]),HR(u,p,_))}var gQ=u5(function(u,p,_){u[_?0:1].push(p)},function(){return[[],[]]});function mQ(u,p,_){var j=pr(u)?jx:dR,re=arguments.length<3;return j(u,rr(p,4),_,re,Nd)}function wQ(u,p,_){var j=pr(u)?RK:dR,re=arguments.length<3;return j(u,rr(p,4),_,re,NR)}function vQ(u,p){var _=pr(u)?Id:PR;return _(u,x5(rr(p,3)))}function yQ(u){var p=pr(u)?IR:hZ;return p(u)}function bQ(u,p,_){(_?js(u,p,_):p===t)?p=1:p=Cr(p);var j=pr(u)?HG:dZ;return j(u,p)}function _Q(u){var p=pr(u)?WG:pZ;return p(u)}function xQ(u){if(u==null)return 0;if(yo(u))return E5(u)?q1(u):u.length;var p=vs(u);return p==K||p==Be?u.size:oA(u).length}function AQ(u,p,_){var j=pr(u)?Hx:gZ;return _&&js(u,p,_)&&(p=t),j(u,rr(p,3))}var EQ=Nr(function(u,p){if(u==null)return[];var _=p.length;return _>1&&js(u,p[0],p[1])?p=[]:_>2&&js(p[0],p[1],p[2])&&(p=[p[0]]),HR(u,Xi(p,1),[])}),b5=iG||function(){return Hr.Date.now()};function CQ(u,p){if(typeof p!="function")throw new Ta(o);return u=Cr(u),function(){if(--u<1)return p.apply(this,arguments)}}function $k(u,p,_){return p=_?t:p,p=u&&p==null?u.length:p,oh(u,I,t,t,t,t,p)}function Bk(u,p){var _;if(typeof p!="function")throw new Ta(o);return u=Cr(u),function(){return--u>0&&(_=p.apply(this,arguments)),u<=1&&(p=t),_}}var kA=Nr(function(u,p,_){var j=$;if(_.length){var re=Rd(_,eg(kA));j|=q}return oh(u,j,p,_,re)}),Lk=Nr(function(u,p,_){var j=$|L;if(_.length){var re=Rd(_,eg(Lk));j|=q}return oh(p,j,u,_,re)});function Uk(u,p,_){p=_?t:p;var j=oh(u,H,t,t,t,t,t,p);return j.placeholder=Uk.placeholder,j}function Fk(u,p,_){p=_?t:p;var j=oh(u,F,t,t,t,t,t,p);return j.placeholder=Fk.placeholder,j}function jk(u,p,_){var j,re,ae,ve,_e,ke,Ke=0,Ge=!1,Xe=!1,Ct=!0;if(typeof u!="function")throw new Ta(o);p=Oa(p)||0,Kn(_)&&(Ge=!!_.leading,Xe="maxWait"in _,ae=Xe?Ti(Oa(_.maxWait)||0,p):ae,Ct="trailing"in _?!!_.trailing:Ct);function Kt(ci){var Ic=j,hh=re;return j=re=t,Ke=ci,ve=u.apply(hh,Ic),ve}function ir(ci){return Ke=ci,_e=N2(Or,p),Ge?Kt(ci):ve}function Tr(ci){var Ic=ci-ke,hh=ci-Ke,oN=p-Ic;return Xe?ws(oN,ae-hh):oN}function sr(ci){var Ic=ci-ke,hh=ci-Ke;return ke===t||Ic>=p||Ic<0||Xe&&hh>=ae}function Or(){var ci=b5();if(sr(ci))return Wr(ci);_e=N2(Or,Tr(ci))}function Wr(ci){return _e=t,Ct&&j?Kt(ci):(j=re=t,ve)}function Yo(){_e!==t&&QR(_e),Ke=0,j=ke=re=_e=t}function Hs(){return _e===t?ve:Wr(b5())}function Qo(){var ci=b5(),Ic=sr(ci);if(j=arguments,re=this,ke=ci,Ic){if(_e===t)return ir(ke);if(Xe)return QR(_e),_e=N2(Or,p),Kt(ke)}return _e===t&&(_e=N2(Or,p)),ve}return Qo.cancel=Yo,Qo.flush=Hs,Qo}var SQ=Nr(function(u,p){return kR(u,1,p)}),IQ=Nr(function(u,p,_){return kR(u,Oa(p)||0,_)});function TQ(u){return oh(u,V)}function _5(u,p){if(typeof u!="function"||p!=null&&typeof p!="function")throw new Ta(o);var _=function(){var j=arguments,re=p?p.apply(this,j):j[0],ae=_.cache;if(ae.has(re))return ae.get(re);var ve=u.apply(this,j);return _.cache=ae.set(re,ve)||ae,ve};return _.cache=new(_5.Cache||ih),_}_5.Cache=ih;function x5(u){if(typeof u!="function")throw new Ta(o);return function(){var p=arguments;switch(p.length){case 0:return!u.call(this);case 1:return!u.call(this,p[0]);case 2:return!u.call(this,p[0],p[1]);case 3:return!u.call(this,p[0],p[1],p[2])}return!u.apply(this,p)}}function RQ(u){return Bk(2,u)}var kQ=mZ(function(u,p){p=p.length==1&&pr(p[0])?Fn(p[0],Ko(rr())):Fn(Xi(p,1),Ko(rr()));var _=p.length;return Nr(function(j){for(var re=-1,ae=ws(j.length,_);++re=p}),S0=DR(function(){return arguments}())?DR:function(u){return ti(u)&&dn.call(u,"callee")&&!_R.call(u,"callee")},pr=He.isArray,VQ=Us?Ko(Us):XG;function yo(u){return u!=null&&A5(u.length)&&!lh(u)}function ai(u){return ti(u)&&yo(u)}function qQ(u){return u===!0||u===!1||ti(u)&&Fs(u)==W}var Dd=oG||HA,KQ=Ac?Ko(Ac):eZ;function GQ(u){return ti(u)&&u.nodeType===1&&!P2(u)}function ZQ(u){if(u==null)return!0;if(yo(u)&&(pr(u)||typeof u=="string"||typeof u.splice=="function"||Dd(u)||tg(u)||S0(u)))return!u.length;var p=vs(u);if(p==K||p==Be)return!u.size;if(k2(u))return!oA(u).length;for(var _ in u)if(dn.call(u,_))return!1;return!0}function YQ(u,p){return I2(u,p)}function QQ(u,p,_){_=typeof _=="function"?_:t;var j=_?_(u,p):t;return j===t?I2(u,p,t,_):!!j}function PA(u){if(!ti(u))return!1;var p=Fs(u);return p==D||p==S||typeof u.message=="string"&&typeof u.name=="string"&&!P2(u)}function JQ(u){return typeof u=="number"&&AR(u)}function lh(u){if(!Kn(u))return!1;var p=Fs(u);return p==G||p==z||p==k||p==Me}function Wk(u){return typeof u=="number"&&u==Cr(u)}function A5(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=C}function Kn(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function ti(u){return u!=null&&typeof u=="object"}var zk=Sa?Ko(Sa):rZ;function XQ(u,p){return u===p||sA(u,p,xA(p))}function eJ(u,p,_){return _=typeof _=="function"?_:t,sA(u,p,xA(p),_)}function tJ(u){return Vk(u)&&u!=+u}function rJ(u){if(UZ(u))throw new hr(s);return $R(u)}function nJ(u){return u===null}function iJ(u){return u==null}function Vk(u){return typeof u=="number"||ti(u)&&Fs(u)==ue}function P2(u){if(!ti(u)||Fs(u)!=we)return!1;var p=Yb(u);if(p===null)return!0;var _=dn.call(p,"constructor")&&p.constructor;return typeof _=="function"&&_ instanceof _&&qb.call(_)==eG}var OA=Tl?Ko(Tl):nZ;function sJ(u){return Wk(u)&&u>=-C&&u<=C}var qk=w2?Ko(w2):iZ;function E5(u){return typeof u=="string"||!pr(u)&&ti(u)&&Fs(u)==xe}function Zo(u){return typeof u=="symbol"||ti(u)&&Fs(u)==$e}var tg=v0?Ko(v0):sZ;function oJ(u){return u===t}function aJ(u){return ti(u)&&vs(u)==Ne}function cJ(u){return ti(u)&&Fs(u)==Ue}var lJ=p5(aA),uJ=p5(function(u,p){return u<=p});function Kk(u){if(!u)return[];if(yo(u))return E5(u)?Ec(u):vo(u);if(y2&&u[y2])return HK(u[y2]());var p=vs(u),_=p==K?Gx:p==Be?Wb:rg;return _(u)}function uh(u){if(!u)return u===0?u:0;if(u=Oa(u),u===E||u===-E){var p=u<0?-1:1;return p*B}return u===u?u:0}function Cr(u){var p=uh(u),_=p%1;return p===p?_?p-_:p:0}function Gk(u){return u?x0(Cr(u),0,w):0}function Oa(u){if(typeof u=="number")return u;if(Zo(u))return R;if(Kn(u)){var p=typeof u.valueOf=="function"?u.valueOf():u;u=Kn(p)?p+"":p}if(typeof u!="string")return u===0?u:+u;u=fR(u);var _=Pn.test(u);return _||Mn.test(u)?fr(u.slice(2),_?2:8):Nn.test(u)?R:+u}function Zk(u){return kl(u,bo(u))}function hJ(u){return u?x0(Cr(u),-C,C):u===0?u:0}function cn(u){return u==null?"":Go(u)}var dJ=J1(function(u,p){if(k2(p)||yo(p)){kl(p,Fi(p),u);return}for(var _ in p)dn.call(p,_)&&E2(u,_,p[_])}),Yk=J1(function(u,p){kl(p,bo(p),u)}),C5=J1(function(u,p,_,j){kl(p,bo(p),u,j)}),fJ=J1(function(u,p,_,j){kl(p,Fi(p),u,j)}),pJ=ah(eA);function gJ(u,p){var _=Q1(u);return p==null?_:TR(_,p)}var mJ=Nr(function(u,p){u=En(u);var _=-1,j=p.length,re=j>2?p[2]:t;for(re&&js(p[0],p[1],re)&&(j=1);++_1),ae}),kl(u,bA(u),_),j&&(_=ka(_,f|v|y,IZ));for(var re=p.length;re--;)dA(_,p[re]);return _});function MJ(u,p){return Jk(u,x5(rr(p)))}var DJ=ah(function(u,p){return u==null?{}:cZ(u,p)});function Jk(u,p){if(u==null)return{};var _=Fn(bA(u),function(j){return[j]});return p=rr(p),WR(u,_,function(j,re){return p(j,re[0])})}function $J(u,p,_){p=Od(p,u);var j=-1,re=p.length;for(re||(re=1,u=t);++jp){var j=u;u=p,p=j}if(_||u%1||p%1){var re=ER();return ws(u+re*(p-u+xn("1e-"+((re+"").length-1))),p)}return lA(u,p)}var KJ=X1(function(u,p,_){return p=p.toLowerCase(),u+(_?tN(p):p)});function tN(u){return $A(cn(u).toLowerCase())}function rN(u){return u=cn(u),u&&u.replace(tn,BK).replace(Lx,"")}function GJ(u,p,_){u=cn(u),p=Go(p);var j=u.length;_=_===t?j:x0(Cr(_),0,j);var re=_;return _-=p.length,_>=0&&u.slice(_,re)==p}function ZJ(u){return u=cn(u),u&&ht.test(u)?u.replace(bn,LK):u}function YJ(u){return u=cn(u),u&&At.test(u)?u.replace(br,"\\$&"):u}var QJ=X1(function(u,p,_){return u+(_?"-":"")+p.toLowerCase()}),JJ=X1(function(u,p,_){return u+(_?" ":"")+p.toLowerCase()}),XJ=sk("toLowerCase");function eX(u,p,_){u=cn(u),p=Cr(p);var j=p?q1(u):0;if(!p||j>=p)return u;var re=(p-j)/2;return f5(e5(re),_)+u+f5(Xb(re),_)}function tX(u,p,_){u=cn(u),p=Cr(p);var j=p?q1(u):0;return p&&j>>0,_?(u=cn(u),u&&(typeof p=="string"||p!=null&&!OA(p))&&(p=Go(p),!p&&V1(u))?Md(Ec(u),0,_):u.split(p,_)):[]}var cX=X1(function(u,p,_){return u+(_?" ":"")+$A(p)});function lX(u,p,_){return u=cn(u),_=_==null?0:x0(Cr(_),0,u.length),p=Go(p),u.slice(_,_+p.length)==p}function uX(u,p,_){var j=se.templateSettings;_&&js(u,p,_)&&(p=t),u=cn(u),p=C5({},p,j,dk);var re=C5({},p.imports,j.imports,dk),ae=Fi(re),ve=Kx(re,ae),_e,ke,Ke=0,Ge=p.interpolate||$i,Xe="__p += '",Ct=Zx((p.escape||$i).source+"|"+Ge.source+"|"+(Ge===ft?Zt:$i).source+"|"+(p.evaluate||$i).source+"|$","g"),Kt="//# sourceURL="+(dn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ux+"]")+` +`;u.replace(Ct,function(sr,Or,Wr,Yo,Hs,Qo){return Wr||(Wr=Yo),Xe+=u.slice(Ke,Qo).replace($s,UK),Or&&(_e=!0,Xe+=`' + +__e(`+Or+`) + +'`),Hs&&(ke=!0,Xe+=`'; +`+Hs+`; +__p += '`),Wr&&(Xe+=`' + +((__t = (`+Wr+`)) == null ? '' : __t) + +'`),Ke=Qo+sr.length,sr}),Xe+=`'; +`;var ir=dn.call(p,"variable")&&p.variable;if(!ir)Xe=`with (obj) { +`+Xe+` +} +`;else if(Gt.test(ir))throw new hr(a);Xe=(ke?Xe.replace(nt,""):Xe).replace(jr,"$1").replace(jt,"$1;"),Xe="function("+(ir||"obj")+`) { +`+(ir?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(_e?", __e = _.escape":"")+(ke?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Xe+`return __p +}`;var Tr=iN(function(){return rn(ae,Kt+"return "+Xe).apply(t,ve)});if(Tr.source=Xe,PA(Tr))throw Tr;return Tr}function hX(u){return cn(u).toLowerCase()}function dX(u){return cn(u).toUpperCase()}function fX(u,p,_){if(u=cn(u),u&&(_||p===t))return fR(u);if(!u||!(p=Go(p)))return u;var j=Ec(u),re=Ec(p),ae=pR(j,re),ve=gR(j,re)+1;return Md(j,ae,ve).join("")}function pX(u,p,_){if(u=cn(u),u&&(_||p===t))return u.slice(0,wR(u)+1);if(!u||!(p=Go(p)))return u;var j=Ec(u),re=gR(j,Ec(p))+1;return Md(j,0,re).join("")}function gX(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=pR(j,Ec(p));return Md(j,re).join("")}function mX(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(V1(u)){var ve=Ec(u);ae=ve.length}if(_>=ae)return u;var _e=_-q1(j);if(_e<1)return j;var ke=ve?Md(ve,0,_e).join(""):u.slice(0,_e);if(re===t)return ke+j;if(ve&&(_e+=ke.length-_e),OA(re)){if(u.slice(_e).search(re)){var Ke,Ge=ke;for(re.global||(re=Zx(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 wX(u){return u=cn(u),u&&pt.test(u)?u.replace(Ht,qK):u}var vX=X1(function(u,p,_){return u+(_?" ":"")+p.toUpperCase()}),$A=sk("toUpperCase");function nN(u,p,_){return u=cn(u),p=_?t:p,p===t?jK(u)?ZK(u):PK(u):u.match(p)||[]}var iN=Nr(function(u,p){try{return Ui(u,t,p)}catch(_){return PA(_)?_:new hr(_)}}),yX=ah(function(u,p){return Ia(p,function(_){_=Nl(_),sh(u,_,kA(u[_],u))}),u});function bX(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=qx(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)},Rl(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,Td([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:v5,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=zb[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)})}}),Rl(Dr.prototype,function(u,p){var _=se[p];if(_){var j=_.name+"";dn.call(Y1,j)||(Y1[j]=[]),Y1[j].push({name:p,func:_})}}),Y1[h5(t,L).name]=[{name:"wrapper",func:t}],Dr.prototype.clone=wG,Dr.prototype.reverse=vG,Dr.prototype.value=yG,se.prototype.at=GY,se.prototype.chain=ZY,se.prototype.commit=YY,se.prototype.next=QY,se.prototype.plant=XY,se.prototype.reverse=eQ,se.prototype.toJSON=se.prototype.valueOf=se.prototype.value=tQ,se.prototype.first=se.prototype.head,y2&&(se.prototype[y2]=JY),se},K1=YK();oi?((oi.exports=K1)._=K1,An._=K1):Hr._=K1}).call(Y2)})(MC,MC.exports);var O4e=Object.defineProperty,M4e=Object.defineProperties,D4e=Object.getOwnPropertyDescriptors,AD=Object.getOwnPropertySymbols,$4e=Object.prototype.hasOwnProperty,B4e=Object.prototype.propertyIsEnumerable,ED=(r,e,t)=>e in r?O4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,G5=(r,e)=>{for(var t in e||(e={}))$4e.call(e,t)&&ED(r,t,e[t]);if(AD)for(var t of AD(e))B4e.call(e,t)&&ED(r,t,e[t]);return r},L4e=(r,e)=>M4e(r,D4e(e));function ml(r,e,t){var n;const i=P3(r);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${P4e}?chainId=${i.namespace}:${i.reference}&projectId=${t}`}function P1(r){return r.includes(":")?r.split(":")[1]:r}function SW(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function U4e(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 c7(r={},e={}){const t=CD(r),n=CD(e);return MC.exports.merge(t,n)}function CD(r){var e,t,n,i;const s={};if(!zv(r))return s;for(const[o,a]of Object.entries(r)){const c=dT(o)?[o]:a.chains,l=a.methods||[],h=a.events||[],f=a.rpcMap||{},v=c3(o);s[v]=L4e(G5(G5({},s[v]),a),{chains:R4(c,(e=s[v])==null?void 0:e.chains),methods:R4(l,(t=s[v])==null?void 0:t.methods),events:R4(h,(n=s[v])==null?void 0:n.events),rpcMap:G5(G5({},f),(i=s[v])==null?void 0:i.rpcMap)})}return s}function F4e(r){return r.includes(":")?r.split(":")[2]:r}function SD(r){const e={};for(const[t,n]of Object.entries(r)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=dT(t)?[t]:n.chains?n.chains:SW(n.accounts);e[t]={chains:a,methods:i,events:s,accounts:o}}return e}function l7(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 IW={},hn=r=>IW[r],u7=(r,e)=>{IW[r]=e};class j4e{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(El.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=P1(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}var H4e=Object.defineProperty,W4e=Object.defineProperties,z4e=Object.getOwnPropertyDescriptors,ID=Object.getOwnPropertySymbols,V4e=Object.prototype.hasOwnProperty,q4e=Object.prototype.propertyIsEnumerable,TD=(r,e,t)=>e in r?H4e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,RD=(r,e)=>{for(var t in e||(e={}))V4e.call(e,t)&&TD(r,t,e[t]);if(ID)for(var t of ID(e))q4e.call(e,t)&&TD(r,t,e[t]);return r},kD=(r,e)=>W4e(r,z4e(e));class K4e{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(El.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||ml(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(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(P1(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:kD(RD({},o.sessionProperties||{}),{capabilities:kD(RD({},a||{}),{[s]:c})})})}catch(l){console.warn("Failed to update session with capabilities",l)}return c}}class G4e{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(El.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=P1(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}class Z4e{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(El.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=P1(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}class Y4e{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||ml(`${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(El.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||ml(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Al(new Ju(n,hn("disableProviderPing")))}}class Q4e{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(El.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=P1(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 Al(new Ju(n,hn("disableProviderPing")))}}class J4e{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(El.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=P1(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}class X4e{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(El.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=P1(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}class e6e{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||ml(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(El.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||ml(e,this.namespace);return typeof n>"u"?void 0:new Al(new Ju(n,hn("disableProviderPing")))}}class t6e{constructor(e){this.name=Sg,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(El.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=P3(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||ml(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Al(new Ju(n,hn("disableProviderPing")))}}var r6e=Object.defineProperty,n6e=Object.defineProperties,i6e=Object.getOwnPropertyDescriptors,ND=Object.getOwnPropertySymbols,s6e=Object.prototype.hasOwnProperty,o6e=Object.prototype.propertyIsEnumerable,PD=(r,e,t)=>e in r?r6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Z5=(r,e)=>{for(var t in e||(e={}))s6e.call(e,t)&&PD(r,t,e[t]);if(ND)for(var t of ND(e))o6e.call(e,t)&&PD(r,t,e[t]);return r},h7=(r,e)=>n6e(r,i6e(e));let a6e=class TW{constructor(e){this.events=new YI,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:Cy(Ty({level:(e==null?void 0:e.logger)||_D})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new TW(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:Z5({},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,j_(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=SD(this.session.namespaces);this.namespaces=c7(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=SD(s.namespaces);this.namespaces=c7(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==EW)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===Sg?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(ju(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 b4e.init({logger:this.providerOpts.logger||_D,relayUrl:this.providerOpts.relayUrl||R4e,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=>c3(t)))];u7("client",this.client),u7("events",this.events),u7("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const n=U4e(t,this.session),i=SW(n),s=c7(this.namespaces,this.optionalNamespaces),o=h7(Z5({},s[t]),{accounts:n,chains:i});switch(t){case"eip155":this.rpcProviders[t]=new K4e({namespace:o});break;case"algorand":this.rpcProviders[t]=new Y4e({namespace:o});break;case"solana":this.rpcProviders[t]=new G4e({namespace:o});break;case"cosmos":this.rpcProviders[t]=new Z4e({namespace:o});break;case"polkadot":this.rpcProviders[t]=new j4e({namespace:o});break;case"cip34":this.rpcProviders[t]=new Q4e({namespace:o});break;case"elrond":this.rpcProviders[t]=new J4e({namespace:o});break;case"multiversx":this.rpcProviders[t]=new X4e({namespace:o});break;case"near":this.rpcProviders[t]=new e6e({namespace:o});break;default:this.rpcProviders[Sg]?this.rpcProviders[Sg].updateNamespace(o):this.rpcProviders[Sg]=new t6e({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&&ju(i)&&this.events.emit("accountsChanged",i.map(F4e))}else if(n.name==="chainChanged"){const i=t.chainId,s=t.event.data,o=c3(i),a=l7(i)!==l7(s)?`${o}:${l7(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=h7(Z5({},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",h7(Z5({},pn("USER_DISCONNECTED")),{data:e.topic}))}),this.on(El.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Sg]}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=>c3(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=c3(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(`${xD}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${xD}/${e}`)}};const c6e=a6e,l6e="wc",u6e="ethereum_provider",h6e=`${l6e}@2:${u6e}:`,d6e="https://rpc.walletconnect.com/v1/",DC=["eth_sendTransaction","personal_sign"],RW=["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"],$C=["chainChanged","accountsChanged"],f6e=["chainChanged","accountsChanged","message","disconnect","connect"];var p6e=Object.defineProperty,g6e=Object.defineProperties,m6e=Object.getOwnPropertyDescriptors,OD=Object.getOwnPropertySymbols,w6e=Object.prototype.hasOwnProperty,v6e=Object.prototype.propertyIsEnumerable,MD=(r,e,t)=>e in r?p6e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ig=(r,e)=>{for(var t in e||(e={}))w6e.call(e,t)&&MD(r,t,e[t]);if(OD)for(var t of OD(e))v6e.call(e,t)&&MD(r,t,e[t]);return r},d7=(r,e)=>g6e(r,m6e(e));function f8(r){return Number(r[0].split(":")[1])}function Y5(r){return`0x${r.toString(16)}`}function y6e(r){const{chains:e,optionalChains:t,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=r;if(!ju(e))throw new Error("Invalid chains");const c={chains:e,methods:n||DC,events:s||$C,rpcMap:Ig({},e.length?{[f8(e)]:a[f8(e)]}:{})},l=s==null?void 0:s.filter(y=>!$C.includes(y)),h=n==null?void 0:n.filter(y=>!DC.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:RW))],events:[...new Set(c.events.concat(o!=null&&o.length?o:f6e))],rpcMap:a};return{required:e.length?c:void 0,optional:t.length?v:void 0}}let b6e=class kW{constructor(){this.events=new mo.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=h6e,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 kW;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}=y6e(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(d7(Ig({namespaces:Ig({},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=zO(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Y5(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(d7(Ig({},e),{chains:this.rpc.chains})).then(a=>{i(a)}).catch(a=>{s(new Error(a.message))})}),n=t.session;if(n){const i=zO(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Y5(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",Y5(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",d7(Ig({},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",Y5(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)||DC:[],c=i.length?(e==null?void 0:e.events)||$C:[],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?f8(this.rpc.chains):f8(this.rpc.optionalChains),this.signer=await c6e.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-CZ6iaunK.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(Ig({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&&ju(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&&ju(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])||`${d6e}?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 NW=":";function _6e(r){const{namespace:e,reference:t}=r;return[e,t].join(NW)}function x6e(r){const[e,t,n]=r.split(NW);return{namespace:e,reference:t,address:n}}function A6e(r,e){const t=[];return r.forEach(n=>{const i=e(n);t.includes(i)||t.push(i)}),t}function E6e(r){const{namespace:e,reference:t}=x6e(r);return _6e({namespace:e,reference:t})}function C6e(r){return A6e(r,E6e)}var PW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S6e(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 I6e={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=PW: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 LD=R6e();var BC;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(BC||(BC={}));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 UD="0123456789abcdef";let Lo=class Ni{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();L4[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(BD>L4[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($D)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+=UD[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){LD&&this.throwError("platform missing String.prototype.normalize",Ni.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:LD})}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 f7||(f7=new Ni(T6e)),f7}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),DD){if(!e)return;this.globalLogger().throwError("error censorship permanent",Ni.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}$D=!!e,DD=!!t}static setLogLevel(e){const t=L4[e.toLowerCase()];if(t==null){Ni.globalLogger().warn("invalid log level - "+e);return}BD=t}static from(e){return new Ni(e)}};Lo.errors=Fc,Lo.levels=BC;const k6e="bytes/5.7.0",Df=new Lo(k6e);function OW(r){return!!r.toHexString}function U4(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return U4(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function FD(r){return typeof r=="number"&&r==r&&r%1===0}function sb(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!FD(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function MW(r,e){if(e||(e={}),typeof r=="number"){Df.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),U4(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),OW(r)&&(r=r.toHexString()),Rw(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Df.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i>4]+p7[i&15]}return t}return Df.throwArgumentError("invalid hexlify value","value",r)}function p8(r,e){for(typeof r!="string"?r=DW(r):Rw(r)||Df.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Df.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}var $W={exports:{}},N6e={},P6e=Object.freeze({__proto__:null,default:N6e}),O6e=S6e(P6e);(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=O6e.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,PW)})($W);var wr=$W.exports;const BW="bignumber/5.7.0";var LC=wr.BN;const Sh=new Lo(BW),g7={},jD=9007199254740991;function M6e(r){return r!=null&&(fo.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||Rw(r)||typeof r=="bigint"||sb(r))}let HD=!1,fo=class Mc{constructor(e,t){e!==g7&&Sh.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 Sh.throwError("this platform does not support BigInt",Lo.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?HD||(HD=!0,Sh.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Sh.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Lo.errors.UNEXPECTED_ARGUMENT,{}):Sh.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(g7,Vv(e)):e.match(/^-?[0-9]+$/)?new Mc(g7,Vv(new LC(e))):Sh.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&ja("underflow","BigNumber.from",e),(e>=jD||e<=-jD)&&ja("overflow","BigNumber.from",e),Mc.from(String(e));const t=e;if(typeof t=="bigint")return Mc.from(t.toString());if(sb(t))return Mc.from(DW(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"&&(Rw(n)||n[0]==="-"&&Rw(n.substring(1))))return Mc.from(n)}return Sh.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Vv(r){if(typeof r!="string")return Vv(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&Sh.throwArgumentError("invalid hex","value",r),r=Vv(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(Vv(r))}function Br(r){const e=fo.from(r).toHexString();return e[0]==="-"?new LC("-"+e.substring(3),16):new LC(e.substring(2),16)}function ja(r,e,t){const n={fault:r,operation:e};return t!=null&&(n.value=t),Sh.throwError(r,Lo.errors.NUMERIC_FAULT,n)}const Js=new Lo(BW),$3={},LW=fo.from(0),UW=fo.from(-1);function FW(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 B3="0";for(;B3.length<256;)B3+=B3;function bT(r){if(typeof r!="number")try{r=fo.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+B3.substring(0,r):Js.throwArgumentError("invalid decimal size","decimals",r)}function m7(r,e){e==null&&(e=0);const t=bT(e);r=fo.from(r);const n=r.lt(LW);n&&(r=r.mul(UW));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&&FW("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 rm($3,t,n,i)}}class ss{constructor(e,t,n,i){e!==$3&&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=bh(this._value,this.format.decimals),n=bh(e._value,e.format.decimals);return ss.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=bh(this._value,this.format.decimals),n=bh(e._value,e.format.decimals);return ss.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=bh(this._value,this.format.decimals),n=bh(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=bh(this._value,this.format.decimals),n=bh(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(WD.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(WD.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"+B3.substring(0,e),this.format),i=D6e.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 p8(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&&!M6e(t)&&(n=t,t=null),t==null&&(t=0),n==null&&(n="fixed"),ss.fromString(m7(e,t),rm.from(n))}static fromString(e,t){t==null&&(t="fixed");const n=rm.from(t),i=bh(e,n.decimals);!n.signed&&i.lt(LW)&&FW("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=p8(s,n.width/8));const o=m7(i,n.decimals);return new ss($3,s,o,n)}static fromBytes(e,t){t==null&&(t="fixed");const n=rm.from(t);if(MW(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=m7(i,n.decimals);return new ss($3,s,o,n)}static from(e,t){if(typeof e=="string")return ss.fromString(e,t);if(sb(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 WD=ss.from(1),D6e=ss.from("0.5");var zD;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(zD||(zD={}));var VD;(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"})(VD||(VD={}));function $6e(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 qD(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}})}qD("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)),w7("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"),w7("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"),w7("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",$6e),qD("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 B6e(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 L6e(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 F6e(r){let e=0;return()=>r[e++]}function j6e(r){return F6e(U6e(r))}function H6e(r){return r&1?~r>>1:r>>1}function W6e(r,e){let t=Array(r);for(let n=0;ne[o]):t}function V6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(K6e(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(G6e(t,r))}return L6e(jW(e))}function q6e(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function HW(r,e,t){let n=Array(r).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function K6e(r,e){let t=1+e(),n=e(),i=q6e(e),s=HW(i.length,1+r,e);return jW(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 G6e(r,e){let t=1+e();return HW(t,1+r,e).map(n=>[n[0],n.slice(1)])}function Z6e(r){let e=g8(r).sort((n,i)=>n-i);return t();function t(){let n=[];for(;;){let l=g8(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 Y6e(){return j6e(B6e("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Q5=Y6e();new Set(g8(Q5)),new Set(g8(Q5)),V6e(Q5),Z6e(Q5);const Q6e=new Uint8Array(32);Q6e.fill(0);const J6e=new Uint8Array(32);J6e.fill(0),fo.from(-1);const X6e=fo.from(0),e8e=fo.from(1);fo.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),p8(e8e.toHexString(),32),p8(X6e.toHexString(),32);var zl={},Fr={},ob=WW;function WW(r,e){if(!r)throw new Error(e||"Assertion failed")}WW.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var UC={exports:{}};typeof Object.create=="function"?UC.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:UC.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 t8e=ob,r8e=UC.exports;Fr.inherits=r8e;function n8e(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function i8e(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):n8e(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=zW;function o8e(r,e){for(var t="",n=0;n>>0}return s}Fr.join32=a8e;function c8e(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=c8e;function l8e(r,e){return r>>>e|r<<32-e}Fr.rotr32=l8e;function u8e(r,e){return r<>>32-e}Fr.rotl32=u8e;function h8e(r,e){return r+e>>>0}Fr.sum32=h8e;function d8e(r,e,t){return r+e+t>>>0}Fr.sum32_3=d8e;function f8e(r,e,t,n){return r+e+t+n>>>0}Fr.sum32_4=f8e;function p8e(r,e,t,n,i){return r+e+t+n+i>>>0}Fr.sum32_5=p8e;function g8e(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=g8e;function m8e(r,e,t,n){var i=e+n>>>0,s=(i>>0}Fr.sum64_hi=m8e;function w8e(r,e,t,n){var i=e+n;return i>>>0}Fr.sum64_lo=w8e;function v8e(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=v8e;function y8e(r,e,t,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Fr.sum64_4_lo=y8e;function b8e(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=b8e;function _8e(r,e,t,n,i,s,o,a,c,l){var h=e+n+s+a+l;return h>>>0}Fr.sum64_5_lo=_8e;function x8e(r,e,t){var n=e<<32-t|r>>>t;return n>>>0}Fr.rotr64_hi=x8e;function A8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.rotr64_lo=A8e;function E8e(r,e,t){return r>>>t}Fr.shr64_hi=E8e;function C8e(r,e,t){var n=r<<32-t|e>>>t;return n>>>0}Fr.shr64_lo=C8e;var a2={},GD=Fr,S8e=ob;function J5(){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}a2.BlockHash=J5,J5.prototype.update=function(r,e){if(r=GD.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=GD.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}Xu.g0_256=N8e;function P8e(r){return _u(r,17)^_u(r,19)^r>>>10}Xu.g1_256=P8e;var kw=Fr,O8e=a2,M8e=Xu,v7=kw.rotl32,Q2=kw.sum32,D8e=kw.sum32_5,$8e=M8e.ft_1,YW=O8e.BlockHash,B8e=[1518500249,1859775393,2400959708,3395469782];function ou(){if(!(this instanceof ou))return new ou;YW.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}kw.inherits(ou,YW);var L8e=ou;ou.blockSize=512,ou.outSize=160,ou.hmacStrength=80,ou.padLength=64,ou.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()),C_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}),e4=ya.getNAF,T_e=ya.getJSF,m8=ya.assert;function of(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 O1=of;of.prototype.point=function(){throw new Error("Not implemented")},of.prototype.validate=function(){throw new Error("Not implemented")},of.prototype._fixedNafMul=function(r,e){m8(r.precomputed);var t=r._getDoubles(),n=e4(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];m8(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},of.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]=e4(t[y],s[y],this._bitLength),a[A]=e4(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=T_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){O1.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}xT(rs,O1.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 F4=l2(function(r,e){var t=e;t.base=O1,t.short=k_e,t.mont=null,t.edwards=null}),j4=l2(function(r,e){var t=e,n=ya.assert;function i(a){a.type==="short"?this.curve=new F4.short(a):a.type==="edwards"?this.curve=new F4.edwards(a):this.curve=new F4.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:zl.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:zl.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:zl.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:zl.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:zl.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:zl.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:zl.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:zl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function af(r){if(!(this instanceof af))return new af(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=rl.toArray(r.entropy,r.entropyEnc||"hex"),t=rl.toArray(r.nonce,r.nonceEnc||"hex"),n=rl.toArray(r.pers,r.persEnc||"hex");_T(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,n)}var JD=af;af.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},af.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=rl.toArray(t,n||"hex"),this._update(t));for(var i=[];i.length"};var N_e=ya.assert;function q_(r,e){if(r instanceof q_)return r;this._importDER(r,e)||(N_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 t4=q_;function P_e(){this.place=0}function A7(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 XD(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)}q_.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=XD(e),t=XD(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var n=[2];E7(n,e.length),n=n.concat(e),n.push(2),E7(n,t.length);var i=n.concat(t),s=[48];return E7(s,i.length),s=s.concat(i),ya.encode(s,r)};var O_e=function(){throw new Error("unsupported")},cz=ya.assert;function Xa(r){if(!(this instanceof Xa))return new Xa(r);typeof r=="string"&&(cz(Object.prototype.hasOwnProperty.call(j4,r),"Unknown curve "+r),r=j4[r]),r instanceof j4.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 M_e=Xa;Xa.prototype.keyPair=function(r){return new x7(this,r)},Xa.prototype.keyFromPrivate=function(r,e){return x7.fromPrivate(this,r,e)},Xa.prototype.keyFromPublic=function(r,e){return x7.fromPublic(this,r,e)},Xa.prototype.genKeyPair=function(r){r||(r={});for(var e=new JD({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||O_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 JD({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 t4({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 t4(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){cz((3&t)===t,"The recovery param is more than two bits"),e=new t4(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 t4(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 D_e=l2(function(r,e){var t=e;t.version="6.5.4",t.utils=ya,t.rand=function(){throw new Error("unsupported")},t.curve=F4,t.curves=j4,t.ec=M_e,t.eddsa=null});D_e.ec;var e$;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(e$||(e$={}));const $_e="6.13.2";function B_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&&B_e(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function Og(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(Og).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 Og(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=>`${Og(t)}: ${Og(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ks(r,e){return r&&r.code===e}function AT(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: ${Og(t)}`);for(const o in t){if(o==="shortMessage")continue;const a=t[o];s.push(o+"="+Og(a))}}s.push(`code=${e}`),s.push(`version=${$_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 lz(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 ab(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 uz(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]+t$[i&15]}return t}function vi(r){return"0x"+r.map(e=>Ft(e).substring(2)).join("")}function im(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 hz(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 o1(r,e){return hz(r,e,!0)}function L_e(r,e){return hz(r,e,!1)}const K_=BigInt(0),Xc=BigInt(1),Mg=9007199254740991;function w8(r,e){const t=G_(r,"value"),n=BigInt(Sr(e,"width"));if(Ze(t>>n===K_,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Xc){const i=(Xc<=-Mg&&r<=Mg,"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 G_(r,e){const t=qt(r,e);return Ze(t>=K_,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}const r$="0123456789abcdef";function Z_(r){if(r instanceof Uint8Array){let e="0x0";for(const t of r)e+=r$[t>>4],e+=r$[t&15];return BigInt(e)}return qt(r)}function Sr(r,e){switch(typeof r){case"bigint":return Ae(r>=-Mg&&r<=Mg,"overflow",e||"value",r),Number(r);case"number":return Ae(Number.isInteger(r),"underflow",e||"value",r),Ae(r>=-Mg&&r<=Mg,"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 U_e(r){return Sr(Z_(r))}function Gf(r,e){let n=G_(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 z_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),pz(r,e,t))}const V_e=Object.freeze({error:W_e,ignore:pz,replace:z_e});function q_e(r,e){e==null&&(e=V_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 Eu(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 K_e(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function v8(r,e){return K_e(q_e(r,e))}function gz(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 G_e=12,Z_e=250;let s$=gz();const Y_e=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Q_e=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let C7=!1;async function mz(r,e){try{const t=r.match(Y_e);if(!t)throw new Error("invalid data");return new $f(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?j_e(t[3]):X_e(t[3]))}catch{return new $f(599,"BAD REQUEST (invalid data: URI)",{},null,new Hu(r))}}function wz(r){async function e(t,n){try{const i=t.match(Q_e);if(!i)throw new Error("invalid link");return new Hu(`${r}${i[2]}`)}catch{return new $f(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Hu(t))}}return e}const r4={data:mz,ipfs:wz("https://gateway.ipfs.io/ipfs/")},vz=new WeakMap;var rp,cf;class J_e{constructor(e){Le(this,rp);Le(this,cf);de(this,rp,[]),de(this,cf,!1),vz.set(e,()=>{if(!ee(this,cf)){de(this,cf,!0);for(const t of ee(this,rp))setTimeout(()=>{t()},0);de(this,rp,[])}})}addListener(e){Ze(!ee(this,cf),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),ee(this,rp).push(e)}get cancelled(){return ee(this,cf)}checkSignal(){Ze(!this.cancelled,"cancelled","CANCELLED",{})}}rp=new WeakMap,cf=new WeakMap;function n4(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var dm,fm,Hc,Ph,pm,gm,Yi,ta,Oh,np,ip,sp,Gl,Wc,lf,op,u3;const $8=class $8{constructor(e){Le(this,op);Le(this,dm);Le(this,fm);Le(this,Hc);Le(this,Ph);Le(this,pm);Le(this,gm);Le(this,Yi);Le(this,ta);Le(this,Oh);Le(this,np);Le(this,ip);Le(this,sp);Le(this,Gl);Le(this,Wc);Le(this,lf);de(this,gm,String(e)),de(this,dm,!1),de(this,fm,!0),de(this,Hc,{}),de(this,Ph,""),de(this,pm,3e5),de(this,Wc,{slotInterval:Z_e,maxAttempts:G_e}),de(this,lf,null)}get url(){return ee(this,gm)}set url(e){de(this,gm,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,Eu(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,Eu(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,Ph)?ee(this,Ph):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),de(this,Ph,String(e).toUpperCase())}get headers(){const e=Object.assign({},ee(this,Hc));return ee(this,Oh)&&(e.authorization=`Basic ${H_e(Eu(ee(this,Oh)))}`),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,pm,e)}get preflightFunc(){return ee(this,np)||null}set preflightFunc(e){de(this,np,e)}get processFunc(){return ee(this,ip)||null}set processFunc(e){de(this,ip,e)}get retryFunc(){return ee(this,sp)||null}set retryFunc(e){de(this,sp,e)}get getUrlFunc(){return ee(this,lf)||s$}set getUrlFunc(e){de(this,lf,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,Gl)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),de(this,Gl,new J_e(this)),rt(this,op,u3).call(this,0,o$()+this.timeout,0,this,new $f(0,"",{},null,this))}cancel(){Ze(ee(this,Gl)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=vz.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 $8(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 $8(this.url);return de(e,Ph,ee(this,Ph)),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,Oh,ee(this,Oh)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),de(e,np,ee(this,np)),de(e,ip,ee(this,ip)),de(e,sp,ee(this,sp)),de(e,Wc,Object.assign({},ee(this,Wc))),de(e,lf,ee(this,lf)),e}static lockConfig(){C7=!0}static getGateway(e){return r4[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(C7)throw new Error("gateways locked");r4[e]=t}static registerGetUrl(e){if(C7)throw new Error("gateways locked");s$=e}static createGetUrlFunc(e){return gz()}static createDataGateway(){return mz}static createIpfsGatewayFunc(e){return wz(e)}};dm=new WeakMap,fm=new WeakMap,Hc=new WeakMap,Ph=new WeakMap,pm=new WeakMap,gm=new WeakMap,Yi=new WeakMap,ta=new WeakMap,Oh=new WeakMap,np=new WeakMap,ip=new WeakMap,sp=new WeakMap,Gl=new WeakMap,Wc=new WeakMap,lf=new WeakMap,op=new WeakSet,u3=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(o$()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await exe(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in r4){const y=await r4[a](o.url,n4(ee(i,Gl)));if(y instanceof $f){let A=y;if(this.processFunc){n4(ee(i,Gl));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,n4(ee(i,Gl)));let l=new $f(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),op,u3).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(),op,u3).call(f,e+1,t,A,i,l)}if(this.processFunc){n4(ee(i,Gl));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(),op,u3).call(v,e+1,t,A,i,l)}}return l};let Hu=$8;var sy,oy,ay,ra,mm,ap;const sR=class sR{constructor(e,t,n,i,s){Le(this,sy);Le(this,oy);Le(this,ay);Le(this,ra);Le(this,mm);Le(this,ap);de(this,sy,e),de(this,oy,t),de(this,ay,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),de(this,ra,i==null?null:new Uint8Array(i)),de(this,mm,s||null),de(this,ap,{message:""})}toString(){return``}get statusCode(){return ee(this,sy)}get statusMessage(){return ee(this,oy)}get headers(){return Object.assign({},ee(this,ay))}get body(){return ee(this,ra)==null?null:new Uint8Array(ee(this,ra))}get bodyText(){try{return ee(this,ra)==null?"":v8(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,mm)}ok(){return ee(this,ap).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=ee(this,ap);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=v8(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}`}})}};sy=new WeakMap,oy=new WeakMap,ay=new WeakMap,ra=new WeakMap,mm=new WeakMap,ap=new WeakMap;let $f=sR;function o$(){return new Date().getTime()}function X_e(r){return Eu(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function exe(r){return new Promise(e=>setTimeout(e,r))}const txe=BigInt(-1),Bc=BigInt(0),$g=BigInt(1),rxe=BigInt(5),ug={};let sm="0000";for(;sm.length<80;)sm+=sm;function D0(r){let e=sm;for(;e.length=-i&&rBc?r=w8(J0(r,n),n):r=-w8(J0(-r,n),n)}else{const i=$g<=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 nxe(r,e){let t="";r0?n*=D0(i):i<0&&(t*=D0(-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)-$g),e=ee(this,wn)/ee(this,Vs)*ee(this,Vs),rt(this,ln,Ah).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,n=rxe*D0(t-1);let i=this.value+n;const s=D0(t);return i=i/s*s,X2(i,ee(this,zc),"round"),new Xd(ug,i,ee(this,zc))}isZero(){return ee(this,wn)===Bc}isNegative(){return ee(this,wn)0){const c=D0(a);Ze(o%c===Bc,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=D0(-a));return X2(o,s,"fromValue"),new Xd(ug,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=S7(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=a$(r,e+1,n);return t(e+1+n+i),c$(r,e,e+1+n,n+i)}else if(r[e]>=192){const n=r[e]-192;return t(e+1+n),c$(r,e,e+1,n)}else if(r[e]>=184){const n=r[e]-183;t(e+1+n);const i=a$(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:ixe(r[e])}}function Y_(r){const e=Zr(r,"data"),t=yz(e,0);return Ae(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function l$(r){const e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function bz(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(bz(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=l$(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=l$(e.length);return t.unshift(183+t.length),t.concat(e)}const u$="0123456789abcdef";function a1(r){let e="0x";for(const t of bz(r))e+=u$[t>>4],e+=u$[t&15];return e}const _z=["wei","kwei","mwei","gwei","szabo","finney","ether"];function xz(r,e){let t=18;if(typeof e=="string"){const n=_z.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return y8.fromValue(r,t,{decimals:t,width:512}).toString()}function sxe(r,e){Ae(typeof r=="string","value must be a string","value",r);let t=18;if(typeof e=="string"){const n=_z.indexOf(e);Ae(n>=0,"invalid unit","unit",e),t=3*n}else e!=null&&(t=Sr(e,"unit"));return y8.fromString(r,{decimals:t,width:512}).value}function oxe(r){return xz(r,18)}const ro=32,qC=new Uint8Array(ro),axe=["then"],i4={},Az=new WeakMap;function F0(r){return Az.get(r)}function h$(r,e){Az.set(r,e)}function e3(r,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}function KC(r,e,t){return r.indexOf(null)>=0?e.map((n,i)=>n instanceof Pw?KC(F0(n),n,t):n):r.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(t&&o instanceof Pw&&(o=KC(F0(o),o,t)),n[i]=o),n},{})}var wm;const Lg=class Lg extends Array{constructor(...t){const n=t[0];let i=t[1],s=(t[2]||[]).slice(),o=!0;n!==i4&&(i=t,s=[],o=!1);super(i.length);Le(this,wm);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(h$(this,Object.freeze(i.map((l,h)=>{const f=s[h];return f!=null&&a.get(f)===1?f:null}))),de(this,wm,[]),ee(this,wm)==null&&ee(this,wm),!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&&e3(`index ${y}`,A),A}if(axe.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 h$(c,F0(this)),c}toArray(t){const n=[];return this.forEach((i,s)=>{i instanceof Error&&e3(`index ${s}`,i),t&&i instanceof Lg&&(i=i.toArray(t)),n.push(i)}),n}toObject(t){const n=F0(this);return n.reduce((i,s,o)=>(Ze(s!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),KC(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=F0(this),s=[],o=[];for(let a=t;a{ee(this,Mh)[e]=d$(t)}}}Mh=new WeakMap,cp=new WeakMap,vm=new WeakSet,H4=function(e){return ee(this,Mh).push(e),de(this,cp,ee(this,cp)+e.length),e.length};var Ro,na,lp,up,uf,f1,YC,Ez;const oR=class oR{constructor(e,t,n){Le(this,f1);Oe(this,"allowLoose");Le(this,Ro);Le(this,na);Le(this,lp);Le(this,up);Le(this,uf);tr(this,{allowLoose:!!t}),de(this,Ro,Xs(e)),de(this,lp,0),de(this,up,null),de(this,uf,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 oR(ee(this,Ro).slice(ee(this,na)+e),this.allowLoose,ee(this,uf));return de(t,up,this),t}readBytes(e,t){let n=rt(this,f1,Ez).call(this,0,e,!!t);return rt(this,f1,YC).call(this,e),de(this,na,ee(this,na)+n.length),n.slice(0,e)}readValue(){return Z_(this.readBytes(ro))}readIndex(){return U_e(this.readBytes(ro))}};Ro=new WeakMap,na=new WeakMap,lp=new WeakMap,up=new WeakMap,uf=new WeakMap,f1=new WeakSet,YC=function(e){var t;if(ee(this,up))return rt(t=ee(this,up),f1,YC).call(t,e);de(this,lp,ee(this,lp)+e),Ze(ee(this,uf)<1||ee(this,lp)<=ee(this,uf)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${ee(this,uf)} ( 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,lp),dataLength:this.dataLength}})},Ez=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 ZC=oR;function b8(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function CT(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 cxe(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");b8(r.outputLen),b8(r.blockLen)}function Ow(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 Cz(r,e){CT(r);const t=e.outputLen;if(r.lengthr instanceof Uint8Array,lxe=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),T7=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),Bl=(r,e)=>r<<32-e|r>>>e,uxe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!uxe)throw new Error("Non little-endian hardware is not supported");function hxe(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function Q_(r){if(typeof r=="string"&&(r=hxe(r)),!Sz(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}function dxe(...r){const e=new Uint8Array(r.reduce((n,i)=>n+i.length,0));let t=0;return r.forEach(n=>{if(!Sz(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}let ST=class{clone(){return this._cloneInto()}};function IT(r){const e=n=>r().update(Q_(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function fxe(r=32){if(I7&&typeof I7.getRandomValues=="function")return I7.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}class Iz extends ST{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,cxe(e);const n=Q_(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 Iz(r,e).update(t).digest();Tz.create=(r,e)=>new Iz(r,e);function pxe(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 Rz extends ST{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=T7(this.buffer)}update(e){Ow(this);const{view:t,buffer:n,blockLen:i}=this;e=Q_(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,mxe=(r,e,t)=>r&e^r&t^e&t,wxe=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]),jd=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Hd=new Uint32Array(64);class vxe extends Rz{constructor(){super(64,32,8,!1),this.A=jd[0]|0,this.B=jd[1]|0,this.C=jd[2]|0,this.D=jd[3]|0,this.E=jd[4]|0,this.F=jd[5]|0,this.G=jd[6]|0,this.H=jd[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)Hd[f]=e.getUint32(t,!1);for(let f=16;f<64;f++){const v=Hd[f-15],y=Hd[f-2],A=Bl(v,7)^Bl(v,18)^v>>>3,M=Bl(y,17)^Bl(y,19)^y>>>10;Hd[f]=M+Hd[f-7]+A+Hd[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=Bl(a,6)^Bl(a,11)^Bl(a,25),y=h+v+gxe(a,c,l)+wxe[f]+Hd[f]|0,M=(Bl(n,2)^Bl(n,13)^Bl(n,22))+mxe(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(){Hd.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const kz=IT(()=>new vxe),s4=BigInt(2**32-1),QC=BigInt(32);function Nz(r,e=!1){return e?{h:Number(r&s4),l:Number(r>>QC&s4)}:{h:Number(r>>QC&s4)|0,l:Number(r&s4)|0}}function Pz(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;iBigInt(r>>>0)<>>0),bxe=(r,e,t)=>r>>>t,_xe=(r,e,t)=>r<<32-t|e>>>t,xxe=(r,e,t)=>r>>>t|e<<32-t,Axe=(r,e,t)=>r<<32-t|e>>>t,Exe=(r,e,t)=>r<<64-t|e>>>t-32,Cxe=(r,e,t)=>r>>>t-32|e<<64-t,Sxe=(r,e)=>e,Ixe=(r,e)=>r,Oz=(r,e,t)=>r<>>32-t,Mz=(r,e,t)=>e<>>32-t,Dz=(r,e,t)=>e<>>64-t,$z=(r,e,t)=>r<>>64-t;function Txe(r,e,t,n){const i=(e>>>0)+(n>>>0);return{h:r+t+(i/2**32|0)|0,l:i|0}}const Rxe=(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),kxe=(r,e,t,n)=>e+t+n+(r/2**32|0)|0,Nxe=(r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),Pxe=(r,e,t,n,i)=>e+t+n+i+(r/2**32|0)|0,Oxe=(r,e,t,n,i)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0),Mxe=(r,e,t,n,i,s)=>e+t+n+i+s+(r/2**32|0)|0,Rr={fromBig:Nz,split:Pz,toBig:yxe,shrSH:bxe,shrSL:_xe,rotrSH:xxe,rotrSL:Axe,rotrBH:Exe,rotrBL:Cxe,rotr32H:Sxe,rotr32L:Ixe,rotlSH:Oz,rotlSL:Mz,rotlBH:Dz,rotlBL:$z,add:Txe,add3L:Rxe,add3H:kxe,add4L:Nxe,add4H:Pxe,add5H:Mxe,add5L:Oxe},[Dxe,$xe]=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))),Wd=new Uint32Array(80),zd=new Uint32Array(80);let Bxe=class extends Rz{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)Wd[H]=e.getUint32(t),zd[H]=e.getUint32(t+=4);for(let H=16;H<80;H++){const F=Wd[H-15]|0,q=zd[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=Wd[H-2]|0,V=zd[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,zd[H-7],zd[H-16]),d=Rr.add4H(oe,Y,Q,Wd[H-7],Wd[H-16]);Wd[H]=d|0,zd[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,$xe[H],zd[H]),V=Rr.add5H(T,L,F,Y,Dxe[H],Wd[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(){Wd.fill(0),zd.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 Lxe=IT(()=>new Bxe);function Uxe(){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 f$=Uxe();f$.crypto||f$.msCrypto;function Fxe(r){switch(r){case"sha256":return kz.create();case"sha512":return Lxe.create()}Ae(!1,"invalid hashing algorithm name","algorithm",r)}const[Bz,Lz,Uz]=[[],[],[]],jxe=BigInt(0),t3=BigInt(1),Hxe=BigInt(2),Wxe=BigInt(7),zxe=BigInt(256),Vxe=BigInt(113);for(let r=0,e=t3,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],Bz.push(2*(5*n+t)),Lz.push((r+1)*(r+2)/2%64);let i=jxe;for(let s=0;s<7;s++)e=(e<>Wxe)*Vxe)%zxe,e&Hxe&&(i^=t3<<(t3<t>32?Dz(r,e,t):Oz(r,e,t),g$=(r,e,t)=>t>32?$z(r,e,t):Mz(r,e,t);function Gxe(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=p$(l,h,1)^t[a],v=g$(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=Lz[o],c=p$(i,s,a),l=g$(i,s,a),h=Bz[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]^=qxe[n],r[1]^=Kxe[n]}t.fill(0)}let Zxe=class Fz extends ST{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,b8(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=lxe(this.state)}keccak(){Gxe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Ow(this);const{blockLen:t,state:n}=this;e=Q_(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 b8(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Cz(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 Fz(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 Yxe=(r,e,t)=>IT(()=>new Zxe(e,r,t)),Qxe=Yxe(1,136,256/8);let jz=!1;const Hz=function(r){return Qxe(r)};let Wz=Hz;function Ei(r){const e=Zr(r,"data");return Ft(Wz(e))}Ei._=Hz;Ei.lock=function(){jz=!0};Ei.register=function(r){if(jz)throw new TypeError("keccak256 is locked");Wz=r};Object.freeze(Ei);const zz=function(r){return Fxe("sha256").update(r).digest()};let Vz=zz,qz=!1;function u2(r){const e=Zr(r,"data");return Ft(Vz(e))}u2._=zz;u2.lock=function(){qz=!0};u2.register=function(r){if(qz)throw new Error("sha256 is locked");Vz=r};Object.freeze(u2);Object.freeze(u2);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Kz=BigInt(0),J_=BigInt(1),Jxe=BigInt(2),X_=r=>r instanceof Uint8Array,Xxe=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Mw(r){if(!X_(r))throw new Error("Uint8Array expected");let e="";for(let t=0;tn+i.length,0));let t=0;return r.forEach(n=>{if(!X_(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function tAe(r,e){if(r.length!==e.length)return!1;for(let t=0;tKz;r>>=J_,e+=1);return e}function iAe(r,e){return r>>BigInt(e)&J_}const sAe=(r,e,t)=>r|(t?J_:Kz)<(Jxe<new Uint8Array(r),m$=r=>Uint8Array.from(r);function Zz(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=R7(r),i=R7(r),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...f)=>t(i,n,...f),c=(f=R7())=>{i=a(m$([0]),f),n=a(),f.length!==0&&(i=a(m$([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 oAe={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 cb(r,e,t={}){const n=(i,s,o)=>{const a=oAe[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 aAe=Object.freeze(Object.defineProperty({__proto__:null,bitGet:iAe,bitLen:nAe,bitMask:NT,bitSet:sAe,bytesToHex:Mw,bytesToNumberBE:Rp,bytesToNumberLE:RT,concatBytes:qv,createHmacDrbg:Zz,ensureBytes:jc,equalBytes:tAe,hexToBytes:Dw,hexToNumber:TT,numberToBytesBE:$w,numberToBytesLE:kT,numberToHexUnpadded:Gz,numberToVarBytesBE:eAe,utf8ToBytes:rAe,validateObject:cb},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ji=BigInt(0),mi=BigInt(1),j0=BigInt(2),cAe=BigInt(3),JC=BigInt(4),w$=BigInt(5),v$=BigInt(8);BigInt(9);BigInt(16);function Po(r,e){const t=r%e;return t>=Ji?t:e+t}function lAe(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 XC(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 uAe(r){const e=(r-mi)/j0;let t,n,i;for(t=r-mi,n=0;t%j0===Ji;t/=j0,n++);for(i=j0;i(n[i]="function",n),e);return cb(r,t)}function pAe(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 gAe(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 Yz(r,e){const t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function mAe(r,e,t=!1,n={}){if(r<=Ji)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:i,nByteLength:s}=Yz(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=hAe(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:NT(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)=>pAe(a,c,l),div:(c,l)=>Po(c*XC(l,r),r),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>XC(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>gAe(a,c),cmov:(c,l,h)=>h?l:c,toBytes:c=>t?kT(c,s):$w(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return t?RT(c):Rp(c)}});return Object.freeze(a)}function Qz(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 Jz(r){const e=Qz(r);return e+Math.ceil(e/2)}function wAe(r,e,t=!1){const n=r.length,i=Qz(e),s=Jz(e);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=t?Rp(r):RT(r),a=Po(o,e-mi)+mi;return t?kT(a,i):$w(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vAe=BigInt(0),k7=BigInt(1);function yAe(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>vAe;)s&k7&&(o=o.add(a)),a=a.double(),s>>=k7;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+=k7);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 Xz(r){return fAe(r.Fp),cb(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Yz(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function bAe(r){const e=Xz(r);cb(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:_Ae,hexToBytes:xAe}=aAe,X0={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){const{Err:e}=X0;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:_Ae(n),l:r.subarray(t+2)}},toSig(r){const{Err:e}=X0,t=typeof r=="string"?xAe(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}=X0._parseInt(t.subarray(2)),{d:o,l:a}=X0._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}`}},Zh=BigInt(0),sc=BigInt(1);BigInt(2);const y$=BigInt(3);BigInt(4);function AAe(r){const e=bAe(r),{Fp:t}=e,n=e.toBytes||((A,M,$)=>{const L=M.toAffine();return qv(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"&&Zht.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($,y$),{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,y$);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===Zh)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>Zh||q>Zh;)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===Zh||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 Mw(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=yAe(f,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function EAe(r){const e=Xz(r);return cb(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function CAe(r){const e=EAe(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(m){return ZhMw($w(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)=>Rp(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}=X0.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 Dw(this.toDERHex())}toDERHex(){return X0.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Dw(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=Jz(e.n);return wAe(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=Rp(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=NT(e.nBitLength);function V(m){if(typeof m!="bigint")throw new Error("bigint expected");if(!(Zh<=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=qv(...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===Zh)return;const K=a(D*a(k+z*be));if(K===Zh)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 Zz(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 X0.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 SAe(r){return{hash:r,hmac:(e,...t)=>Tz(r,e,dxe(...t)),randomBytes:fxe}}function IAe(r,e){const t=n=>CAe({...r,...SAe(n)});return Object.freeze({...t(e),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const eV=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),b$=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),TAe=BigInt(1),eS=BigInt(2),_$=(r,e)=>(r+e/eS)/e;function RAe(r){const e=eV,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,eS,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,eS,e);if(!tS.eql(tS.sqr(Y),r))throw new Error("Cannot find square root");return Y}const tS=mAe(eV,void 0,void 0,{sqrt:RAe}),Vd=IAe({a:BigInt(0),b:BigInt(7),Fp:tS,n:b$,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const e=b$,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-TAe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=_$(s*r,e),c=_$(-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}}}},kz);BigInt(0);Vd.ProjectivePoint;const Kv="0x0000000000000000000000000000000000000000",x$="0x0000000000000000000000000000000000000000000000000000000000000000",A$=BigInt(0),E$=BigInt(1),C$=BigInt(2),S$=BigInt(27),I$=BigInt(28),o4=BigInt(35),hg={};function T$(r){return o1(to(r),32)}var ym,bm,_m,hp;const Lc=class Lc{constructor(e,t,n,i){Le(this,ym);Le(this,bm);Le(this,_m);Le(this,hp);ab(e,hg,"Signature"),de(this,ym,t),de(this,bm,n),de(this,_m,i),de(this,hp,null)}get r(){return ee(this,ym)}set r(e){Ae(im(e)===32,"invalid r","value",e),de(this,ym,Ft(e))}get s(){return ee(this,bm)}set s(e){Ae(im(e)===32,"invalid s","value",e);const t=Ft(e);Ae(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),de(this,bm,t)}get v(){return ee(this,_m)}set v(e){const t=Sr(e,"value");Ae(t===27||t===28,"invalid v","v",e),de(this,_m,t)}get networkV(){return ee(this,hp)}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(hg,this.r,this.s,this.v);return this.networkV&&de(e,hp,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==S$||t==I$?A$:(Ae(t>=o4,"invalid EIP-155 v","v",e),(t-o4)/C$)}static getChainIdV(e,t){return qt(e)*C$+BigInt(35+t-27)}static getNormalizedV(e){const t=qt(e);return t===A$||t===S$?27:t===E$||t===I$?28:(Ae(t>=o4,"invalid v","v",e),t&E$?27:28)}static from(e){function t(l,h){Ae(l,h,"signature",e)}if(e==null)return new Lc(hg,x$,x$,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(hg,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(hg,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=T$(n),s=function(l,h){if(l!=null)return T$(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>=o4?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(hg,i,s,a);return o&&de(c,hp,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}};ym=new WeakMap,bm=new WeakMap,_m=new WeakMap,hp=new WeakMap;let wl=Lc;var Dh;const z0=class z0{constructor(e){Le(this,Dh);Ae(im(e)===32,"invalid private key","privateKey","[REDACTED]"),de(this,Dh,Ft(e))}get privateKey(){return ee(this,Dh)}get publicKey(){return z0.computePublicKey(ee(this,Dh))}get compressedPublicKey(){return z0.computePublicKey(ee(this,Dh),!0)}sign(e){Ae(im(e)===32,"invalid digest length","digest",e);const t=Vd.sign(Xs(e),Xs(ee(this,Dh)),{lowS:!0});return wl.from({r:Gf(t.r,32),s:Gf(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=z0.computePublicKey(e);return Ft(Vd.getSharedSecret(Xs(ee(this,Dh)),Zr(t),!1))}static computePublicKey(e,t){let n=Zr(e,"key");if(n.length===32){const s=Vd.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=Vd.ProjectivePoint.fromHex(n);return Ft(i.toRawBytes(t))}static recoverPublicKey(e,t){Ae(im(e)===32,"invalid digest length","digest",e);const n=wl.from(t);let i=Vd.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=Vd.ProjectivePoint.fromHex(z0.computePublicKey(e).substring(2)),s=Vd.ProjectivePoint.fromHex(z0.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}};Dh=new WeakMap;let Gv=z0;const kAe=BigInt(0),NAe=BigInt(36);function R$(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 PT={};for(let r=0;r<10;r++)PT[String(r)]=String(r);for(let r=0;r<26;r++)PT[String.fromCharCode(65+r)]=String(10+r);const k$=15;function PAe(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>PT[n]).join("");for(;e.length>=k$;){let n=e.substring(0,k$);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 OAe=function(){const r={};for(let e=0;e<36;e++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function MAe(r){r=r.toLowerCase();let e=kAe;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,dp)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return ee(this,dp)===!0?-1:ee(this,dp)===!1?this.value.length:null}static from(e,t){return new Th(Ih,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 Th(Ih,"address",e)}static bool(e){return new Th(Ih,"bool",!!e)}static bytes(e){return new Th(Ih,"bytes",e)}static string(e){return new Th(Ih,"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 Th(Ih,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===N$}static dereference(e,t){if(Th.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};dp=new WeakMap;let Ps=Th;class $Ae extends Cd{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(Gf(e.readValue(),20))}}class BAe extends Cd{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 rV(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 GC,s=new GC,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 nV(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)}),Pw.fromItems(t,n)}class LAe extends Cd{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+VAe))&&this._throwError("value out-of-bounds",n),i=dz(i,8*ro)}else(iJ0(s,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(i)}decode(t){let n=J0(t.readValue(),this.size*8);return this.signed&&(n=w8(n,this.size*8)),n}}class GAe extends iV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Eu(Ps.dereference(t,"string")))}decode(e){return v8(super.decode(e))}}class a4 extends Cd{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 rV(t,this.coders,i)}decode(t){return nV(t,this.coders)}}function c1(r){return Ei(Eu(r))}var ZAe="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const P$=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),O$=4;function YAe(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 QAe(r){let e=0;return()=>r[e++]}function sV(r){return QAe(YAe(JAe(r)))}function JAe(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 XAe(r){return r&1?~r>>1:r>>1}function eEe(r,e){let t=Array(r);for(let n=0,i=0;n{let e=Zv(r);if(e.length)return e})}function aV(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(tEe(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(rEe(t,r))}return e.flat()}function Yv(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function cV(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function tEe(r,e){let t=1+e(),n=e(),i=Yv(e);return cV(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 rEe(r,e){let t=1+e();return cV(t,1+r,e).map(i=>[i[0],i.slice(1)])}function nEe(r){let e=[],t=Zv(r);return i(n([]),[]),e;function n(s){let o=r(),a=Yv(()=>{let c=Zv(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 iEe(r){return r.toString(16).toUpperCase().padStart(2,"0")}function lV(r){return`{${iEe(r)}}`}function sEe(r){let e=[];for(let t=0,n=r.length;t>24&255}function dV(r){return r&16777215}let rS,M$,nS,W4;function fEe(){let r=sV(aEe);rS=new Map(oV(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),M$=new Set(Zv(r)),nS=new Map,W4=new Map;for(let[e,t]of aV(r)){if(!M$.has(e)&&t.length==2){let[n,i]=t,s=W4.get(n);s||(s=new Map,W4.set(n,s)),s.set(i,e)}nS.set(e,t.reverse())}}function fV(r){return r>=Qv&&r=_8&&r=x8&&eA8&&e0&&i(A8+l)}else{let o=nS.get(s);o?t.push(...o):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=h3(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=pEe(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 gV(r){return pV(r).map(dV)}function mEe(r){return gEe(pV(r))}const D$=45,mV=".",wV=65039,vV=1,C8=r=>Array.from(r);function Jv(r,e){return r.P.has(e)||r.Q.has(e)}class wEe extends Array{get is_emoji(){return!0}}let iS,yV,ep,sS,bV,om,P7,Rg,U0,$$,oS;function OT(){if(iS)return;let r=sV(ZAe);const e=()=>Zv(r),t=()=>new Set(e()),n=(h,f)=>f.forEach(v=>h.add(v));iS=new Map(aV(r)),yV=t(),ep=e(),sS=new Set(e().map(h=>ep[h])),ep=new Set(ep),bV=t(),t();let i=oV(r),s=r();const o=()=>{let h=new Set;return e().forEach(f=>n(h,i[f])),n(h,e()),h};om=Yv(h=>{let f=Yv(r).map(v=>v+96);if(f.length){let v=h>=s;f[0]-=32,f=Bw(f),v&&(f=`Restricted[${f}]`);let y=o(),A=o(),M=!r();return{N:f,P:y,Q:A,M,R:v}}}),P7=t(),Rg=new Map;let a=e().concat(C8(P7)).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),P7.has(h)||Rg.set(h,y)});for(let{V:h,M:f}of new Set(Rg.values())){let v=[];for(let A of h){let M=om.filter(L=>Jv(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=>C8(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,$)}}U0=new Set;let c=new Set;const l=h=>U0.has(h)?c.add(h):U0.add(h);for(let h of om){for(let f of h.P)l(f);for(let f of h.Q)l(f)}for(let h of U0)!Rg.has(h)&&!c.has(h)&&Rg.set(h,vV);n(U0,gV(U0)),$$=nEe(r).map(h=>wEe.from(h)).sort(oEe),oS=new Map;for(let h of $$){let f=[oS];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===wV?f.push(...y):f=y}for(let v of f)v.V=h}}function MT(r){return(_V(r)?"":`${DT(ex([r]))} `)+lV(r)}function DT(r){return`"${r}"‎`}function vEe(r){if(r.length>=4&&r[2]==D$&&r[3]==D$)throw new Error(`invalid label extension: "${Bw(r.slice(0,4))}"`)}function yEe(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function bEe(r){let e=r[0],t=P$.get(e);if(t)throw L3(`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=sEe(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=TEe(s,e,t),c=a.length,l;if(!c)throw new Error("empty label");let h=o.output=a.flat();if(yEe(h),!(o.emoji=c>1||a[0].is_emoji)&&h.every(v=>v<128))vEe(h),l="ASCII";else{let v=a.flatMap(y=>y.is_emoji?[]:y);if(!v.length)l="Emoji";else{if(ep.has(h[0]))throw L3("leading combining mark");for(let M=1;Mo.has(a)):C8(o),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>Jv(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function CEe(r){let e=om;for(let t of r){let n=e.filter(i=>Jv(i,t));if(!n.length)throw om.some(i=>Jv(i,t))?AV(e[0],t):xV(t);if(e=n,n.length==1)break}return e}function SEe(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 ${DT(ex(e,63))}: ${i}`)}return Bw(n)}).join(mV)}function xV(r){return new Error(`disallowed character: ${MT(r)}`)}function AV(r,e){let t=MT(e),n=om.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function L3(r){return new Error(`illegal placement: ${r}`)}function IEe(r,e){for(let t of e)if(!Jv(r,t))throw AV(r,t);if(r.M){let t=gV(e);for(let n=1,i=t.length;nO$)throw new Error(`excessive non-spacing marks: ${DT(ex(t.slice(n-1,s)))} (${s-n}/${O$})`);n=s}}}function TEe(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=kEe(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let o=r.pop();if(U0.has(o))i.push(o);else{let a=iS.get(o);if(a)i.push(...a);else if(!yV.has(o))throw xV(o)}}}return i.length&&n.push(e(i)),n}function REe(r){return r.filter(e=>e!=wV)}function kEe(r,e){let t=oS,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 EV=new Uint8Array(32);EV.fill(0);function B$(r){return Ae(r.length!==0,"invalid ENS name; empty component","comp",r),r}function CV(r){const e=Eu(NEe(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 O7(r,e){return{address:Gr(r),storageKeys:e.map((t,n)=>(Ae(Tn(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function M1(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(Ae(t.length===2,"invalid slot set",`value[${n}]`,t),O7(t[0],t[1])):(Ae(t!=null&&typeof t=="object","invalid address-slot set","value",r),O7(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 O7(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function OEe(r){let e;return typeof r=="string"?e=Gv.computePublicKey(r,!1):e=r.publicKey,Gr(Ei("0x"+e.substring(4)).substring(26))}function MEe(r,e){return OEe(Gv.recoverPublicKey(r,e))}const Qi=BigInt(0),DEe=BigInt(2),$Ee=BigInt(27),BEe=BigInt(28),LEe=BigInt(35),UEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),M7=4096*32;function L$(r,e){let t=r.toString(16);for(;t.length<2;)t="0"+t;return t+=u2(e).substring(4),"0x"+t}function tx(r){return r==="0x"?null:Gr(r)}function $T(r,e){try{return M1(r)}catch(t){Ae(!1,t.message,e,r)}}function lb(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<=UEe,"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 BT(r){return M1(r).map(e=>[e.address,e.storageKeys])}function FEe(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",a1(n)])}var Zl,xm,Am,Em,Cm,Sm,Im,Tm,Rm,km,Nm,Pm,fp,hf,$h,df,Om,z4;const Rh=class Rh{constructor(){Le(this,Om);Le(this,Zl);Le(this,xm);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,fp);Le(this,hf);Le(this,$h);Le(this,df);de(this,Zl,null),de(this,xm,null),de(this,Em,0),de(this,Cm,Qi),de(this,Sm,null),de(this,Im,null),de(this,Tm,null),de(this,Am,"0x"),de(this,Rm,Qi),de(this,km,Qi),de(this,Nm,null),de(this,Pm,null),de(this,fp,null),de(this,hf,null),de(this,df,null),de(this,$h,null)}get type(){return ee(this,Zl)}set type(e){switch(e){case null:de(this,Zl,null);break;case 0:case"legacy":de(this,Zl,0);break;case 1:case"berlin":case"eip-2930":de(this,Zl,1);break;case 2:case"london":case"eip-1559":de(this,Zl,2);break;case 3:case"cancun":case"eip-4844":de(this,Zl,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,xm);return e==null&&this.type===3?Kv:e}set to(e){de(this,xm,e==null?null:Gr(e))}get nonce(){return ee(this,Em)}set nonce(e){de(this,Em,Sr(e,"value"))}get gasLimit(){return ee(this,Cm)}set gasLimit(e){de(this,Cm,qt(e))}get gasPrice(){const e=ee(this,Sm);return e==null&&(this.type===0||this.type===1)?Qi:e}set gasPrice(e){de(this,Sm,e==null?null:qt(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=ee(this,Im);return e??(this.type===2||this.type===3?Qi:null)}set maxPriorityFeePerGas(e){de(this,Im,e==null?null:qt(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=ee(this,Tm);return e??(this.type===2||this.type===3?Qi:null)}set maxFeePerGas(e){de(this,Tm,e==null?null:qt(e,"maxFeePerGas"))}get data(){return ee(this,Am)}set data(e){de(this,Am,Ft(e))}get value(){return ee(this,Rm)}set value(e){de(this,Rm,qt(e,"value"))}get chainId(){return ee(this,km)}set chainId(e){de(this,km,qt(e))}get signature(){return ee(this,Nm)||null}set signature(e){de(this,Nm,e==null?null:wl.from(e))}get accessList(){const e=ee(this,Pm)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){de(this,Pm,e==null?null:M1(e))}get maxFeePerBlobGas(){const e=ee(this,fp);return e==null&&this.type===3?Qi:e}set maxFeePerBlobGas(e){de(this,fp,e==null?null:qt(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=ee(this,hf);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,df,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,fp)!=null||ee(this,hf);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 Rh.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 Rh;if(typeof e=="string"){const n=Zr(e);if(n[0]>=127)return Rh.from(jEe(n));switch(n[0]){case 1:return Rh.from(VEe(n));case 2:return Rh.from(WEe(n));case 3:return Rh.from(KEe(n))}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new Rh;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=wl.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}};Zl=new WeakMap,xm=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,fp=new WeakMap,hf=new WeakMap,$h=new WeakMap,df=new WeakMap,Om=new WeakSet,z4=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 HEe(this,n);case 1:return qEe(this,n);case 2:return zEe(this,n);case 3:return GEe(this,n,t?this.blobs:null)}Ze(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let S8=Rh;const SV=new Uint8Array(32);SV.fill(0);const ZEe=BigInt(-1),IV=BigInt(0),TV=BigInt(1),YEe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function QEe(r){const e=Zr(r),t=e.length%32;return t?vi([e,SV.slice(t)]):Ft(e)}const JEe=Gf(TV,32),XEe=Gf(IV,32),U$={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},D7=["name","version","chainId","verifyingContract","salt"];function F$(r){return function(e){return Ae(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}const e7e={name:F$("name"),version:F$("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):Dg(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 $7(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=J0(YEe,t?n-1:n),s=t?(i+TV)*ZEe:IV;return function(o){const a=qt(o,"value");return Ae(a>=s&&a<=i,`value out-of-bounds for ${r}`,"value",a),Gf(t?dz(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),QEe(n)}}}switch(r){case"address":return function(e){return o1(Gr(e),32)};case"bool":return function(e){return e?JEe:XEe};case"bytes":return function(e){return Ei(e)};case"string":return function(e){return c1(e)}}return null}function j$(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function c4(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 cy,Bh,Mm,B8,RV;const Za=class Za{constructor(e){Le(this,B8);Oe(this,"primaryType");Le(this,cy);Le(this,Bh);Le(this,Mm);de(this,Bh,new Map),de(this,Mm,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}=c4(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,cy,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=c4(h.type).base;Ae(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!$7(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,Bh).set(c,j$(c,s[c])+h.map(f=>j$(f,s[f])).join(""))}}get types(){return JSON.parse(ee(this,cy))}getEncoder(e){let t=ee(this,Mm).get(e);return t||(t=rt(this,B8,RV).call(this,e),ee(this,Mm).set(e,t)),t}encodeType(e){const t=ee(this,Bh).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($7(e))return n(e,t);const i=c4(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=U$[n];Ae(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>D7.indexOf(n.name)-D7.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=[];D7.forEach(c=>{const l=e[c];l!=null&&(i[c]=e7e[c](l),s.push({name:c,type:U$[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)})}}};cy=new WeakMap,Bh=new WeakMap,Mm=new WeakMap,B8=new WeakSet,RV=function(e){{const i=$7(e);if(i)return i}const t=c4(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,Bh).has(i)&&(a=a.map(Ei)),Ei(vi(a))}}const n=this.types[e];if(n){const i=c1(ee(this,Bh).get(e));return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return ee(this,Bh).has(c)?Ei(l):l});return o.unshift(i),vi(o)}}Ae(!1,`unknown type: ${e}`,"type",e)};let I8=Za;function io(r){const e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}const t7e="external public payable override",r7e=io(t7e.split(" ")),kV="constant external internal payable private public pure view override",n7e=io(kV.split(" ")),NV="constructor error event fallback function receive struct",PV=io(NV.split(" ")),OV="calldata memory storage payable indexed",i7e=io(OV.split(" ")),s7e="tuple returns",o7e=[NV,OV,s7e,kV].join(" "),a7e=io(o7e.split(" ")),c7e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},l7e=new RegExp("^(\\s*)"),u7e=new RegExp("^([0-9]+)"),h7e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),MV=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),DV=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var os,Vc,ly,cS;const L8=class L8{constructor(e){Le(this,ly);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 L8(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,ly,cS).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 O2(this,os)._++,e}toString(){const e=[];for(let t=ee(this,os);t`}};os=new WeakMap,Vc=new WeakMap,ly=new WeakSet,cS=function(e=0,t=0){return new L8(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 vl=L8;function d0(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(h7e),a){if(c.text=a[1],s+=c.text.length,a7e.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(DV)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(u7e),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 vl(e.map(o=>Object.freeze(o)))}function H$(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 rx(r,e){if(e.peekKeyword(PV)){const t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function wd(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 $V(r){let e=wd(r,n7e);return H$(e,io("constant payable nonpayable".split(" "))),H$(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 rd(r,e){return r.popParams().map(t=>us.from(t,e))}function BV(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return qt(r.pop().text);throw new Error("invalid gas")}return null}function l1(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}const d7e=new RegExp(/^(.*)\[([0-9]*)\]$/);function W$(r){const e=r.match(DV);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"),z$="_ParamTypeInternal",V$="_ErrorInternal",q$="_EventInternal",K$="_ConstructorInternal",G$="_FallbackInternal",Z$="_FunctionInternal",Y$="_StructInternal";var Dm,V4;const Ya=class Ya{constructor(e,t,n,i,s,o,a,c){Le(this,Dm);Oe(this,"name");Oe(this,"type");Oe(this,"baseType");Oe(this,"indexed");Oe(this,"components");Oe(this,"arrayLength");Oe(this,"arrayChildren");if(ab(e,Xn,"ParamType"),Object.defineProperty(this,Wo,{value:z$}),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,Dm,V4).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(d0(e),t)}catch{Ae(!1,"invalid param type","obj",e)}else if(e instanceof vl){let a="",c="",l=null;wd(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=W$(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(wd(e,i7e).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(MV),"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(d7e);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=W$(e.type),new Ya(Xn,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[Wo]===z$}};Dm=new WeakSet,V4=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,Dm,V4).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],Dm,V4).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 u1{constructor(e,t,n){Oe(this,"type");Oe(this,"inputs");ab(e,Xn,"Fragment"),n=Object.freeze(n.slice()),tr(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{u1.from(JSON.parse(e))}catch{}return u1.from(d0(e))}if(e instanceof vl)switch(e.peekKeyword(PV)){case"constructor":return Qh.from(e);case"error":return Mo.from(e);case"event":return lu.from(e);case"fallback":case"receive":return kh.from(e);case"function":return uu.from(e);case"struct":return kp.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Qh.from(e);case"error":return Mo.from(e);case"event":return lu.from(e);case"fallback":case"receive":return kh.from(e);case"function":return uu.from(e);case"struct":return kp.from(e)}Ze(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}Ae(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Qh.isFragment(e)}static isError(e){return Mo.isFragment(e)}static isEvent(e){return lu.isFragment(e)}static isFunction(e){return uu.isFragment(e)}static isStruct(e){return kp.isFragment(e)}}class nx extends u1{constructor(t,n,i,s){super(t,n,s);Oe(this,"name");Ae(typeof i=="string"&&i.match(MV),"invalid identifier","name",i),s=Object.freeze(s.slice()),tr(this,{name:i})}}function Xv(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}class Mo extends nx{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,Wo,{value:V$})}get selector(){return c1(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+Xv(e,this.inputs)),t.join(" ")}static from(e){if(Mo.isFragment(e))return e;if(typeof e=="string")return Mo.from(d0(e));if(e instanceof vl){const t=rx("error",e),n=rd(e);return l1(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]===V$}}class lu extends nx{constructor(t,n,i,s){super(t,"event",n,i);Oe(this,"anonymous");Object.defineProperty(this,Wo,{value:q$}),tr(this,{anonymous:s})}get topicHash(){return c1(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+Xv(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 lu(Xn,t,n,!1).topicHash}static from(t){if(lu.isFragment(t))return t;if(typeof t=="string")try{return lu.from(d0(t))}catch{Ae(!1,"invalid event fragment","obj",t)}else if(t instanceof vl){const n=rx("event",t),i=rd(t,!0),s=!!wd(t,io(["anonymous"])).has("anonymous");return l1(t),new lu(Xn,n,i,s)}return new lu(Xn,t.name,t.inputs?t.inputs.map(n=>us.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[Wo]===q$}}class Qh extends u1{constructor(t,n,i,s,o){super(t,n,i);Oe(this,"payable");Oe(this,"gas");Object.defineProperty(this,Wo,{value:K$}),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${Xv(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(Qh.isFragment(t))return t;if(typeof t=="string")try{return Qh.from(d0(t))}catch{Ae(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof vl){wd(t,io(["constructor"]));const n=rd(t),i=!!wd(t,r7e).has("payable"),s=BV(t);return l1(t),new Qh(Xn,"constructor",n,i,s)}return new Qh(Xn,"constructor",t.inputs?t.inputs.map(us.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[Wo]===K$}}class kh extends u1{constructor(t,n,i){super(t,"fallback",n);Oe(this,"payable");Object.defineProperty(this,Wo,{value:G$}),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(kh.isFragment(t))return t;if(typeof t=="string")try{return kh.from(d0(t))}catch{Ae(!1,"invalid fallback fragment","obj",t)}else if(t instanceof vl){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=rd(t);return Ae(c.length===0,"receive cannot have arguments","obj.inputs",c),wd(t,io(["payable"])),l1(t),new kh(Xn,[],!0)}let o=rd(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=$V(t);if(Ae(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),wd(t,io(["returns"])).has("returns")){const c=rd(t);Ae(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return l1(t),new kh(Xn,o,a==="payable")}if(t.type==="receive")return new kh(Xn,[],!0);if(t.type==="fallback"){const n=[us.from("bytes")],i=t.stateMutability==="payable";return new kh(Xn,n,i)}Ae(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[Wo]===G$}}class uu extends nx{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:Z$}),o=Object.freeze(o.slice()),tr(this,{constant:i==="view"||i==="pure",gas:a,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return c1(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+Xv(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(Xv(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 uu(Xn,t,"view",n,[],null).selector}static from(t){if(uu.isFragment(t))return t;if(typeof t=="string")try{return uu.from(d0(t))}catch{Ae(!1,"invalid function fragment","obj",t)}else if(t instanceof vl){const i=rx("function",t),s=rd(t),o=$V(t);let a=[];wd(t,io(["returns"])).has("returns")&&(a=rd(t));const c=BV(t);return l1(t),new uu(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 uu(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]===Z$}}class kp extends nx{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,Wo,{value:Y$})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return kp.from(d0(e))}catch{Ae(!1,"invalid struct fragment","obj",e)}else if(e instanceof vl){const t=rx("struct",e),n=rd(e);return l1(e),new kp(Xn,t,n)}return new kp(Xn,e.name,e.inputs?e.inputs.map(us.from):[])}static isFragment(e){return e&&e[Wo]===Y$}}const Cl=new Map;Cl.set(0,"GENERIC_PANIC");Cl.set(1,"ASSERT_FALSE");Cl.set(17,"OVERFLOW");Cl.set(18,"DIVIDE_BY_ZERO");Cl.set(33,"ENUM_RANGE_ERROR");Cl.set(34,"BAD_STORAGE_DATA");Cl.set(49,"STACK_UNDERFLOW");Cl.set(50,"ARRAY_RANGE_ERROR");Cl.set(65,"OUT_OF_MEMORY");Cl.set(81,"UNINITIALIZED_FUNCTION_CALL");const f7e=new RegExp(/^bytes([0-9]*)$/),p7e=new RegExp(/^(u?int)([0-9]*)$/);let B7=null,Q$=1024;function g7e(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 ${Cl.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 ff,kg;const U8=class U8{constructor(){Le(this,ff)}getDefaultValue(e){const t=e.map(i=>rt(this,ff,kg).call(this,us.from(i)));return new a4(t,"_").defaultValue()}encode(e,t){lz(t.length,e.length,"types/values length mismatch");const n=e.map(o=>rt(this,ff,kg).call(this,us.from(o))),i=new a4(n,"_"),s=new GC;return i.encode(s,t),s.data}decode(e,t,n){const i=e.map(o=>rt(this,ff,kg).call(this,us.from(o)));return new a4(i,"_").decode(new ZC(t,n,Q$))}static _setDefaultMaxInflation(e){Ae(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Q$=e}static defaultAbiCoder(){return B7==null&&(B7=new U8),B7}static getBuiltinCallException(e,t,n){return g7e(e,t,n,U8.defaultAbiCoder())}};ff=new WeakSet,kg=function(e){if(e.isArray())return new LAe(rt(this,ff,kg).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new a4(e.components.map(n=>rt(this,ff,kg).call(this,n)),e.name);switch(e.baseType){case"address":return new $Ae(e.name);case"bool":return new UAe(e.name);case"string":return new GAe(e.name);case"bytes":return new FAe(e.name);case"":return new WAe(e.name)}let t=e.type.match(p7e);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 KAe(n/8,t[1]==="int",e.name)}if(t=e.type.match(f7e),t){let n=parseInt(t[1]);return Ae(n!==0&&n<=32,"invalid bytes length","param",e),new jAe(n,e.name)}Ae(!1,"invalid type","type",e.type)};let ey=U8;class m7e{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 w7e{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 v7e{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 J${constructor(e){Oe(this,"hash");Oe(this,"_isIndexed");tr(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const X$={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"},eB={"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&&X$[r.toString()]&&(e=X$[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}};var Yl,Ql,Jl,Es,Iu,q4,K4;const V0=class V0{constructor(e){Le(this,Iu);Oe(this,"fragments");Oe(this,"deploy");Oe(this,"fallback");Oe(this,"receive");Le(this,Yl);Le(this,Ql);Le(this,Jl);Le(this,Es);let t=[];typeof e=="string"?t=JSON.parse(e):t=e,de(this,Jl,new Map),de(this,Yl,new Map),de(this,Ql,new Map);const n=[];for(const o of t)try{n.push(u1.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,Jl);break;case"event":c=ee(this,Ql);break;case"error":c=ee(this,Yl);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||tr(this,{deploy:Qh.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 ey.defaultAbiCoder()}getFunctionName(e){const t=rt(this,Iu,q4).call(this,e,null,!1);return Ae(t,"no matching function","key",e),t.name}hasFunction(e){return!!rt(this,Iu,q4).call(this,e,null,!1)}getFunction(e,t){return rt(this,Iu,q4).call(this,e,t||null,!0)}forEachFunction(e){const t=Array.from(ee(this,Jl).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,Yl).get(e);return n||null}forEachError(e){const t=Array.from(ee(this,Yl).keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;ns.type==="string"?c1(o):s.type==="bytes"?Ei(Ft(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=Gf(o):s.type.match(/^bytes/)?o=L_e(o,32):s.type==="address"&&ee(this,Es).encode(["address"],[o]),o1(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(c1(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 J$(null);else if(o[A])M=new J$(a[v++]);else try{M=a[v++]}catch($){M=$}else try{M=c[f++]}catch($){M=$}l.push(M),h.push(y.name||null)}),Pw.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 w7e(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 m7e(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 v7e(n,n.selector,i)}static from(e){return e instanceof V0?e:typeof e=="string"?new V0(JSON.parse(e)):typeof e.formatJson=="function"?new V0(e.formatJson()):typeof e.format=="function"?new V0(e.format("json")):new V0(e)}};Yl=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,Es=new WeakMap,Iu=new WeakSet,q4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Jl).values())if(s===o.selector)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){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,Jl).get(uu.from(e).format());return i||null},K4=function(e,t,n){if(Tn(e)){const s=e.toLowerCase();for(const o of ee(this,Ql).values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const s=[];for(const[o,a]of ee(this,Ql))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,Ql).get(lu.from(e).format());return i||null};let lS=V0;const LV=BigInt(0);function am(r){return r??null}function fi(r){return r==null?null:r.toString()}class tB{constructor(e,t,n){Oe(this,"gasPrice");Oe(this,"maxFeePerGas");Oe(this,"maxPriorityFeePerGas");tr(this,{gasPrice:am(e),maxFeePerGas:am(t),maxPriorityFeePerGas:am(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:fi(e),maxFeePerGas:fi(t),maxPriorityFeePerGas:fi(n)}}}function T8(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=M1(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=>ET(i)?Ft(i):Object.assign({},i))),e}var Lh;class y7e{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,Lh);de(this,Lh,e.transactions.map(n=>typeof n!="string"?new ty(n,t):n)),tr(this,{provider:t,hash:am(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:am(e.prevRandao),extraData:e.extraData,baseFeePerGas:am(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return ee(this,Lh).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=ee(this,Lh).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 ub(i,t))));let n=LV;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,uy)}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()"}),jV(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()"}),FV(this,e)}replaceableTransaction(e){Ae(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new aR(this,this.provider);return de(t,pf,e),t}};pf=new WeakMap;let ty=aR;function b7e(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function FV(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function jV(r){return{orphan:"drop-transaction",tx:r}}function _7e(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 UT extends ub{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 HV extends ub{constructor(t,n){super(t,t.provider);Oe(this,"error");tr(this,{error:n})}}var $m;class x7e extends UV{constructor(t,n,i){super(i,n);Le(this,$m);de(this,$m,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?ee(this,$m).getEvent(t.topics[0]):null;if(n)try{return new UT(t,ee(this,$m),n)}catch(i){return new HV(t,i)}return t})}}$m=new WeakMap;var hy;class FT extends ty{constructor(t,n,i){super(i,n);Le(this,hy);de(this,hy,t)}async wait(t,n){const i=await super.wait(t,n);return i==null?null:new x7e(ee(this,hy),this.provider,i)}}hy=new WeakMap;class WV extends fz{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 A7e extends WV{constructor(e,t,n,i,s){super(e,t,n,new UT(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 rB=BigInt(0);function zV(r){return r&&typeof r.call=="function"}function VV(r){return r&&typeof r.estimateGas=="function"}function ix(r){return r&&typeof r.resolveName=="function"}function qV(r){return r&&typeof r.sendTransaction=="function"}function KV(r){if(r!=null){if(ix(r))return r;if(r.provider)return r.provider}}var dy;class E7e{constructor(e,t,n){Le(this,dy);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,dy)}}dy=new WeakMap;function h1(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function tp(r){return r==null?null:r.provider||null}async function GV(r,e){const t=Ps.dereference(r,"overrides");Ae(typeof t=="object","invalid overrides parameter","overrides",r);const n=T8(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 C7e(r,e,t){const n=h1(r,"resolveName"),i=ix(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 S7e(r){const e=async function(o){const a=await GV(o,["data"]);a.to=await r.getAddress(),a.from&&(a.from=await no(a.from,KV(r.runner)));const c=r.interface,l=qt(a.value||rB,"overrides.value")===rB,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=h1(r.runner,"call");Ze(zV(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 AT(l)&&l.data?r.interface.makeError(l.data,c):l}},n=async function(o){const a=r.runner;Ze(qV(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=tp(r.runner);return new FT(r.interface,l,c)},i=async function(o){const a=h1(r.runner,"estimateGas");return Ze(VV(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 I7e(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 GV(l.pop()),f.from&&(f.from=await no(f.from,KV(r.runner)))),h.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const v=await C7e(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(qV(h),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await h.sendTransaction(await n(...l)),v=tp(r.runner);return new FT(r.interface,v,f)},o=async function(...l){const h=h1(r.runner,"estimateGas");return Ze(VV(h),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await h.estimateGas(await n(...l))},a=async function(...l){const h=h1(r.runner,"call");Ze(zV(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 AT(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 T7e(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 E7e(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 R8=Symbol.for("_ethersInternal_contract"),ZV=new WeakMap;function R7e(r,e){ZV.set(r[R8],e)}function ea(r){return ZV.get(r[R8])}function k7e(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function jT(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]):k7e(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 d3(r,e){const{subs:t}=ea(r);return t.get((await jT(r,e)).tag)||null}async function nB(r,e,t){const n=tp(r.runner);Ze(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await jT(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):[];hS(r,t,H,F=>new A7e(r,F,t,P,$))}else hS(r,t,[],P=>new WV(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 uS=Promise.resolve();async function N7e(r,e,t,n){await uS;const i=await d3(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 hS(r,e,t,n){try{await uS}catch{}const i=N7e(r,e,t,n);return uS=i,await i}const l4=["then"];var wL;wL=R8;const H3=class H3{constructor(e,t,n,i){Oe(this,"target");Oe(this,"interface");Oe(this,"runner");Oe(this,"filters");Oe(this,wL);Oe(this,"fallback");Ae(typeof e=="string"||tV(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=lS.from(t);tr(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,R8,{value:{}});let o,a=null,c=null;if(i){const f=tp(n);c=new FT(this.interface,f,i)}let l=new Map;if(typeof e=="string")if(Tn(e))a=e,o=Promise.resolve(e);else{const f=h1(n,"resolveName");if(!ix(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});R7e(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const h=new Proxy({},{get:(f,v,y)=>{if(typeof v=="symbol"||l4.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)=>l4.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?S7e(this):null}),new Proxy(this,{get:(f,v,y)=>{if(typeof v=="symbol"||v in f||l4.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||l4.indexOf(v)>=0?Reflect.has(f,v):f.interface.hasFunction(v)})}connect(e){return new H3(this.target,this.interface,e)}attach(e){return new H3(e,this.interface,this.runner)}async getAddress(){return await ea(this).addrPromise}async getDeployedCode(){const e=tp(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=tp(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()),I7e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),T7e(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 jT(this,e),l={address:o,topics:c,fromBlock:t,toBlock:n},h=tp(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 UT(f,this.interface,v)}catch(y){return new HV(f,y)}return new ub(f,h)})}async on(e,t){const n=await nB(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){const n=await nB(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await hS(this,e,t,null)}async listenerCount(e){if(e){const i=await d3(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 d3(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 d3(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 d3(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 H3{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 dS=H3;function P7e(){return dS}class cm extends P7e(){}function L7(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 O7e{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 YV=new RegExp("^(ipfs)://(.*)$","i"),iB=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),YV,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var gf,pp,mf,Ng,F8,QV;const Ug=class Ug{constructor(e,t,n){Le(this,mf);Oe(this,"provider");Oe(this,"address");Oe(this,"name");Le(this,gf);Le(this,pp);tr(this,{provider:e,address:t,name:n}),de(this,gf,null),de(this,pp,new cm(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,gf)==null&&de(this,gf,(async()=>{try{return await ee(this,pp).supportsInterface("0x9061b923")}catch(e){if(ks(e,"CALL_EXCEPTION"))return!1;throw de(this,gf,null),e}})()),await ee(this,gf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await rt(this,mf,Ng).call(this,"addr(bytes32)");return s==null||s===Kv?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,mf,Ng).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 O7e&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;const n=await rt(this,mf,Ng).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,mf,Ng).call(this,"text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){const e=await rt(this,mf,Ng).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}://${F_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 hb(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 M7e(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 Uw(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 D7e=hb({address:Gr,blockHash:cs,blockNumber:Sr,data:Uw,index:Sr,removed:Kr(M7e,!1),topics:sx(cs),transactionHash:cs,transactionIndex:Sr},{index:["logIndex"]});function $7e(r){return D7e(r)}const B7e=hb({hash:Kr(cs),parentHash:cs,parentBeaconBlockRoot:Kr(cs,null),number:Sr,timestamp:Sr,nonce:Kr(Uw),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:Uw,baseFeePerGas:Kr(qt)},{prevRandao:["mixHash"]});function L7e(r){const e=B7e(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:JV(t)),e}const U7e=hb({transactionIndex:Sr,blockNumber:Sr,transactionHash:cs,address:Gr,topics:sx(cs),data:Uw,index:Sr,blockHash:cs},{index:["logIndex"]});function F7e(r){return U7e(r)}const j7e=hb({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(Uw),blockHash:cs,hash:cs,logs:sx(F7e),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 H7e(r){return j7e(r)}function JV(r){r.to&&qt(r.to)===sB&&(r.to="0x0000000000000000000000000000000000000000");const e=hb({hash:cs,index:Kr(Sr,void 0),type:t=>t==="0x"||t==null?0:Sr(t),accessList:Kr(M1,null),blobVersionedHashes:Kr(sx(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:Uw,creates:Kr(Gr,null),chainId:Kr(qt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=DAe(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=wl.from(r.signature):e.signature=wl.from(r),e.chainId==null){const t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&qt(e.blockHash)===sB&&(e.blockHash=null),e}const W7e="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class db{constructor(e){Oe(this,"name");tr(this,{name:e})}clone(){return new db(this.name)}}class ox extends db{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 ox(this.effectiveBlock,this)}}class ax extends db{constructor(t,n){super("org.ethers.plugins.network.Ens");Oe(this,"address");Oe(this,"targetNetwork");tr(this,{address:t||W7e,targetNetwork:n??1})}clone(){return new ax(this.address,this.targetNetwork)}}var fy,py;class z7e extends db{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Le(this,fy);Le(this,py);de(this,fy,t),de(this,py,n)}get url(){return ee(this,fy)}get processFunc(){return ee(this,py)}clone(){return this}}fy=new WeakMap,py=new WeakMap;const U7=new Map;var Bm,Lm,wf;const Fg=class Fg{constructor(e,t){Le(this,Bm);Le(this,Lm);Le(this,wf);de(this,Bm,e),de(this,Lm,qt(t)),de(this,wf,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return ee(this,Bm)}set name(e){de(this,Bm,e)}get chainId(){return ee(this,Lm)}set chainId(e){de(this,Lm,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,wf).values())}attachPlugin(e){if(ee(this,wf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,wf).set(e.name,e.clone()),this}getPlugin(e){return ee(this,wf).get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){const e=new Fg(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 ox;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 aB(r){return new z7e(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:oB(a.maxFee,9),maxPriorityFeePerGas:oB(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 cB=!1;function V7e(){if(cB)return;cB=!0;function r(e,t,n){const i=function(){const s=new nl(e,t);return n.ensNetwork!=null&&s.attachPlugin(new ax(null,n.ensNetwork)),s.attachPlugin(new ox),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};nl.register(e,i),nl.register(t,i),n.altNames&&n.altNames.forEach(s=>{nl.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:[aB("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[aB("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 fS(r){return JSON.parse(JSON.stringify(r))}var Uh,ec,vf,Xl,Um,G4;class q7e{constructor(e){Le(this,Um);Le(this,Uh);Le(this,ec);Le(this,vf);Le(this,Xl);de(this,Uh,e),de(this,ec,null),de(this,vf,4e3),de(this,Xl,-2)}get pollingInterval(){return ee(this,vf)}set pollingInterval(e){de(this,vf,e)}start(){ee(this,ec)||(de(this,ec,ee(this,Uh)._setTimeout(rt(this,Um,G4).bind(this),ee(this,vf))),rt(this,Um,G4).call(this))}stop(){ee(this,ec)&&(ee(this,Uh)._clearTimeout(ee(this,ec)),de(this,ec,null))}pause(e){this.stop(),e&&de(this,Xl,-2)}resume(){this.start()}}Uh=new WeakMap,ec=new WeakMap,vf=new WeakMap,Xl=new WeakMap,Um=new WeakSet,G4=async function(){try{const e=await ee(this,Uh).getBlockNumber();if(ee(this,Xl)===-2){de(this,Xl,e);return}if(e!==ee(this,Xl)){for(let t=ee(this,Xl)+1;t<=e;t++){if(ee(this,ec)==null)return;await ee(this,Uh).emit("block",t)}de(this,Xl,e)}}catch{}ee(this,ec)!=null&&de(this,ec,ee(this,Uh)._setTimeout(rt(this,Um,G4).bind(this),ee(this,vf)))};var gp,mp,yf;class HT{constructor(e){Le(this,gp);Le(this,mp);Le(this,yf);de(this,gp,e),de(this,yf,!1),de(this,mp,t=>{this._poll(t,ee(this,gp))})}async _poll(e,t){throw new Error("sub-classes must override this")}start(){ee(this,yf)||(de(this,yf,!0),ee(this,mp).call(this,-2),ee(this,gp).on("block",ee(this,mp)))}stop(){ee(this,yf)&&(de(this,yf,!1),ee(this,gp).off("block",ee(this,mp)))}pause(e){this.stop()}resume(){this.start()}}gp=new WeakMap,mp=new WeakMap,yf=new WeakMap;var Fm,Fh;class K7e extends HT{constructor(t,n){super(t);Le(this,Fm);Le(this,Fh);de(this,Fm,n),de(this,Fh,-2)}pause(t){t&&de(this,Fh,-2),super.pause(t)}async _poll(t,n){const i=await n.getBlock(ee(this,Fm));i!=null&&(ee(this,Fh)===-2?de(this,Fh,i.number):i.number>ee(this,Fh)&&(n.emit(ee(this,Fm),i.number),de(this,Fh,i.number)))}}Fm=new WeakMap,Fh=new WeakMap;var j8;class G7e extends HT{constructor(t,n){super(t);Le(this,j8);de(this,j8,fS(n))}async _poll(t,n){throw new Error("@TODO")}}j8=new WeakMap;var jm;class Z7e extends HT{constructor(t,n){super(t);Le(this,jm);de(this,jm,n)}async _poll(t,n){const i=await n.getTransactionReceipt(ee(this,jm));i&&n.emit(ee(this,jm),i)}}jm=new WeakMap;var jh,Hm,Wm,bf,tc,H8,XV;class WT{constructor(e,t){Le(this,H8);Le(this,jh);Le(this,Hm);Le(this,Wm);Le(this,bf);Le(this,tc);de(this,jh,e),de(this,Hm,fS(t)),de(this,Wm,rt(this,H8,XV).bind(this)),de(this,bf,!1),de(this,tc,-2)}start(){ee(this,bf)||(de(this,bf,!0),ee(this,tc)===-2&&ee(this,jh).getBlockNumber().then(e=>{de(this,tc,e)}),ee(this,jh).on("block",ee(this,Wm)))}stop(){ee(this,bf)&&(de(this,bf,!1),ee(this,jh).off("block",ee(this,Wm)))}pause(e){this.stop(),e&&de(this,tc,-2)}resume(){this.start()}}jh=new WeakMap,Hm=new WeakMap,Wm=new WeakMap,bf=new WeakMap,tc=new WeakMap,H8=new WeakSet,XV=async function(e){if(ee(this,tc)===-2)return;const t=fS(ee(this,Hm));t.fromBlock=ee(this,tc)+1,t.toBlock=e;const n=await ee(this,jh).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 N8{constructor(e){Oe(this,"name");tr(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function J7e(r){return JSON.parse(JSON.stringify(r))}function pS(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function F7(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:Z4("tx",{hash:t}),hash:t}}if(r.orphan){const t=r;return{type:"orphan",tag:Z4("orphan",t),filter:J7e(t)}}if(r.address||r.topics){const t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?pS(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=pS(i.map(a=>a.toLowerCase()))}return{filter:n,tag:Z4("event",n),type:"event"}}Ae(!1,"unknown ProviderEvent","event",r)}function j7(){return new Date().getTime()}const X7e={cacheTimeout:250,pollingInterval:4e3};var Cs,_f,Ss,zm,ia,wp,xf,Hh,gy,rc,Vm,qm,Pr,Jo,gS,mS,f3,wS,p3,Y4;class e9e{constructor(e,t){Le(this,Pr);Le(this,Cs);Le(this,_f);Le(this,Ss);Le(this,zm);Le(this,ia);Le(this,wp);Le(this,xf);Le(this,Hh);Le(this,gy);Le(this,rc);Le(this,Vm);Le(this,qm);if(de(this,qm,Object.assign({},X7e,t||{})),e==="any")de(this,wp,!0),de(this,ia,null);else if(e){const n=nl.from(e);de(this,wp,!1),de(this,ia,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else de(this,wp,!1),de(this,ia,null);de(this,Hh,-1),de(this,xf,new Map),de(this,Cs,new Map),de(this,_f,new Map),de(this,Ss,null),de(this,zm,!1),de(this,gy,1),de(this,rc,new Map),de(this,Vm,!1)}get pollingInterval(){return ee(this,qm).pollingInterval}get provider(){return this}get plugins(){return Array.from(ee(this,_f).values())}attachPlugin(e){if(ee(this,_f).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return ee(this,_f).set(e.name,e.connect(this)),this}getPlugin(e){return ee(this,_f).get(e)||null}get disableCcipRead(){return ee(this,Vm)}set disableCcipRead(e){de(this,Vm,!!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 y7e(L7e(e),this)}_wrapLog(e,t){return new ub($7e(e),this)}_wrapTransactionReceipt(e,t){return new UV(H7e(e),this)}_wrapTransactionResponse(e,t){return new ty(JV(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,Hh)>=0&&de(this,Hh,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:Dg(e);if(typeof e=="bigint"&&(e=Sr(e,"blockTag")),typeof e=="number")return e>=0?Dg(e):ee(this,Hh)>=0?Dg(ee(this,Hh)+e):this.getBlockNumber().then(t=>Dg(t+e));Ae(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const t=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?pS(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=T8(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;const s=no(t[i],this);u4(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){const i=this._getBlockTag(t.blockTag);u4(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,wp)?(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,wS).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*Y7e+c),new tB(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Hu(n.url),s=await n.processFunc(t,this,i);return new tB(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return u4(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,mS).call(this,rt(this,Pr,gS).call(this,t,n,e.enableCcipRead?0:-1))}async getBalance(e,t){return qt(await rt(this,Pr,f3).call(this,{method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return Sr(await rt(this,Pr,f3).call(this,{method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return Ft(await rt(this,Pr,f3).call(this,{method:"getCode"},e,t))}async getStorage(e,t,n){const i=qt(t,"position");return Ft(await rt(this,Pr,f3).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=S8.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,wS).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);u4(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 k8.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=aS(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await k8.getEnsAddress(this),s=await new cm(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===Kv)return null;const a=await new cm(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=O2(this,gy)._++,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:j7()})}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 N8(e.type);case"block":{const t=new q7e(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new K7e(this,e.type);case"event":return new WT(this,e.filter);case"transaction":return new Z7e(this,e.hash);case"orphan":return new G7e(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,Y4).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,Y4).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,p3).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 fz(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,p3).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,p3).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,p3).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,Y4).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,zm)}destroy(){this.removeAllListeners();for(const e of ee(this,rc).keys())this._clearTimeout(e);de(this,zm,!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,Hh,-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=j7()-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=j7(),setTimeout(e.func,t)}}}}Cs=new WeakMap,_f=new WeakMap,Ss=new WeakMap,zm=new WeakMap,ia=new WeakMap,wp=new WeakMap,xf=new WeakMap,Hh=new WeakMap,gy=new WeakMap,rc=new WeakMap,Vm=new WeakMap,qm=new WeakMap,Pr=new WeakSet,Jo=async function(e){const t=ee(this,qm).cacheTimeout;if(t<0)return await this._perform(e);const n=Z4(e.method,e);let i=ee(this,xf).get(n);return i||(i=this._perform(e),ee(this,xf).set(n,i),setTimeout(()=>{ee(this,xf).get(n)===i&&ee(this,xf).delete(n)},t)),await i},gS=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=s9e(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,i9e([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:h});try{const f=await rt(this,Pr,gS).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}},mS=async function(e){const{value:t}=await Ks({network:this.getNetwork(),value:e});return t},f3=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,mS).call(this,rt(this,Pr,Jo).call(this,Object.assign(e,{address:i,blockTag:s})))},wS=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})},p3=async function(e,t){let n=await F7(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await F7({orphan:"drop-log",log:t[0]},this)),ee(this,Cs).get(n.tag)||null},Y4=async function(e){const t=await F7(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 t9e(r,e){try{const t=vS(r,e);if(t)return v8(t)}catch{}return null}function vS(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 lB(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 r9e(r){if(r.length%32===0)return r;const e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}const n9e=new Uint8Array([]);function i9e(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(uB,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 dg(r,e){if(r.provider)return r.provider;Ze(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function hB(r,e){let t=T8(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 o9e{constructor(e){Oe(this,"provider");tr(this,{provider:e||null})}async getNonce(e){return dg(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await hB(this,e)}async populateTransaction(e){const t=dg(this,"populateTransaction"),n=await hB(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 dg(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return dg(this,"call").call(await this.populateCall(e))}async resolveName(e){return await dg(this,"resolveName").resolveName(e)}async sendTransaction(e){const t=dg(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=S8.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}}const dB=new Set;function a9e(r){dB.has(r)||(dB.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 c9e(r){return JSON.parse(JSON.stringify(r))}var qs,eu,vp,Af,yp,Km,Zf,yS,bS;class eq{constructor(e){Le(this,Zf);Le(this,qs);Le(this,eu);Le(this,vp);Le(this,Af);Le(this,yp);Le(this,Km);de(this,qs,e),de(this,eu,null),de(this,vp,rt(this,Zf,yS).bind(this)),de(this,Af,!1),de(this,yp,null),de(this,Km,!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,Af)||(de(this,Af,!0),rt(this,Zf,yS).call(this,-2))}stop(){ee(this,Af)&&(de(this,Af,!1),de(this,Km,!0),rt(this,Zf,bS).call(this),ee(this,qs).off("block",ee(this,vp)))}pause(e){e&&rt(this,Zf,bS).call(this),ee(this,qs).off("block",ee(this,vp))}resume(){this.start()}}qs=new WeakMap,eu=new WeakMap,vp=new WeakMap,Af=new WeakMap,yp=new WeakMap,Km=new WeakMap,Zf=new WeakSet,yS=async function(e){try{ee(this,eu)==null&&de(this,eu,this._subscribe(ee(this,qs)));let t=null;try{t=await ee(this,eu)}catch(s){if(!ks(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){de(this,eu,null),ee(this,qs)._recoverSubscriber(this,this._recover(ee(this,qs)));return}const n=await ee(this,qs).getNetwork();if(ee(this,yp)||de(this,yp,n),ee(this,yp).chainId!==n.chainId)throw new Error("chaid changed");if(ee(this,Km))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,vp))},bS=function(){const e=ee(this,eu);e&&(de(this,eu,null),e.then(t=>{ee(this,qs).destroyed||ee(this,qs).send("eth_uninstallFilter",[t])}))};var bp;class l9e extends eq{constructor(t,n){super(t);Le(this,bp);de(this,bp,c9e(n))}_recover(t){return new WT(t,ee(this,bp))}async _subscribe(t){return await t.send("eth_newFilter",[ee(this,bp)])}async _emitResults(t,n){for(const i of n)t.emit(ee(this,bp),t._wrapLog(i,t._network))}}bp=new WeakMap;class u9e extends eq{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const n of t)e.emit("pending",n)}}const h9e="bigint,boolean,function,number,string,symbol".split(/,/g);function Q4(r){if(r==null||h9e.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(Q4);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 d9e(r){return new Promise(e=>{setTimeout(e,r)})}function fg(r){return r&&r.toLowerCase()}function fB(r){return r&&typeof r.pollingInterval=="number"}const tq={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class lm extends o9e{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=Q4(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=Q4(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"?Eu(t):t;return await this.provider.send("personal_sign",[Ft(n),this.address.toLowerCase()])}async signTypedData(t,n,i){const s=Q4(i),o=await I8.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(I8.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"?Eu(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ft(n)])}}var _p,Gm,Wh,tu,qc,nc,ko,my,_S;class rq extends e9e{constructor(t,n){super(t,n);Le(this,my);Le(this,_p);Le(this,Gm);Le(this,Wh);Le(this,tu);Le(this,qc);Le(this,nc);Le(this,ko);de(this,Gm,1),de(this,_p,Object.assign({},tq,n||{})),de(this,Wh,[]),de(this,tu,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,nl.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,_p)[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=nl.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:O2(this,Gm)._++,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 nl.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 d9e(1e3)}rt(this,my,_S).call(this)})())}async _waitUntilReady(){if(ee(this,qc)!=null)return await ee(this,qc).promise}_getSubscriber(t){return t.type==="pending"?new u9e(this):t.type==="event"?this._getOption("polling")?new WT(this,t.filter):new l9e(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new N8("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]=Dg(qt(t[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{t[i]!=null&&(n[i]=Ft(t[i]))}),t.accessList&&(n.accessList=M1(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:[fg(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[fg(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[fg(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[fg(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(fg):t.filter.address=fg(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=xS(s),l=ey.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(f9e(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=O2(this,Gm)._++,s=new Promise((o,a)=>{ee(this,Wh).push({resolve:o,reject:a,payload:{method:t,params:n,id:i,jsonrpc:"2.0"}})});return rt(this,my,_S).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 lm(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 lm(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new lm(this,n))}destroy(){ee(this,tu)&&(clearTimeout(ee(this,tu)),de(this,tu,null));for(const{payload:t,reject:n}of ee(this,Wh))n(jn("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));de(this,Wh,[]),super.destroy()}}_p=new WeakMap,Gm=new WeakMap,Wh=new WeakMap,tu=new WeakMap,qc=new WeakMap,nc=new WeakMap,ko=new WeakMap,my=new WeakSet,_S=function(){if(ee(this,tu))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");de(this,tu,setTimeout(()=>{de(this,tu,null);const n=ee(this,Wh);for(de(this,Wh,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==ee(this,_p).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>ee(this,_p).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 Ef;class nq extends rq{constructor(t,n){super(t,n);Le(this,Ef);let i=this._getOption("pollingInterval");i==null&&(i=tq.pollingInterval),de(this,Ef,i)}_getSubscriber(t){const n=super._getSubscriber(t);return fB(n)&&(n.pollingInterval=ee(this,Ef)),n}get pollingInterval(){return ee(this,Ef)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");de(this,Ef,t),this._forEachSubscriber(n=>{fB(n)&&(n.pollingInterval=ee(this,Ef))})}}Ef=new WeakMap;var Zm;class iq extends nq{constructor(t,n,i){t==null&&(t="http://localhost:8545");super(n,i);Le(this,Zm);typeof t=="string"?de(this,Zm,new Hu(t)):de(this,Zm,t.clone())}_getConnection(){return ee(this,Zm).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}}Zm=new WeakMap;function xS(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=xS(r[e]);if(t)return t}return null}if(typeof r=="string")try{return xS(JSON.parse(r))}catch{}return null}function AS(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(const t in r)AS(r[t],e);if(typeof r=="string")try{return AS(JSON.parse(r),e)}catch{}}}function f9e(r){const e=[];return AS(r,e),e}function p9e(){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 g9e=p9e().WebSocket;var ru,wy,Cf,xp,Sf;class zT{constructor(e,t){Le(this,ru);Le(this,wy);Le(this,Cf);Le(this,xp);Le(this,Sf);de(this,ru,e),de(this,wy,JSON.stringify(t)),de(this,Cf,null),de(this,xp,null),de(this,Sf,null)}get filter(){return JSON.parse(ee(this,wy))}start(){de(this,Cf,ee(this,ru).send("eth_subscribe",this.filter).then(e=>(ee(this,ru)._register(e,this),e)))}stop(){ee(this,Cf).then(e=>{ee(this,ru).destroyed||ee(this,ru).send("eth_unsubscribe",[e])}),de(this,Cf,null)}pause(e){Ze(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),de(this,xp,!!e)}resume(){de(this,xp,null)}_handleMessage(e){if(ee(this,Cf)!=null&&ee(this,xp)===null){let t=ee(this,Sf);t==null?t=this._emit(ee(this,ru),e):t=t.then(async()=>{await this._emit(ee(this,ru),e)}),de(this,Sf,t.then(()=>{ee(this,Sf)===t&&de(this,Sf,null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}ru=new WeakMap,wy=new WeakMap,Cf=new WeakMap,xp=new WeakMap,Sf=new WeakMap;class m9e extends zT{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}class w9e extends zT{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}var vy;class v9e extends zT{constructor(t,n){super(t,["logs",n]);Le(this,vy);de(this,vy,JSON.stringify(n))}get logFilter(){return JSON.parse(ee(this,vy))}async _emit(t,n){t.emit(this.logFilter,t._wrapLog(n,t._network))}}vy=new WeakMap;var Ap,Ym,If;class y9e extends rq{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,Ap);Le(this,Ym);Le(this,If);de(this,Ap,new Map),de(this,Ym,new Map),de(this,If,new Map)}_getSubscriber(t){switch(t.type){case"close":return new N8("close");case"block":return new m9e(this);case"pending":return new w9e(this);case"event":return new v9e(this,t.filter);case"orphan":if(t.filter.orphan==="drop-log")return new N8("drop-log")}return super._getSubscriber(t)}_register(t,n){ee(this,Ym).set(t,n);const i=ee(this,If).get(t);if(i){for(const s of i)n._handleMessage(s);ee(this,If).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,Ap).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,Ap).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,Ap).delete(n.id),i.resolve(n)}else if(n&&n.method==="eth_subscription"){const i=n.params.subscription,s=ee(this,Ym).get(i);if(s)s._handleMessage(n.params.result);else{let o=ee(this,If).get(i);o==null&&(o=[],ee(this,If).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")}}Ap=new WeakMap,Ym=new WeakMap,If=new WeakMap;var Ep,Kc;class b9e extends y9e{constructor(t,n,i){super(n,i);Le(this,Ep);Le(this,Kc);typeof t=="string"?(de(this,Ep,()=>new g9e(t)),de(this,Kc,ee(this,Ep).call(this))):typeof t=="function"?(de(this,Ep,t),de(this,Kc,t())):(de(this,Ep,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()}}Ep=new WeakMap,Kc=new WeakMap;const g3="84842078b09946638c03157f83405213";function _9e(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 x9e extends b9e{constructor(t,n){const i=new Np(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===g3}}class Np extends iq{constructor(t,n,i){t==null&&(t="mainnet");const s=nl.from(t);n==null&&(n=g3),i==null&&(i=null);const o=Np.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 Np(t,this.projectId,this.projectSecret)}catch{}return super._getProvider(t)}isCommunityResource(){return this.projectId===g3}static getWebSocketProvider(t,n){return new x9e(t,n)}static getRequest(t,n,i){n==null&&(n=g3),i==null&&(i=null);const s=new Hu(`https://${_9e(t.name)}/v3/${n}`);return s.allowGzip=!0,i&&s.setCredentials("",i),n===g3&&(s.retryFunc=async(o,a,c)=>(a9e("InfuraProvider"),!0)),s}}var Qm;class H7 extends nq{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,Qm);de(this,Qm,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,Qm).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,Qm).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(t)}}Qm=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){W7()&&localStorage.setItem(r,JSON.stringify(e))},getItem(r){if(W7()){const e=localStorage.getItem(r);if(e)try{return JSON.parse(e)}catch{return null}}return null},removeItem(r){W7()&&localStorage.removeItem(r)}};function W7(){return typeof window<"u"&&typeof localStorage<"u"}class A9e{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=nP.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=nP.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=C6e(((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-DvOqXmJq.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:[...RW],...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-DvOqXmJq.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(Eu(l));return await h.request({method:"personal_sign",params:[f,this.getAddress()]})},parseUnits:(l,h)=>sxe(l,h),formatUnits:(l,h)=>xz(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 H7(f,h);return await new lm(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 H7(f,h),L=await(await new lm(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 H7(f,h),A=new lm(y,v),M=new cm(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 Np("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 Np("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 b6e.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 Np("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 iq(i.rpcUrl,{chainId:t,name:i.name});if(s){const o=await s.getBalance(e),a=oxe(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 uae(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 sq={},ry={},cx={};Object.defineProperty(cx,"__esModule",{value:!0});cx.walletLogo=void 0;const E9e=(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 `}};cx.walletLogo=E9e;var lx={},oq={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"}})(VT);Object.defineProperty(ux,"__esModule",{value:!0});ux.standardErrors=void 0;const ns=vd,aq=VT;ux.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=>pg(ns.standardErrorCodes.provider.userRejectedRequest,r),unauthorized:r=>pg(ns.standardErrorCodes.provider.unauthorized,r),unsupportedMethod:r=>pg(ns.standardErrorCodes.provider.unsupportedMethod,r),disconnected:r=>pg(ns.standardErrorCodes.provider.disconnected,r),chainDisconnected:r=>pg(ns.standardErrorCodes.provider.chainDisconnected,r),unsupportedChain:r=>pg(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 uq(e,t,n)}}};function za(r,e){const[t,n]=cq(e);return new lq(r,t||(0,aq.getMessageFromCode)(r),n)}function pg(r,e){const[t,n]=cq(e);return new uq(r,t||(0,aq.getMessageFromCode)(r),n)}function cq(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 lq 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 uq extends lq{constructor(e,t,n){if(!S9e(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function S9e(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=vd;Object.defineProperty(r,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});var t=ux;Object.defineProperty(r,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}})})(eh);var hx={},h2={};Object.defineProperty(h2,"__esModule",{value:!0});h2.isErrorResponse=void 0;function I9e(r){return r.errorMessage!==void 0}h2.isErrorResponse=I9e;var D1={};Object.defineProperty(D1,"__esModule",{value:!0});D1.LIB_VERSION=void 0;D1.LIB_VERSION="4.0.3";Object.defineProperty(hx,"__esModule",{value:!0});hx.serializeError=void 0;const T9e=h2,R9e=D1,k9e=vd,N9e=VT;function P9e(r,e){const t=(0,N9e.serialize)(O9e(r),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",R9e.LIB_VERSION),n.searchParams.set("code",t.code.toString());const i=M9e(t.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:n.href})}hx.serializeError=P9e;function O9e(r){return typeof r=="string"?{message:r,code:k9e.standardErrorCodes.rpc.internal}:(0,T9e.isErrorResponse)(r)?Object.assign(Object.assign({},r),{message:r.errorMessage,code:r.errorCode,data:{method:r.method}}):r}function M9e(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 fb(){return r=>r}Ts.OpaqueType=fb;Ts.HexString=fb();Ts.AddressString=fb();Ts.BigIntString=fb();function D9e(r){return Math.floor(r)}Ts.IntNumber=D9e;Ts.RegExpString=fb();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 $1=eh,uc=Ts,hq=/^[0-9]*$/,dq=/^[a-f0-9]*$/;function $9e(r){return fq(crypto.getRandomValues(new Uint8Array(r)))}Jt.randomBytesHex=$9e;function fq(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")}Jt.uint8ArrayToHex=fq;function B9e(r){return new Uint8Array(r.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Jt.hexStringToUint8Array=B9e;function L9e(r,e=!1){const t=r.toString("hex");return(0,uc.HexString)(e?`0x${t}`:t)}Jt.hexStringFromBuffer=L9e;function U9e(r){return(0,uc.BigIntString)(r.toString(10))}Jt.bigIntStringFromBigInt=U9e;function F9e(r){return(0,uc.IntNumber)(Number(BigInt(gb(r,!0))))}Jt.intNumberFromHexString=F9e;function j9e(r){return(0,uc.HexString)(`0x${BigInt(r).toString(16)}`)}Jt.hexStringFromIntNumber=j9e;function qT(r){return r.startsWith("0x")||r.startsWith("0X")}Jt.has0xPrefix=qT;function dx(r){return qT(r)?r.slice(2):r}Jt.strip0x=dx;function pq(r){return qT(r)?`0x${r.slice(2)}`:`0x${r}`}Jt.prepend0x=pq;function pb(r){if(typeof r!="string")return!1;const e=dx(r).toLowerCase();return dq.test(e)}Jt.isHexString=pb;function gq(r,e=!1){if(typeof r=="string"){const t=dx(r).toLowerCase();if(dq.test(t))return(0,uc.HexString)(e?`0x${t}`:t)}throw $1.standardErrors.rpc.invalidParams(`"${String(r)}" is not a hexadecimal string`)}Jt.ensureHexString=gq;function gb(r,e=!1){let t=gq(r,!1);return t.length%2===1&&(t=(0,uc.HexString)(`0${t}`)),e?(0,uc.HexString)(`0x${t}`):t}Jt.ensureEvenLengthHexString=gb;function H9e(r){if(typeof r=="string"){const e=dx(r).toLowerCase();if(pb(e)&&e.length===40)return(0,uc.AddressString)(pq(e))}throw $1.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(r)}`)}Jt.ensureAddressString=H9e;function W9e(r){if(Buffer.isBuffer(r))return r;if(typeof r=="string"){if(pb(r)){const e=gb(r,!1);return Buffer.from(e,"hex")}return Buffer.from(r,"utf8")}throw $1.standardErrors.rpc.invalidParams(`Not binary data: ${String(r)}`)}Jt.ensureBuffer=W9e;function mq(r){if(typeof r=="number"&&Number.isInteger(r))return(0,uc.IntNumber)(r);if(typeof r=="string"){if(hq.test(r))return(0,uc.IntNumber)(Number(r));if(pb(r))return(0,uc.IntNumber)(Number(BigInt(gb(r,!0))))}throw $1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureIntNumber=mq;function z9e(r){if(r instanceof RegExp)return(0,uc.RegExpString)(r.toString());throw $1.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(r)}`)}Jt.ensureRegExpString=z9e;function V9e(r){if(r!==null&&(typeof r=="bigint"||wq(r)))return BigInt(r.toString(10));if(typeof r=="number")return BigInt(mq(r));if(typeof r=="string"){if(hq.test(r))return BigInt(r);if(pb(r))return BigInt(gb(r,!0))}throw $1.standardErrors.rpc.invalidParams(`Not an integer: ${String(r)}`)}Jt.ensureBigInt=V9e;function q9e(r){if(typeof r=="string")return JSON.parse(r);if(typeof r=="object")return r;throw $1.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(r)}`)}Jt.ensureParsedJSONObject=q9e;function wq(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=wq;function K9e(r,e){return Array.from({length:e-r},(t,n)=>r+n)}Jt.range=K9e;function G9e(){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=G9e;function Z9e(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}Jt.areAddressArraysEqual=Z9e;var hu={},fx={},px={},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 vq=Jt;async function Y9e(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}Oi.generateKeyPair=Y9e;async function Q9e(r,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},r,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}Oi.deriveSharedSecret=Q9e;async function yq(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=yq;async function bq(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=bq;function _q(r){switch(r){case"public":return"spki";case"private":return"pkcs8"}}async function J9e(r,e){const t=_q(r),n=await crypto.subtle.exportKey(t,e);return(0,vq.uint8ArrayToHex)(new Uint8Array(n))}Oi.exportKeyToHexString=J9e;async function X9e(r,e){const t=_q(r),n=(0,vq.hexStringToUint8Array)(e).buffer;return await crypto.subtle.importKey(t,n,{name:"ECDH",namedCurve:"P-256"},!0,r==="private"?["deriveKey"]:[])}Oi.importKeyFromHexString=X9e;async function eCe(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 yq(e,t)}Oi.encryptContent=eCe;async function tCe(r,e){return JSON.parse(await bq(e,r))}Oi.decryptContent=tCe;var th={};Object.defineProperty(th,"__esModule",{value:!0});th.ScopedLocalStorage=void 0;class P8{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 P8("CBWSDK").clear(),new P8("walletlink").clear()}}th.ScopedLocalStorage=P8;Object.defineProperty(px,"__esModule",{value:!0});px.SCWKeyManager=void 0;const h4=Oi,rCe=th,z7={storageKey:"ownPrivateKey",keyType:"private"},V7={storageKey:"ownPublicKey",keyType:"public"},q7={storageKey:"peerPublicKey",keyType:"public"};class nCe{constructor(){this.storage=new rCe.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(q7,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(V7.storageKey),this.storage.removeItem(z7.storageKey),this.storage.removeItem(q7.storageKey)}async generateKeyPair(){const e=await(0,h4.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(z7,e.privateKey),await this.storeKey(V7,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(z7)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(V7)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(q7)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,h4.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,h4.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const n=await(0,h4.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,n)}}px.SCWKeyManager=nCe;var gx={};Object.defineProperty(gx,"__esModule",{value:!0});gx.SCWStateManager=void 0;const iCe=th,pB="accounts",gB="activeChain",mB="availableChains",wB="walletCapabilities";class sCe{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,n;this.storage=new iCe.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(mB),this._walletCapabilities=this.loadItemFromStorage(wB);const i=this.loadItemFromStorage(pB),s=this.loadItemFromStorage(gB);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(pB,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(gB,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(mB,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(wB,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()}}gx.SCWStateManager=sCe;Object.defineProperty(fx,"__esModule",{value:!0});fx.SCWSigner=void 0;const oCe=px,aCe=gx,d4=eh,vB=Jt,f4=Oi;class cCe{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new oCe.SCWKeyManager,this.stateManager=new aCe.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,f4.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 d4.standardErrors.rpc.invalidParams();const i=(0,vB.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(i)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw d4.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 d4.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,f4.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,f4.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 d4.standardErrors.provider.unauthorized("Invalid session");return(0,f4.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,vB.ensureIntNumber)(c[0].chainId);this.stateManager.switchChain(l);break}}}}fx.SCWSigner=cCe;var mx={},ES={exports:{}},xq=mo.EventEmitter,K7,yB;function lCe(){if(yB)return K7;yB=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}(),K7}function uCe(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(CS,this,r)):process.nextTick(CS,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(J4,t):(t._writableState.errorEmitted=!0,process.nextTick(bB,t,s)):process.nextTick(bB,t,s):e?(process.nextTick(J4,t),e(s)):process.nextTick(J4,t)}),this)}function bB(r,e){CS(r,e),J4(r)}function J4(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function hCe(){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 CS(r,e){r.emit("error",e)}function dCe(r,e){var t=r._readableState,n=r._writableState;t&&t.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}var Aq={destroy:uCe,undestroy:hCe,errorOrDestroy:dCe},B1={};function fCe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}var Eq={};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){fCe(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,Eq[r]=i}function _B(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 pCe(r,e,t){return r.substr(0,e.length)===e}function gCe(r,e,t){return(t===void 0||t>r.length)&&(t=r.length),r.substring(t-e.length,t)===e}function mCe(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"&&pCe(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(gCe(r," argument"))i="The ".concat(r," ").concat(n," ").concat(_B(e,"type"));else{var s=mCe(r,".")?"property":"argument";i='The "'.concat(r,'" ').concat(s," ").concat(n," ").concat(_B(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");B1.codes=Eq;var wCe=B1.codes.ERR_INVALID_OPT_VALUE;function vCe(r,e,t){return r.highWaterMark!=null?r.highWaterMark:e?r[t]:null}function yCe(r,e,t,n){var i=vCe(e,n,t);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?t:"highWaterMark";throw new wCe(s,i)}return Math.floor(i)}return r.objectMode?16:16*1024}var Cq={getHighWaterMark:yCe},SS={exports:{}};typeof Object.create=="function"?SS.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:SS.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 Sl=SS.exports,bCe=_Ce;function _Ce(r,e){if(G7("noDeprecation"))return r;var t=!1;function n(){if(!t){if(G7("throwDeprecation"))throw new Error(e);G7("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}return n}function G7(r){try{if(!Yr.localStorage)return!1}catch{return!1}var e=Yr.localStorage[r];return e==null?!1:String(e).toLowerCase()==="true"}var Z7,xB;function Sq(){if(xB)return Z7;xB=1,Z7=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:bCe},n=xq,i=zw.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=Aq,l=Cq,h=l.getHighWaterMark,f=B1.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;Sl(T,n);function q(){}function Y(Z,k,W){e=e||Fw(),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||Fw();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=zw,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)}})(IS,IS.exports);var f0=IS.exports,EB;function CB(){if(EB)return Q7;EB=1;var r=f0.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}Q7.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 Q7}var SB=B1.codes.ERR_STREAM_PREMATURE_CLOSE;function xCe(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=SCe()),F(V,D,G)});function S(D,G){for(var z=0,K=D.length;z0;return LCe(o,c,l,function(h){i||(i=h),h&&s.forEach(PB),!c&&(s.forEach(PB),n(i))})});return e.reduce(UCe)}var HCe=jCe;(function(r,e){e=r.exports=Tq(),e.Stream=e,e.Readable=e,e.Writable=Sq(),e.Duplex=Fw(),e.Transform=Rq,e.PassThrough=OCe,e.finished=KT,e.pipeline=HCe})(ES,ES.exports);var Pq=ES.exports;const{Transform:WCe}=Pq;var zCe=r=>class Oq extends WCe{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 Oq(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const{Transform:VCe}=Pq;var qCe=r=>class Mq extends VCe{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 Mq(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}};const KCe=zCe,GCe=qCe;var ZCe=function(r){const e=KCe(r),t=GCe(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)}}},Dq={};const OB=[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];Dq.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]^=OB[e*2],r[1]^=OB[e*2+1]}};const O8=Dq;function d2(){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}d2.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};d2.prototype.absorb=function(r){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(O8.p1600(this.state),this.count=0);return e};d2.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 YCe=d2,QCe=ZCe(YCe);const JCe=QCe;function $q(r){return Buffer.allocUnsafe(r).fill(0)}function XCe(r){return r.toString(2).length}function Bq(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=Wq(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(ql(r,e[s]));if(t==="dynamic"){var o=ql("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(r==="bytes")return e=new Buffer(e),i=Buffer.concat([ql("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=um(r),t<1||t>32)throw new Error("Invalid bytes width: "+t);return Gs.setLengthRight(e,32)}else if(r.startsWith("uint")){if(t=um(r),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=H0(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=um(r),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=H0(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=MB(r),n=H0(e),n<0)throw new Error("Supplied ufixed is negative");return ql("uint256",n*BigInt(2)**BigInt(t[1]))}else if(r.startsWith("fixed"))return t=MB(r),ql("int256",H0(e)*BigInt(2)**BigInt(t[1]))}throw new Error("Unsupported or invalid type: "+r)}function sSe(r){return r==="string"||r==="bytes"||Wq(r)==="dynamic"}function oSe(r){return r.lastIndexOf("]")===r.length-1}function aSe(r,e){var t=[],n=[],i=32*r.length;for(var s in r){var o=Hq(r[s]),a=e[s],c=ql(o,a);sSe(o)?(t.push(ql("uint256",i)),n.push(c),i+=c.length):t.push(c)}return Buffer.concat(t.concat(n))}function zq(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=um(o),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);n=H0(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=um(o),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);n=H0(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 cSe(r,e){return Gs.keccak(zq(r,e))}var lSe={rawEncode:aSe,solidityPack:zq,soliditySHA3:cSe};const Dc=jq,U3=lSe,Vq={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"]},r9={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(U3.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 U3.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 Vq.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 uSe={TYPED_MESSAGE_SCHEMA:Vq,TypedDataUtils:r9,hashForSignTypedDataLegacy:function(r){return hSe(r.data)},hashForSignTypedData_v3:function(r){return r9.hash(r.data,!1)},hashForSignTypedData_v4:function(r){return r9.hash(r.data)}};function hSe(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 U3.soliditySHA3(["bytes32","bytes32"],[U3.soliditySHA3(new Array(r.length).fill("string"),i),U3.soliditySHA3(n,t)])}var Cu={};Object.defineProperty(Cu,"__esModule",{value:!0});Cu.APP_VERSION_KEY=Cu.LOCAL_STORAGE_ADDRESSES_KEY=Cu.WALLET_USER_NAME_KEY=void 0;Cu.WALLET_USER_NAME_KEY="walletUsername";Cu.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Cu.APP_VERSION_KEY="AppVersion";var mb={};Object.defineProperty(mb,"__esModule",{value:!0});mb.RelayEventManager=void 0;const dSe=Jt;class fSe{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,dSe.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}mb.RelayEventManager=fSe;var bx={},_x={},xx={};Object.defineProperty(xx,"__esModule",{value:!0});xx.WalletLinkCipher=void 0;const p4=Jt;class pSe{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,p4.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,p4.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,p4.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,p4.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)}})()})}}xx.WalletLinkCipher=pSe;var Ax={};Object.defineProperty(Ax,"__esModule",{value:!0});Ax.WalletLinkHTTP=void 0;class gSe{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}`)}}Ax.WalletLinkHTTP=gSe;var jw={};Object.defineProperty(jw,"__esModule",{value:!0});jw.WalletLinkWebSocket=jw.ConnectionState=void 0;var Bg;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(Bg||(jw.ConnectionState=Bg={}));class mSe{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,Bg.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,Bg.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,Bg.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,Bg.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)}}jw.WalletLinkWebSocket=mSe;Object.defineProperty(_x,"__esModule",{value:!0});_x.WalletLinkConnection=void 0;const DB=Cu,wSe=xx,vSe=Ax,g4=jw,gg=Ts,$B=1e4,ySe=6e4;class bSe{constructor({session:e,linkAPIUrl:t,listener:n,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,gg.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(DB.WALLET_USER_NAME_KEY,o)},this.handleAppVersionUpdated=async o=>{this.handleMetadataUpdated(DB.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 wSe.WalletLinkCipher(e.secret),this.listener=n;const s=new g4.WalletLinkWebSocket(`${t}/rpc`,i);s.setConnectionStateListener(async o=>{let a=!1;switch(o){case g4.ConnectionState.DISCONNECTED:if(!this.destroyed){const c=async()=>{await new Promise(l=>setTimeout(l,5e3)),this.destroyed||s.connect().catch(()=>{c()})};c()}break;case g4.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),a=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},$B),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case g4.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 vSe.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,gg.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,gg.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>$B*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=ySe){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,gg.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,gg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,gg.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}_x.WalletLinkConnection=bSe;var Ex={},qq={exports:{}},Kq=f0.Buffer;function Cx(r,e){this._block=Kq.alloc(r),this._finalSize=e,this._blockSize=r,this._len=0}Cx.prototype.update=function(r,e){typeof r=="string"&&(e=e||"utf8",r=Kq.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};Cx.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var f2=Cx,_Se=Sl,Gq=f2,xSe=f0.Buffer,ASe=[1518500249,1859775393,-1894007588,-899497514],ESe=new Array(80);function wb(){this.init(),this._w=ESe,Gq.call(this,64,56)}_Se(wb,Gq);wb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function CSe(r){return r<<5|r>>>27}function SSe(r){return r<<30|r>>>2}function ISe(r,e,t,n){return r===0?e&t|~e&n:r===2?e&t|e&n|t&n:e^t^n}wb.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=CSe(t)+ISe(l,n,i,s)+o+e[c]+ASe[l]|0;o=s,s=i,i=SSe(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};wb.prototype._hash=function(){var r=xSe.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 TSe=wb,RSe=Sl,Zq=f2,kSe=f0.Buffer,NSe=[1518500249,1859775393,-1894007588,-899497514],PSe=new Array(80);function vb(){this.init(),this._w=PSe,Zq.call(this,64,56)}RSe(vb,Zq);vb.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function OSe(r){return r<<1|r>>>31}function MSe(r){return r<<5|r>>>27}function DSe(r){return r<<30|r>>>2}function $Se(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]=OSe(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),h=MSe(t)+$Se(l,n,i,s)+o+e[c]+NSe[l]|0;o=s,s=i,i=DSe(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=kSe.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 BSe=vb,LSe=Sl,Yq=f2,USe=f0.Buffer,FSe=[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],jSe=new Array(64);function yb(){this.init(),this._w=jSe,Yq.call(this,64,56)}LSe(yb,Yq);yb.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 HSe(r,e,t){return t^r&(e^t)}function WSe(r,e,t){return r&e|t&(r|e)}function zSe(r){return(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10)}function VSe(r){return(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7)}function qSe(r){return(r>>>7|r<<25)^(r>>>18|r<<14)^r>>>3}function KSe(r){return(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10}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=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]=KSe(e[h-2])+e[h-7]+qSe(e[h-15])+e[h-16]|0;for(var f=0;f<64;++f){var v=l+VSe(o)+HSe(o,a,c)+FSe[f]+e[f]|0,y=zSe(t)+WSe(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};yb.prototype._hash=function(){var r=USe.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 Qq=yb,GSe=Sl,ZSe=Qq,YSe=f2,QSe=f0.Buffer,JSe=new Array(64);function Sx(){this.init(),this._w=JSe,YSe.call(this,64,56)}GSe(Sx,ZSe);Sx.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};Sx.prototype._hash=function(){var r=QSe.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 XSe=Sx,eIe=Sl,Jq=f2,tIe=f0.Buffer,BB=[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],rIe=new Array(160);function bb(){this.init(),this._w=rIe,Jq.call(this,128,112)}eIe(bb,Jq);bb.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 LB(r,e,t){return t^r&(e^t)}function UB(r,e,t){return r&e|t&(r|e)}function FB(r,e){return(r>>>28|e<<4)^(e>>>2|r<<30)^(e>>>7|r<<25)}function jB(r,e){return(r>>>14|e<<18)^(r>>>18|e<<14)^(e>>>9|r<<23)}function nIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^r>>>7}function iIe(r,e){return(r>>>1|e<<31)^(r>>>8|e<<24)^(r>>>7|e<<25)}function sIe(r,e){return(r>>>19|e<<13)^(e>>>29|r<<3)^r>>>6}function oIe(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}bb.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=nIe(H,F),Y=iIe(F,H);H=e[P-2*2],F=e[P-2*2+1];var I=sIe(H,F),T=oIe(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=UB(t,n,i),E=UB(h,f,v),C=FB(t,h),B=FB(h,t),R=jB(o,A),w=jB(A,o),O=BB[m],pe=BB[m+1],be=LB(o,a,c),x=LB(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};bb.prototype._hash=function(){var r=tIe.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 Xq=bb,aIe=Sl,cIe=Xq,lIe=f2,uIe=f0.Buffer,hIe=new Array(160);function Ix(){this.init(),this._w=hIe,lIe.call(this,128,112)}aIe(Ix,cIe);Ix.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};Ix.prototype._hash=function(){var r=uIe.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 dIe=Ix,L1=qq.exports=function(e){e=e.toLowerCase();var t=L1[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};L1.sha=TSe;L1.sha1=BSe;L1.sha224=XSe;L1.sha256=Qq;L1.sha384=dIe;L1.sha512=Xq;var fIe=qq.exports;Object.defineProperty(Ex,"__esModule",{value:!0});Ex.WalletLinkSession=void 0;const pIe=fIe,HB=Jt,WB="session:id",zB="session:secret",VB="session:linked";class GT{constructor(e,t,n,i){this._storage=e,this._id=t||(0,HB.randomBytesHex)(16),this._secret=n||(0,HB.randomBytesHex)(32),this._key=new pIe.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(WB),n=e.getItem(VB),i=e.getItem(zB);return t&&i?new GT(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(WB,this._id),this._storage.setItem(zB,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(VB,this._linked?"1":"0")}}Ex.WalletLinkSession=GT;var da={};Object.defineProperty(da,"__esModule",{value:!0});da.isDarkMode=da.isMobileWeb=da.getLocation=da.createQrUrl=void 0;function gIe(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=gIe;function mIe(){try{return window.frameElement!==null}catch{return!1}}function wIe(){try{return mIe()&&window.top?window.top.location:window.location}catch{return window.location}}da.getLocation=wIe;function vIe(){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=vIe;function yIe(){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=yIe;var Tx={},_b={},ZT={};Object.defineProperty(ZT,"__esModule",{value:!0});ZT.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 bIe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_b,"__esModule",{value:!0});_b.injectCssReset=void 0;const _Ie=bIe(ZT);function xIe(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(_Ie.default)),document.documentElement.appendChild(r)}_b.injectCssReset=xIe;var YT={};function eK(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?xb.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 F3(r,o,n,i,null)}function F3(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??++rK,__i:-1,__u:0};return i==null&&Wn.vnode!=null&&Wn.vnode(s),s}function CIe(){return{current:null}}function Ab(r){return r.children}function j3(r,e){this.props=r,this.context=e}function d1(r,e){if(e==null)return r.__?d1(r.__,r.__i+1):null;for(var t;ee&&W0.sort(TS));M8.__r=0}function lK(r,e,t,n,i,s,o,a,c,l,h){var f,v,y,A,M,$=n&&n.__k||oK,L=e.length;for(t.__d=c,SIe(t,e,$),c=t.__d,f=0;f0?F3(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=r,i.__b=r.__b+1,a=IIe(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?xb.call(arguments,2):t),F3(r.type,a,n||r.key,i||r.ref,null)}function NIe(r,e){var t={__c:e="__cC"+sK++,__: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,PS(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}xb=oK.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}},rK=0,nK=function(r){return r!=null&&r.constructor==null},j3.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Jh({},this.state),typeof r=="function"&&(r=r(Jh({},t),this.props)),r&&Jh(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),PS(this))},j3.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),PS(this))},j3.prototype.render=Ab,W0=[],iK=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,TS=function(r,e){return r.__v.__b-e.__v.__b},M8.__r=0,QT=0,RS=ZB(!1),kS=ZB(!0),sK=0;const PIe=Object.freeze(Object.defineProperty({__proto__:null,Component:j3,Fragment:Ab,cloneElement:kIe,createContext:NIe,createElement:NS,createRef:CIe,h:NS,hydrate:pK,get isValidElement(){return nK},get options(){return Wn},render:fK,toChildArray:hK},Symbol.toStringTag,{value:"Module"})),gK=Ay(PIe);var bd,In,n9,YB,Hw=0,mK=[],Qn=Wn,QB=Qn.__b,JB=Qn.__r,XB=Qn.diffed,eL=Qn.__c,tL=Qn.unmount,rL=Qn.__;function U1(r,e){Qn.__h&&Qn.__h(In,r,Hw||e),Hw=0;var t=In.__H||(In.__H={__:[],__h:[]});return r>=t.__.length&&t.__.push({}),t.__[r]}function wK(r){return Hw=1,vK(bK,r)}function vK(r,e,t){var n=U1(bd++,2);if(n.t=r,!n.__c&&(n.__=[t?t(e):bK(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 OIe(r,e){var t=U1(bd++,3);!Qn.__s&&tR(t.__H,e)&&(t.__=r,t.i=e,In.__H.__h.push(t))}function yK(r,e){var t=U1(bd++,4);!Qn.__s&&tR(t.__H,e)&&(t.__=r,t.i=e,In.__h.push(t))}function MIe(r){return Hw=5,eR(function(){return{current:r}},[])}function DIe(r,e,t){Hw=6,yK(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 eR(r,e){var t=U1(bd++,7);return tR(t.__H,e)&&(t.__=r(),t.__H=e,t.__h=r),t.__}function $Ie(r,e){return Hw=8,eR(function(){return r},e)}function BIe(r){var e=In.context[r.__c],t=U1(bd++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(In)),e.props.value):r.__}function LIe(r,e){Qn.useDebugValue&&Qn.useDebugValue(e?e(r):r)}function UIe(r){var e=U1(bd++,10),t=wK();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 FIe(){var r=U1(bd++,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 jIe(){for(var r;r=mK.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(X4),r.__H.__h.forEach(MS),r.__H.__h=[]}catch(e){r.__H.__h=[],Qn.__e(e,r.__v)}}Qn.__b=function(r){In=null,QB&&QB(r)},Qn.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),rL&&rL(r,e)},Qn.__r=function(r){JB&&JB(r),bd=0;var e=(In=r.__c).__H;e&&(n9===In?(e.__h=[],In.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(X4),e.__h.forEach(MS),e.__h=[],bd=0)),n9=In},Qn.diffed=function(r){XB&&XB(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(mK.push(e)!==1&&YB===Qn.requestAnimationFrame||((YB=Qn.requestAnimationFrame)||HIe)(jIe)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),n9=In=null},Qn.__c=function(r,e){e.some(function(t){try{t.__h.forEach(X4),t.__h=t.__h.filter(function(n){return!n.__||MS(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Qn.__e(n,t.__v)}}),eL&&eL(r,e)},Qn.unmount=function(r){tL&&tL(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{X4(n)}catch(i){e=i}}),t.__H=void 0,e&&Qn.__e(e,t.__v))};var nL=typeof requestAnimationFrame=="function";function HIe(r){var e,t=function(){clearTimeout(n),nL&&cancelAnimationFrame(e),setTimeout(r)},n=setTimeout(t,100);nL&&(e=requestAnimationFrame(t))}function X4(r){var e=In,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),In=e}function MS(r){var e=In;r.__c=r.__(),In=e}function tR(r,e){return!r||r.length!==e.length||e.some(function(t,n){return t!==r[n]})}function bK(r,e){return typeof e=="function"?e(r):e}const WIe=Object.freeze(Object.defineProperty({__proto__:null,useCallback:$Ie,useContext:BIe,useDebugValue:LIe,useEffect:OIe,useErrorBoundary:UIe,useId:FIe,useImperativeHandle:DIe,useLayoutEffect:yK,useMemo:eR,useReducer:vK,useRef:MIe,useState:wK},Symbol.toStringTag,{value:"Module"})),zIe=Ay(WIe);var rR={};Object.defineProperty(rR,"__esModule",{value:!0});rR.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(tK),n=gK,i=zIe,s=da,o=e(rR),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})(YT);Object.defineProperty(Tx,"__esModule",{value:!0});Tx.WalletLinkRelayUI=void 0;const VIe=_b,qIe=YT;class KIe{constructor(){this.attached=!1,this.snackbar=new qIe.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,VIe.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)}}Tx.WalletLinkRelayUI=KIe;var kx={},Nx={},nR={};Object.defineProperty(nR,"__esModule",{value:!0});nR.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 _K=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nx,"__esModule",{value:!0});Nx.RedirectDialog=void 0;const GIe=_K(tK),Kl=gK,ZIe=_b,YIe=YT,QIe=da,JIe=_K(nR);class XIe{constructor(){this.root=null,this.darkMode=(0,QIe.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,ZIe.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,Kl.render)(null,this.root),e&&(0,Kl.render)((0,Kl.h)(eTe,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}Nx.RedirectDialog=XIe;const eTe=({title:r,buttonText:e,darkMode:t,onButtonClick:n,onDismiss:i})=>{const s=t?"dark":"light";return(0,Kl.h)(YIe.SnackbarContainer,{darkMode:t},(0,Kl.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,Kl.h)("style",null,JIe.default),(0,Kl.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,Kl.h)("div",{class:(0,GIe.default)("-cbwsdk-redirect-dialog-box",s)},(0,Kl.h)("p",null,r),(0,Kl.h)("button",{onClick:n},e))))};var Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.CBW_MOBILE_DEEPLINK_URL=Su.WALLETLINK_URL=Su.CB_KEYS_URL=void 0;Su.CB_KEYS_URL="https://keys.coinbase.com/connect";Su.WALLETLINK_URL="https://www.walletlink.org";Su.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink";Object.defineProperty(kx,"__esModule",{value:!0});kx.WLMobileRelayUI=void 0;const tTe=Nx,rTe=da,nTe=Su;class iTe{constructor(){this.attached=!1,this.redirectDialog=new tTe.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(nTe.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,rTe.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()}}}kx.WLMobileRelayUI=iTe;Object.defineProperty(bx,"__esModule",{value:!0});bx.WalletLinkRelay=void 0;const sTe=_x,oTe=Cu,aTe=mb,i9=Ex,mg=h2,cTe=da,lTe=Tx,iL=kx,uTe=eh,ui=Jt,hTe=th;class Nh{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,cTe.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=s=>{this.isLinked=s;const o=this.storage.getItem(oTe.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]),Nh.accountRequestCallbackIds.size>0&&(Array.from(Nh.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}))}),Nh.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 aTe.RelayEventManager,this.ui=n}subscribe(){const e=i9.WalletLinkSession.load(this.storage)||new i9.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,n=new sTe.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new iL.WLMobileRelayUI:new lTe.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=i9.WalletLinkSession.load(this.storage);(e==null?void 0:e.id)===this._session.id&&hTe.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,mg.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 iL.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"){Nh.accountRequestCallbackIds.forEach(n=>this.invokeCallback(Object.assign(Object.assign({},e),{id:n}))),Nh.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,mg.isErrorResponse)(s))return i(new Error(s.errorMessage));n(s)}),Nh.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,mg.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,mg.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,mg.isErrorResponse)(a)&&a.errorCode)return o(uTe.standardErrors.provider.custom({code:a.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,mg.isErrorResponse)(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(i,n)})}}bx.WalletLinkRelay=Nh;Nh.accountRequestCallbackIds=new Set;var dTe=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mx,"__esModule",{value:!0});mx.WalletLinkSigner=void 0;const s9=dTe(uSe),sL=Cu,fTe=mb,_h=h2,pTe=bx,oL=Su,Ki=eh,Vr=Jt,gTe=th,o9="DefaultChainId",aL="DefaultJsonRpcUrl";class mTe{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 gTe.ScopedLocalStorage("walletlink",oL.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new fTe.RelayEventManager,this._jsonRpcUrlFromOpts="";const o=this._storage.getItem(sL.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(o9)&&((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(aL))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(aL,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;const i=this.getChainId();this._storage.setItem(o9,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,_h.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,_h.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,_h.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(sL.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,_h.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,_h.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(o9);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,_h.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,_h.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,_h.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,_h.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=s9.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=s9.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=s9.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 pTe.WalletLinkRelay({linkAPIUrl:oL.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}}mx.WalletLinkSigner=mTe;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.checkErrorForInvalidRequestArgs=cc.getCoinbaseInjectedProvider=cc.getCoinbaseInjectedSigner=cc.fetchRPCRequest=void 0;const wTe=D1,e6=eh;async function vTe(r,e){if(!e.rpcUrl)throw e6.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":wTe.LIB_VERSION}})).json()).result}cc.fetchRPCRequest=vTe;function xK(){return globalThis.coinbaseWalletSigner}cc.getCoinbaseInjectedSigner=xK;function yTe({metadata:r,preference:e}){var t,n,i;const s=globalThis;if(e.options!=="smartWalletOnly"){if(xK())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=yTe;function bTe(r){if(!r||typeof r!="object"||Array.isArray(r))return e6.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 e6.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 e6.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:r})}cc.checkErrorForInvalidRequestArgs=bTe;Object.defineProperty(hu,"__esModule",{value:!0});hu.createSigner=hu.fetchSignerType=hu.storeSignerType=hu.loadSignerType=void 0;const _Te=fx,AK=mx,xTe=eh,ATe=cc,ETe=th,EK="SignerType",CK=new ETe.ScopedLocalStorage("CBWSDK","SignerConfigurator");function CTe(){return CK.getItem(EK)}hu.loadSignerType=CTe;function STe(r){CK.setItem(EK,r)}hu.storeSignerType=STe;async function ITe(r){const{communicator:e,metadata:t}=r;RTe(e,t).catch(()=>{});const n={id:crypto.randomUUID(),event:"selectSignerType",data:r.preference},{data:i}=await e.postRequestAndWaitForResponse(n);return i}hu.fetchSignerType=ITe;function TTe(r){const{signerType:e,metadata:t,communicator:n,updateListener:i}=r;switch(e){case"scw":return new _Te.SCWSigner({metadata:t,updateListener:i,communicator:n});case"walletlink":return new AK.WalletLinkSigner({metadata:t,updateListener:i});case"extension":{const s=(0,ATe.getCoinbaseInjectedSigner)();if(!s)throw xTe.standardErrors.rpc.internal("injected signer not found");return s}}}hu.createSigner=TTe;async function RTe(r,e){await r.onMessage(({event:n})=>n==="WalletLinkSessionRequest");const t=new AK.WalletLinkSigner({metadata:e});r.postMessage({event:"WalletLinkUpdate",data:{session:t.getSession()}}),await t.handshake(),r.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}var Px={},Ww={};Object.defineProperty(Ww,"__esModule",{value:!0});Ww.closePopup=Ww.openPopup=void 0;const kTe=eh,cL=420,lL=540;function NTe(r){const e=(window.innerWidth-cL)/2+window.screenX,t=(window.innerHeight-lL)/2+window.screenY,n=window.open(r,"Smart Wallet",`width=${cL}, height=${lL}, left=${e}, top=${t}`);if(n==null||n.focus(),!n)throw kTe.standardErrors.rpc.internal("Pop up window failed to open");return n}Ww.openPopup=NTe;function PTe(r){r&&!r.closed&&r.close()}Ww.closePopup=PTe;Object.defineProperty(Px,"__esModule",{value:!0});Px.Communicator=void 0;const OTe=D1,uL=Ww,MTe=Su,hL=eh;class DTe{constructor(e=MTe.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,uL.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:t},n)=>{t(hL.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,uL.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:OTe.LIB_VERSION}})}).then(()=>{if(!this.popup)throw hL.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}}Px.Communicator=DTe;var Ox={};Object.defineProperty(Ox,"__esModule",{value:!0});Ox.determineMethodCategory=void 0;const dL={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 $Te(r){for(const e in dL){const t=e;if(dL[t].includes(r))return t}}Ox.determineMethodCategory=$Te;var BTe=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,r3.hexStringFromIntNumber)((0,w4.IntNumber)(this.chain.id))}),this.accounts;const h=await this.requestSignerSelection(),f=this.initSigner(h),v=await f.handshake();return this.signer=f,(0,v4.storeSignerType)(h),this.emit("connect",{chainId:(0,r3.hexStringFromIntNumber)((0,w4.IntNumber)(this.chain.id))}),v}catch(h){throw this.handleUnauthorizedError(h),h}},sign:async l=>{if(!this.connected||!this.signer)throw wg.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,fL.fetchRPCRequest)(l,this.chain),state:l=>{const h=()=>{if(this.connected)return this.accounts;throw wg.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(l.method){case"eth_chainId":return(0,r3.hexStringFromIntNumber)((0,w4.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 wg.standardErrors.rpc.methodNotSupported(`Method ${l} is deprecated.`)},unsupported:({method:l})=>{throw wg.standardErrors.rpc.methodNotSupported(`Method ${l} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:l,source:h})=>{(0,r3.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,r3.hexStringFromIntNumber)((0,w4.IntNumber)(l.id))))}},this.metadata=i,this.preference=a,this.communicator=new jTe.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,v4.loadSignerType)();this.signer=c?this.initSigner(c):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const n=(0,fL.checkErrorForInvalidRequestArgs)(e);if(n)throw n;const i=(t=(0,HTe.determineMethodCategory)(e.method))!==null&&t!==void 0?t:"fetch";return this.handlers[i](e)}catch(n){return Promise.reject((0,FTe.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===wg.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},WTe.ScopedLocalStorage.clearAll(),this.emit("disconnect",wg.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,v4.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,v4.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}lx.CoinbaseWalletProvider=zTe;Object.defineProperty(ry,"__esModule",{value:!0});ry.CoinbaseWalletSDK=void 0;const VTe=cx,qTe=lx,KTe=th,GTe=D1,ZTe=Jt,YTe=cc;class QTe{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,ZTe.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;const n={metadata:this.metadata,preference:e};return(t=(0,YTe.getCoinbaseInjectedProvider)(n))!==null&&t!==void 0?t:new qTe.CoinbaseWalletProvider(n)}getCoinbaseWalletLogo(e,t=240){return(0,VTe.walletLogo)(e,t)}storeLatestVersion(){new KTe.ScopedLocalStorage("CBWSDK").setItem("VERSION",GTe.LIB_VERSION)}}ry.CoinbaseWalletSDK=QTe;(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CoinbaseWalletSDK=void 0;const e=ry;r.default=e.CoinbaseWalletSDK;var t=ry;Object.defineProperty(r,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return t.CoinbaseWalletSDK}})})(sq);function JTe(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 sq.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 XTe(r){r&&(Yc=r)}function eRe(){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 yy({open:r,close:e})}function tRe(){if(!Yc)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" composable');const r=Tf(Yc.getWalletInfo()),e=Yc.subscribeWalletInfo(t=>{r.value=t});return _y(()=>{e==null||e()}),{walletInfo:r}}let a9,ca;function rRe(r){return ca=new A9e({ethersConfig:r.ethersConfig,siweConfig:r.siweConfig,chains:r.chains,defaultChain:r.defaultChain}),a9=new ede({...r,defaultChain:ca.defaultChain,adapters:[ca],sdkType:"w3m",sdkVersion:`vue-ethers-${ct.VERSION}`}),XTe(a9),a9}function mMe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalProvider" composition');const r=Tf(ca.getWalletProvider()),e=Tf(ca.getWalletProviderType()),t=ca.subscribeProvider(n=>{r.value=n.provider,e.value=n.providerType});return _y(()=>{t==null||t()}),{walletProvider:r,walletProviderType:e}}function nRe(){if(!ca)throw new Error('Please call "createWeb3Modal" before using "useWeb3ModalAccount" composition');const r=Tf(ca.getAddress()),e=Tf(ca.getIsConnected()),t=Tf(ca.getStatus()),n=Tf(ca.getChainId()),i=ca.subscribeProvider(s=>{r.value=s.address,t.value=s.status,e.value=s.isConnected,n.value=s.chainId});return _y(()=>{i==null||i()}),{address:r,isConnected:e,chainId:n}}const iRe="d0ec522cc8ac196893d24355f948e04f",D8={chainId:1112,name:"Wemix Testnet",currency:"WEMIX",explorerUrl:"https://testnet.wemixscan.com/",rpcUrl:"https://api.test.wemix.com"},sRe={name:"CTP",description:"Capture the Prompt",url:"https://promptower.github.io/webapp/",icons:[""]},oRe=JTe({metadata:sRe,enableEIP6963:!0,enableInjected:!0,enableCoinbase:!0,rpcUrl:D8.rpcUrl,defaultChainId:D8.chainId});rRe({ethersConfig:oRe,chains:[D8],projectId:iRe,enableAnalytics:!0,enableSwaps:!1,enableOnramp:!1,featuredWalletIds:["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369"],chainImages:{[D8.chainId]:""}});const iR=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},aRe={class:"topbar"},cRe={class:"topbar-wrapper"},lRe={class:"menu-wrapper"},uRe=["src"],hRe={class:"wallet-connected-text"},dRe={__name:"TopBar",setup(r){const e=eRe(),{walletInfo:t}=tRe(),{address:n,chainId:i,isConnected:s}=nRe(),o=DU(),a=f=>{o.push(f),window.scrollTo(0,0)},c=$U(),l=f=>f.includes(c.path),h=()=>{e.open()};return(f,v)=>(fu(),Kg("div",aRe,[sn("div",cRe,[sn("div",{class:"logo-wrapper",onClick:v[0]||(v[0]=y=>a("/"))},v[4]||(v[4]=[sn("img",{src:kre,alt:"Logo"},null,-1),sn("div",{class:"logo-text"},"CTP",-1)])),sn("div",lRe,[sn("div",{class:Wg(["menu-text",{"menu-text-active":l(["/challenge"])}]),onClick:v[1]||(v[1]=y=>a("/challenge"))}," Challenges ",2),sn("div",{class:Wg(["menu-text",{"menu-text-active":l(["/leaderboard"])}]),onClick:v[2]||(v[2]=y=>a("/leaderboard"))}," Leaderboard ",2),sn("div",{class:Wg(["menu-text",{"menu-text-active":l(["/portfolio"])}]),onClick:v[3]||(v[3]=y=>a("/portfolio"))}," Portfolio ",2)]),Oo(s)?s6("",!0):(fu(),Kg("div",{key:0,class:"wallet-btn",onClick:h},v[5]||(v[5]=[sn("div",{class:"wallet-text"},"Connect Wallet",-1)]))),Oo(s)?(fu(),Kg("div",{key:1,class:"wallet-connected-btn",onClick:h},[sn("img",{src:Oo(t).icon,alt:"wallet"},null,8,uRe),sn("div",hRe,SL(`${Oo(n).substring(0,6)}...${Oo(n).substring(Oo(n).length-4)}`),1)])):s6("",!0)])]))}},fRe=iR(dRe,[["__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",gRe={},mRe={class:"footer"};function wRe(r,e){return fu(),Kg("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 vRe=iR(gRe,[["render",wRe],["__scopeId","data-v-1574b52b"]]),yRe={__name:"App",setup(r){const e=$U();return(t,n)=>{const i=dte("router-view");return fu(),Kg(Qc,null,[Oo(e).path!="/"?(fu(),i6(fRe,{key:0})):s6("",!0),eo(i,{class:"router"}),Oo(e).path!="/"?(fu(),i6(vRe,{key:1})):s6("",!0)],64)}}},bRe="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",_Re="/webapp/assets/logo-DrIcDvRq.svg",xRe="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",ARe="/webapp/assets/flower-COLkTZsA.svg",ERe="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",CRe={class:"notebook"},SRe={class:"notebook-screen"},IRe={class:"notebook-screen-wrapper"},TRe={class:"notebook-screen-title-wrapper"},RRe={__name:"LandingPage",setup(r){const e=DU(),t=n=>{e.push(n),window.scrollTo(0,0)};return(n,i)=>(fu(),Kg(Qc,null,[sn("div",CRe,[i[5]||(i[5]=sn("img",{class:"fixed-notebook",src:bRe,alt:"Notebook"},null,-1)),sn("div",SRe,[sn("div",IRe,[i[4]||(i[4]=sn("img",{class:"fixed-logo",src:_Re,alt:"Logo"},null,-1)),sn("div",TRe,[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:xRe,alt:"Join-Arrow"},null,-1)]))])])])]),i[6]||(i[6]=sn("img",{class:"fixed-flower",src:ARe,alt:"Flower"},null,-1)),i[7]||(i[7]=sn("img",{class:"fixed-pencil",src:ERe,alt:"Pencil"},null,-1)),i[8]||(i[8]=sn("div",{class:"background-fixed"},null,-1))],64))}},kRe=iR(RRe,[["__scopeId","data-v-050d2aaf"]]),NRe={__name:"LandingView",setup(r){return(e,t)=>(fu(),i6(kRe))}},PRe=[{path:"/",name:"Root",component:NRe},{path:"/challenge",name:"Challenge",component:()=>lc(()=>import("./ChallengeView-Cm0XRX0k.js"),__vite__mapDeps([0,1,2]))},{path:"/leaderboard",name:"Leaderboard",component:()=>lc(()=>import("./LeaderboardView-_cCvA8LS.js"),__vite__mapDeps([3,1,4]))},{path:"/portfolio",name:"Portfolio",component:()=>lc(()=>import("./PortfolioView-uYShAl-d.js"),__vite__mapDeps([5,1,6]))}],ORe=One({history:ane("/webapp/"),routes:PRe,scrollBehavior(r,e,t){return t||{left:0,top:0}}}),SK=Ire(yRe);SK.use(ORe);SK.mount("#app");export{sw as $,De as A,H7 as B,cm as C,or as D,It as E,Qc as F,jH as G,FH as H,tt as I,iq as J,U5 as K,c8 as L,nr as M,it as N,bt as O,eke as P,fF as Q,Te as R,Vt as S,Pae as T,Qt as U,K0 as V,_r as W,O9 as X,iw as Y,Kv as Z,iR as _,tRe as a,Vp as a$,M9 as a0,dv as a1,x6 as a2,Up as a3,Fp as a4,fv as a5,hc as a6,A6 as a7,jp as a8,dc as a9,H9 as aA,jf as aB,Pu as aC,_v as aD,vv as aE,pw as aF,Ou as aG,ld as aH,gw as aI,sd as aJ,mw as aK,xv as aL,ww as aM,Hf as aN,Wf as aO,N6 as aP,Av as aQ,zf as aR,ud as aS,hd as aT,Ev as aU,Cv as aV,vw as aW,dd as aX,Mu as aY,yw as aZ,zp as a_,E6 as aa,ad as ab,cd as ac,pv as ad,ow as ae,D9 as af,C6 as ag,gv as ah,aw as ai,Hp as aj,dl as ak,Wp as al,I6 as am,mv as an,fl as ao,wv as ap,fc as aq,pa as ar,B9 as as,ga as at,yv as au,T6 as av,cw as aw,od as ax,lw as ay,Nu as az,nRe as b,Sv as b0,Iv as b1,qp as b2,P6 as b3,ao as b4,Uo as b5,O6 as b6,Dt as b7,et as b8,Yt as b9,ne as ba,lc as bb,ot as bc,ge as bd,ii as be,BU as bf,Dy as bg,Kg as c,sn as d,BRe as e,Eu as f,mMe as g,nte as h,$Re as i,s6 as j,Ei as k,i6 as l,xz as m,Wg as n,fu as o,sxe as p,ei as q,Tf as r,po as s,SL as t,eRe as u,LRe as v,DRe as w,Ms as x,oa as y,Re as z}; diff --git a/assets/nft0-jw9de1Qy.js b/assets/nft0-jw9de1Qy.js deleted file mode 100644 index 74ac039..0000000 --- a/assets/nft0-jw9de1Qy.js +++ /dev/null @@ -1 +0,0 @@ -const s="/webapp/assets/nft0-whQM-xt_.png";export{s as _}; diff --git a/assets/nft0-whQM-xt_.png b/assets/nft0-whQM-xt_.png deleted file mode 100644 index c5dedec..0000000 Binary files a/assets/nft0-whQM-xt_.png and /dev/null differ diff --git a/assets/w3m-modal-BCw6YggM.js b/assets/w3m-modal-BCw6YggM.js new file mode 100644 index 0000000..da7d6fb --- /dev/null +++ b/assets/w3m-modal-BCw6YggM.js @@ -0,0 +1,150 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DvOqXmJq.js","assets/index-ZXgCnnEa.js","assets/index-CVeTJdZw.css"])))=>i.map(i=>d[i]); +import{b7 as k,b8 as C,M as a,A as w,O as f,b9 as S,E as x,ba as A,R as p,bb as g,U as E,P as O,S as _,bc as m,bd as c,z as L,be as N}from"./index-ZXgCnnEa.js";const T=k` + :host { + z-index: var(--w3m-z-index); + display: block; + backface-visibility: hidden; + will-change: opacity; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + opacity: 0; + background-color: var(--wui-cover); + transition: opacity 0.2s var(--wui-ease-out-power-2); + will-change: opacity; + } + + :host(.open) { + opacity: 1; + } + + wui-card { + max-width: var(--w3m-modal-width); + width: 100%; + position: relative; + animation: zoom-in 0.2s var(--wui-ease-out-power-2); + animation-fill-mode: backwards; + outline: none; + } + + wui-card[shake='true'] { + animation: + zoom-in 0.2s var(--wui-ease-out-power-2), + w3m-shake 0.5s var(--wui-ease-out-power-2); + } + + wui-flex { + overflow-x: hidden; + overflow-y: auto; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + } + + @media (max-height: 700px) and (min-width: 431px) { + wui-flex { + align-items: flex-start; + } + + wui-card { + margin: var(--wui-spacing-xxl) 0px; + } + } + + @media (max-width: 430px) { + wui-flex { + align-items: flex-end; + } + + wui-card { + max-width: 100%; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom: none; + animation: slide-in 0.2s var(--wui-ease-out-power-2); + } + + wui-card[shake='true'] { + animation: + slide-in 0.2s var(--wui-ease-out-power-2), + w3m-shake 0.5s var(--wui-ease-out-power-2); + } + } + + @keyframes zoom-in { + 0% { + transform: scale(0.95) translateY(0); + } + 100% { + transform: scale(1) translateY(0); + } + } + + @keyframes slide-in { + 0% { + transform: scale(1) translateY(50px); + } + 100% { + transform: scale(1) translateY(0); + } + } + + @keyframes w3m-shake { + 0% { + transform: scale(1) rotate(0deg); + } + 20% { + transform: scale(1) rotate(-1deg); + } + 40% { + transform: scale(1) rotate(1.5deg); + } + 60% { + transform: scale(1) rotate(-1.5deg); + } + 80% { + transform: scale(1) rotate(1deg); + } + 100% { + transform: scale(1) rotate(0deg); + } + } + + @keyframes w3m-view-height { + from { + height: var(--prev-height); + } + to { + height: var(--new-height); + } + } +`;var l=function(u,e,t,o){var s=arguments.length,i=s<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(u,e,t,o);else for(var d=u.length-1;d>=0;d--)(r=u[d])&&(i=(s<3?r(i):s>3?r(e,t,i):r(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};const v="scroll-lock";let n=class extends C{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.open=a.state.open,this.caipAddress=w.state.caipAddress,this.isSiweEnabled=f.state.isSiweEnabled,this.connected=w.state.isConnected,this.loading=a.state.loading,this.shake=a.state.shake,this.initializeTheming(),S.prefetch(),this.unsubscribe.push(a.subscribeKey("open",e=>e?this.onOpen():this.onClose()),a.subscribeKey("shake",e=>this.shake=e),a.subscribeKey("loading",e=>{this.loading=e,this.onNewAddress(w.state.caipAddress)}),w.subscribeKey("isConnected",e=>this.connected=e),w.subscribeKey("caipAddress",e=>this.onNewAddress(e)),f.subscribeKey("isSiweEnabled",e=>this.isSiweEnabled=e)),x.sendEvent({type:"track",event:"MODAL_LOADED"})}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.open?A` + + + + + + + + + `: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-DvOqXmJq.js");return{SIWEController:i}},__vite__mapDeps([0,1,2]));o.state.status!=="success"&&(e||t)?a.shake():a.close()}else a.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; + overscroll-behavior: contain; + } + 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-DvOqXmJq.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"):a.open({view:"ConnectingSiwe"})}};n.styles=T;l([c()],n.prototype,"open",void 0);l([c()],n.prototype,"caipAddress",void 0);l([c()],n.prototype,"isSiweEnabled",void 0);l([c()],n.prototype,"connected",void 0);l([c()],n.prototype,"loading",void 0);l([c()],n.prototype,"shake",void 0);n=l([L("w3m-modal")],n);export{n as W3mModal}; diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index df36fcf..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..d843285 --- /dev/null +++ b/favicon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/index.html b/index.html index d6dbd3e..0f8a114 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,13 @@ - + - Vite App + Capture the Prompt - - + +