diff --git a/404.html b/404.html index b461f79..8560a16 100644 --- a/404.html +++ b/404.html @@ -3,7 +3,7 @@ - + diff --git a/assets/AppDescriptionTop-ae09eb9e.js b/assets/AppDescriptionTop-8f9fdf69.js similarity index 92% rename from assets/AppDescriptionTop-ae09eb9e.js rename to assets/AppDescriptionTop-8f9fdf69.js index fd4515c..9f3c3ed 100644 --- a/assets/AppDescriptionTop-ae09eb9e.js +++ b/assets/AppDescriptionTop-8f9fdf69.js @@ -1 +1 @@ -import{_ as s,o as i,i as t,a2 as e,a0 as a}from"./index-d1afe763.js";const c={},r={class:"warning-disclaimer"},_=e("div",{class:"warning-disclaimer__bar"},null,-1),d=e("div",{class:"warning-disclaimer__text"},` Albus DeFi's services and its associated features, including smart contracts, are provided "as is". The smart contracts have not undergone external audits. By using Albus DeFi, you acknowledge and understand that the utilization of the website, software, smart contracts, and all associated services is wholly at your discretion and risk. `,-1),l=[_,d];function p(n,o){return i(),t("div",r,l)}const k=s(c,[["render",p]]),u={},f={class:"app-description"},h=e("div",{class:"app-description__title"}," DeFi with built-in verification ",-1),v=e("div",{class:"app-description__details"},[a(" Conduct quick and efficient transactions while benefitting from built-in verification. Albus DeFi is powered by Albus Protocol, which performs verification based on pre-defined requirements and relies on Zero-Knowledge Proofs to keep your personal information private throughout the verification process. For details, please visit "),e("a",{class:"app-description__link",href:"https://albus.finance/",target:"_blanc"},"Albus Protocol's landing page"),a(". ")],-1),b=[h,v];function m(n,o){return i(),t("div",f,b)}const F=s(u,[["render",m]]),g={},w={class:"app-description"},$=e("div",{class:"app-description__details"}," All services provided by Albus DeFi are subject to verification. To become eligible for a service, pass secure and privacy-preserving verification with Albus Protocol and obtain a Compliance Certificate. ",-1),x=[$];function y(n,o){return i(),t("div",w,x)}const D=s(g,[["render",y]]);export{D as _,F as a,k as b}; +import{_ as s,o as i,i as t,a2 as e,a0 as a}from"./index-3e319056.js";const c={},r={class:"warning-disclaimer"},_=e("div",{class:"warning-disclaimer__bar"},null,-1),d=e("div",{class:"warning-disclaimer__text"},` Albus DeFi's services and its associated features, including smart contracts, are provided "as is". The smart contracts have not undergone external audits. By using Albus DeFi, you acknowledge and understand that the utilization of the website, software, smart contracts, and all associated services is wholly at your discretion and risk. `,-1),l=[_,d];function p(n,o){return i(),t("div",r,l)}const k=s(c,[["render",p]]),u={},f={class:"app-description"},h=e("div",{class:"app-description__title"}," DeFi with built-in verification ",-1),v=e("div",{class:"app-description__details"},[a(" Conduct quick and efficient transactions while benefitting from built-in verification. Albus DeFi is powered by Albus Protocol, which performs verification based on pre-defined requirements and relies on Zero-Knowledge Proofs to keep your personal information private throughout the verification process. For details, please visit "),e("a",{class:"app-description__link",href:"https://albus.finance/",target:"_blanc"},"Albus Protocol's landing page"),a(". ")],-1),b=[h,v];function m(n,o){return i(),t("div",f,b)}const F=s(u,[["render",m]]),g={},w={class:"app-description"},$=e("div",{class:"app-description__details"}," All services provided by Albus DeFi are subject to verification. To become eligible for a service, pass secure and privacy-preserving verification with Albus Protocol and obtain a Compliance Certificate. ",-1),x=[$];function y(n,o){return i(),t("div",w,x)}const D=s(g,[["render",y]]);export{D as _,F as a,k as b}; diff --git a/assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js b/assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js similarity index 97% rename from assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js rename to assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js index e794a0c..8a9e8bf 100644 --- a/assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js +++ b/assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js @@ -1 +1 @@ -import{V as w,w as P,v as _,G as S,y as $,bx as B,o as t,Y as b,Z as q,j as s,a9 as N,a3 as e,i as o,a2 as i,a0 as j,ah as z,as as Q,a4 as k,aE as R,a5 as g,$ as E,by as U,bz as A,bA as G,bB as I,bC as M}from"./index-d1afe763.js";const O={key:0,class:"certificate-card__info__title q-mt-sm text-center"},T={key:1,class:"row nowrap full-height"},W={class:"certificate-card__info row"},Y={class:"policy-info q-mr-sm"},Z={class:"certificate-card__info__status column row justify-between"},F=i("div",{class:"certificate-card__info__title"}," Required certificate ",-1),H={key:0,class:"row"},J={class:"certificate-card__policy-name full-height"},K={key:0,class:"certificate-card__end"},X={key:0,class:"certificate-card__action"},ee=["href"],te=w({__name:"PolicyCardView",props:{requiredPolicy:String,requiredPolicyData:Object},setup(a){const d=a,c=P(),f=_(()=>c.serviceData),n=_(()=>c.serviceLoading),l=_(()=>c.state?.certificateLoading),r=S(!1),{connected:u}=$(),{certificate:y,certificateLink:v,certificateValid:m}=B(d.requiredPolicy);function C(){return u.value?m.value?"certificate-card__info__status-line--positive":y.value?.data?.status===U.Proved?"certificate-card__info__status-line--warning":"certificate-card__info__status-line--negative":"certificate-card__info__status-line--gray"}return(ie,p)=>{const D=A,V=G,x=I,L=M;return t(),b(E,{flat:"",class:"certificate-card"},{default:q(()=>[s(N,{showing:e(n)||e(u)&&e(l),"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),!e(n)&&!a.requiredPolicy?(t(),o("div",O," No certificate required ")):(t(),o("div",T,[i("div",W,[i("div",Y,[j(" i "),s(z,{modelValue:e(r),"onUpdate:modelValue":p[1]||(p[1]=h=>Q(r)?r.value=h:null),offset:[0,20],"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:q(()=>[s(D,{"required-policy-data":a.requiredPolicyData,certificate:e(y),"certificate-valid":!!e(m),"certificate-loading":e(l),"certificate-link":e(v),onCloseDialog:p[0]||(p[0]=h=>r.value=!1)},null,8,["required-policy-data","certificate","certificate-valid","certificate-loading","certificate-link"])]),_:1},8,["modelValue"])]),i("div",Z,[F,e(u)&&!e(n)&&!e(l)?(t(),o("div",H,[s(V,{certificate:e(y),"certificate-valid":!!e(m)},null,8,["certificate","certificate-valid"])])):k("",!0)]),i("div",J,[i("span",{class:R(["certificate-card__info__status-line",C()])},null,2),i("span",null,g(e(f)?.name)+g(e(f)?.name&&a.requiredPolicyData?.name&&",")+" "+g(a.requiredPolicyData?.name),1)])]),e(u)&&!e(n)&&!e(l)?(t(),o("div",K,[e(m)?(t(),o("a",{key:1,href:e(v),class:"certificate-card__certificate certificate",target:"_blank"},[s(L)],8,ee)):(t(),o("div",X,[s(x,{certificate:e(y),"certificate-link":e(v)},null,8,["certificate","certificate-link"])]))])):k("",!0)]))]),_:1})}}}),ce=w({__name:"PolicyCard",setup(a){const d=P(),c=_(()=>d.requiredPolicy),f=_(()=>d.requiredPolicyData);return(n,l)=>{const r=te;return t(),b(r,{key:e(c),"required-policy":e(c),"required-policy-data":e(f)},null,8,["required-policy","required-policy-data"])}}});export{ce as _}; +import{V as w,w as P,v as _,G as S,y as $,bx as B,o as t,Y as b,Z as q,j as s,a9 as N,a3 as e,i as o,a2 as i,a0 as j,ah as z,as as Q,a4 as k,aE as R,a5 as g,$ as E,by as U,bz as A,bA as G,bB as I,bC as M}from"./index-3e319056.js";const O={key:0,class:"certificate-card__info__title q-mt-sm text-center"},T={key:1,class:"row nowrap full-height"},W={class:"certificate-card__info row"},Y={class:"policy-info q-mr-sm"},Z={class:"certificate-card__info__status column row justify-between"},F=i("div",{class:"certificate-card__info__title"}," Required certificate ",-1),H={key:0,class:"row"},J={class:"certificate-card__policy-name full-height"},K={key:0,class:"certificate-card__end"},X={key:0,class:"certificate-card__action"},ee=["href"],te=w({__name:"PolicyCardView",props:{requiredPolicy:String,requiredPolicyData:Object},setup(a){const d=a,c=P(),f=_(()=>c.serviceData),n=_(()=>c.serviceLoading),l=_(()=>c.state?.certificateLoading),r=S(!1),{connected:u}=$(),{certificate:y,certificateLink:v,certificateValid:m}=B(d.requiredPolicy);function C(){return u.value?m.value?"certificate-card__info__status-line--positive":y.value?.data?.status===U.Proved?"certificate-card__info__status-line--warning":"certificate-card__info__status-line--negative":"certificate-card__info__status-line--gray"}return(ie,p)=>{const D=A,V=G,x=I,L=M;return t(),b(E,{flat:"",class:"certificate-card"},{default:q(()=>[s(N,{showing:e(n)||e(u)&&e(l),"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),!e(n)&&!a.requiredPolicy?(t(),o("div",O," No certificate required ")):(t(),o("div",T,[i("div",W,[i("div",Y,[j(" i "),s(z,{modelValue:e(r),"onUpdate:modelValue":p[1]||(p[1]=h=>Q(r)?r.value=h:null),offset:[0,20],"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:q(()=>[s(D,{"required-policy-data":a.requiredPolicyData,certificate:e(y),"certificate-valid":!!e(m),"certificate-loading":e(l),"certificate-link":e(v),onCloseDialog:p[0]||(p[0]=h=>r.value=!1)},null,8,["required-policy-data","certificate","certificate-valid","certificate-loading","certificate-link"])]),_:1},8,["modelValue"])]),i("div",Z,[F,e(u)&&!e(n)&&!e(l)?(t(),o("div",H,[s(V,{certificate:e(y),"certificate-valid":!!e(m)},null,8,["certificate","certificate-valid"])])):k("",!0)]),i("div",J,[i("span",{class:R(["certificate-card__info__status-line",C()])},null,2),i("span",null,g(e(f)?.name)+g(e(f)?.name&&a.requiredPolicyData?.name&&",")+" "+g(a.requiredPolicyData?.name),1)])]),e(u)&&!e(n)&&!e(l)?(t(),o("div",K,[e(m)?(t(),o("a",{key:1,href:e(v),class:"certificate-card__certificate certificate",target:"_blank"},[s(L)],8,ee)):(t(),o("div",X,[s(x,{certificate:e(y),"certificate-link":e(v)},null,8,["certificate","certificate-link"])]))])):k("",!0)]))]),_:1})}}}),ce=w({__name:"PolicyCard",setup(a){const d=P(),c=_(()=>d.requiredPolicy),f=_(()=>d.requiredPolicyData);return(n,l)=>{const r=te;return t(),b(r,{key:e(c),"required-policy":e(c),"required-policy-data":e(f)},null,8,["required-policy","required-policy-data"])}}});export{ce as _}; diff --git a/assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js b/assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js similarity index 97% rename from assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js rename to assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js index 3256866..d96376c 100644 --- a/assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js +++ b/assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js @@ -1 +1 @@ -import{V as N,t as M,v as m,aJ as A,G as P,a3 as s,o as _,Y as V,Z as p,j as a,a1 as C,a2 as t,i as v,a4 as r,a5 as e,a0 as D,ah as L,as as Q,$ as T,al as k,aK as y,ar as w,aL as E,a8 as g,aM as I}from"./index-d1afe763.js";import{u as F}from"./swap-a8389507.js";const H={class:"row"},O={class:"pool-card__icons row justify-center q-mr-md q-ml-sm"},R=["src","alt"],U=["src","alt"],W={class:"pool-card__subtitle row justify-center items-center"},G={class:"policy-info q-ml-auto"},Y={class:"pool-info__fees row items-center"},J=t("div",{class:"pool-card__label"}," Swap fee ",-1),K={key:0,class:"pool-card__amount"},Z=t("div",{class:"pool-info__delimiter"},null,-1),z=t("div",{class:"pool-card__label"}," Withdraw fee ",-1),X={key:0,class:"pool-card__amount"},tt={class:"pool-info__addresses"},ot={class:"column justify-center items-between q-mt-md"},st=t("div",{class:"pool-card__label"}," Pool address ",-1),et={class:"row justify-between items-center"},at={class:"pool-card__pubkey monoscaped"},lt={class:"column justify-center items-between"},nt=t("div",{class:"pool-card__label"}," Token A mint ",-1),it={class:"row justify-between items-center"},ct={class:"pool-card__pubkey monoscaped"},dt={class:"column justify-center items-between"},_t=t("div",{class:"pool-card__label"}," Token B mint ",-1),rt={class:"row justify-between items-center"},ut={class:"pool-card__pubkey monoscaped"},mt={class:"column justify-center items-between"},pt=t("div",{class:"pool-card__label"}," LP token mint ",-1),vt={class:"row justify-between items-center"},ht={class:"pool-card__pubkey monoscaped"},ft={class:"pool-card__income q-mt-md"},bt=t("div",{class:"pool-card__apr-label"}," APR 24H ",-1),kt={class:"pool-card__apr-amount"},yt={class:"pool-card__income__user row q-ml-auto"},wt=t("div",{class:"pool-card__label"}," My Liquidity ",-1),St={class:"pool-card__amount"},Bt={class:"q-ml-md"},qt=t("div",{class:"pool-card__label"}," My Share ",-1),xt={class:"pool-card__amount"},Tt={class:"pool-card__stats q-mt-sm q-mb-auto q-pt-xs"},gt={class:"pool-card__stats__item q-mt-xs text-center"},$t=t("div",{class:"pool-card__label"}," Volume 24H ",-1),jt={class:"pool-card__amount"},Nt=t("div",{class:"pool-card__stats__delimiter"},null,-1),Mt={class:"pool-card__stats__item q-mt-xs text-center"},At=t("div",{class:"pool-card__label"}," Liquidity ",-1),Pt={class:"pool-card__amount"},Vt=t("div",{class:"pool-card__stats__delimiter"},null,-1),Ct={class:"pool-card__stats__item q-mt-xs text-center"},Dt=t("div",{class:"pool-card__label"}," Fees 24H ",-1),Lt={class:"pool-card__amount"},Qt={key:0,class:"row q-mt-md"},Et={class:"col"},Ht=N({__name:"PoolsListItem",props:{pubkey:Object,data:Object,poolStats:Object,userTokens:Number,useEmit:Boolean},emits:["selectPool"],setup(o){const l=o,$=M(),B=m(()=>$.tokens),i=m(()=>B.value.find(d=>d.mint===l.data?.tokenAMint.toBase58())),c=m(()=>B.value.find(d=>d.mint===l.data?.tokenBMint.toBase58())),h=F(),j=A();async function q(d=!1){i.value&&c.value&&l.pubkey&&l.data&&(h.state.from=i.value,h.state.to=c.value,await j.push(d?"liquidity":"/swap"),h.setTokenSwap({pubkey:l.pubkey,data:l.data}),console.log("[swap] swapAction: ",l.pubkey.toBase58()))}const u=m(()=>l.data&&h.getPoolFee(l.data)),x=m(()=>u.value&&u.value.ownerTrade+u.value.trade),S=P(!1);return(d,n)=>{const f=I;return o.pubkey&&o.data&&s(i)&&s(c)?(_(),V(T,{key:0,class:"pool-card",onClick:n[3]||(n[3]=b=>o.useEmit?d.$emit("selectPool"):void 0)},{default:p(()=>[a(C,{class:"pool-card__body full-height"},{default:p(()=>[t("div",H,[t("div",O,[s(i)?.image?(_(),v("img",{key:0,src:s(i)?.image,alt:s(i)?.symbol},null,8,R)):r("",!0),s(c)?.image?(_(),v("img",{key:1,src:s(c)?.image,alt:s(c)?.symbol},null,8,U)):r("",!0)]),t("div",W,[t("span",null,e(s(i)?.symbol)+"/"+e(s(c)?.symbol),1)]),t("span",G,[D(" i "),a(L,{modelValue:s(S),"onUpdate:modelValue":n[0]||(n[0]=b=>Q(S)?S.value=b:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:p(()=>[a(T,{class:"pool-info q-pa-md"},{default:p(()=>[t("div",Y,[t("div",null,[J,s(x)?(_(),v("div",K,e(s(k).format(s(x))),1)):r("",!0)]),Z,t("div",null,[z,s(u)?(_(),v("div",X,e(s(k).format(s(u).ownerWithdraw)),1)):r("",!0)])]),t("div",tt,[t("div",ot,[st,t("div",et,[t("span",at,e(s(y)(o.pubkey.toBase58(),14)),1),a(f,{text:o.pubkey.toBase58()},null,8,["text"])])]),t("div",lt,[nt,t("div",it,[t("span",ct,e(s(y)(o.data.tokenAMint.toBase58(),14)),1),a(f,{text:o.data.tokenAMint.toBase58()},null,8,["text"])])]),t("div",dt,[_t,t("div",rt,[t("span",ut,e(s(y)(o.data.tokenBMint.toBase58(),14)),1),a(f,{text:o.data.tokenBMint.toBase58()},null,8,["text"])])]),t("div",mt,[pt,t("div",vt,[t("span",ht,e(s(y)(o.data.poolMint.toBase58(),14)),1),a(f,{text:o.data.poolMint.toBase58()},null,8,["text"])])])])]),_:1})]),_:1},8,["modelValue"])])]),t("div",ft,[t("div",null,[bt,t("div",kt,e(o.poolStats&&!Number.isNaN(o.poolStats.apr24)?`${s(k).format(o.poolStats.apr24)}`:"---"),1)]),t("div",yt,[t("div",null,[wt,t("div",St,e(o.poolStats&&!Number.isNaN(o.poolStats.poolTokenSupply)&&o.userTokens?`$${s(w).format(o.userTokens/o.poolStats.poolTokenSupply*o.poolStats.tvl)}`:"---"),1)]),t("div",Bt,[qt,t("div",xt,e(o.poolStats&&!Number.isNaN(o.poolStats.poolTokenSupply)&&o.userTokens?`${s(k).format(o.userTokens/o.poolStats.poolTokenSupply)}`:"---"),1)])])]),t("div",Tt,[t("div",gt,[$t,t("div",jt,e(o.poolStats?`$${s(w).format(o.poolStats.volume24)}`:"---"),1)]),Nt,t("div",Mt,[At,t("div",Pt,e(o.poolStats?`$${s(w).format(o.poolStats.tvl)}`:"---"),1)]),Vt,t("div",Ct,[Dt,t("div",Lt,e(o.poolStats?`$${s(w).format(o.poolStats.fees24)}`:"---"),1)])]),o.useEmit?r("",!0):(_(),v("div",Qt,[t("div",Et,[a(E,{spread:"",unelevated:"",square:"",class:"pool-card__actions"},{default:p(()=>[a(g,{label:"ADD LIQUIDITY",color:"primary","text-color":"white",target:"_blank",class:"q-mr-md",onClick:n[1]||(n[1]=b=>q(!0))}),a(g,{label:"SWAP",color:"warning","text-color":"black",target:"_blank",onClick:n[2]||(n[2]=b=>q(!1))})]),_:1})])]))]),_:1})]),_:1})):r("",!0)}}});export{Ht as _}; +import{V as N,t as M,v as m,aJ as A,G as P,a3 as s,o as _,Y as V,Z as p,j as a,a1 as C,a2 as t,i as v,a4 as r,a5 as e,a0 as D,ah as L,as as Q,$ as T,al as k,aK as y,ar as w,aL as E,a8 as g,aM as I}from"./index-3e319056.js";import{u as F}from"./swap-6005a05e.js";const H={class:"row"},O={class:"pool-card__icons row justify-center q-mr-md q-ml-sm"},R=["src","alt"],U=["src","alt"],W={class:"pool-card__subtitle row justify-center items-center"},G={class:"policy-info q-ml-auto"},Y={class:"pool-info__fees row items-center"},J=t("div",{class:"pool-card__label"}," Swap fee ",-1),K={key:0,class:"pool-card__amount"},Z=t("div",{class:"pool-info__delimiter"},null,-1),z=t("div",{class:"pool-card__label"}," Withdraw fee ",-1),X={key:0,class:"pool-card__amount"},tt={class:"pool-info__addresses"},ot={class:"column justify-center items-between q-mt-md"},st=t("div",{class:"pool-card__label"}," Pool address ",-1),et={class:"row justify-between items-center"},at={class:"pool-card__pubkey monoscaped"},lt={class:"column justify-center items-between"},nt=t("div",{class:"pool-card__label"}," Token A mint ",-1),it={class:"row justify-between items-center"},ct={class:"pool-card__pubkey monoscaped"},dt={class:"column justify-center items-between"},_t=t("div",{class:"pool-card__label"}," Token B mint ",-1),rt={class:"row justify-between items-center"},ut={class:"pool-card__pubkey monoscaped"},mt={class:"column justify-center items-between"},pt=t("div",{class:"pool-card__label"}," LP token mint ",-1),vt={class:"row justify-between items-center"},ht={class:"pool-card__pubkey monoscaped"},ft={class:"pool-card__income q-mt-md"},bt=t("div",{class:"pool-card__apr-label"}," APR 24H ",-1),kt={class:"pool-card__apr-amount"},yt={class:"pool-card__income__user row q-ml-auto"},wt=t("div",{class:"pool-card__label"}," My Liquidity ",-1),St={class:"pool-card__amount"},Bt={class:"q-ml-md"},qt=t("div",{class:"pool-card__label"}," My Share ",-1),xt={class:"pool-card__amount"},Tt={class:"pool-card__stats q-mt-sm q-mb-auto q-pt-xs"},gt={class:"pool-card__stats__item q-mt-xs text-center"},$t=t("div",{class:"pool-card__label"}," Volume 24H ",-1),jt={class:"pool-card__amount"},Nt=t("div",{class:"pool-card__stats__delimiter"},null,-1),Mt={class:"pool-card__stats__item q-mt-xs text-center"},At=t("div",{class:"pool-card__label"}," Liquidity ",-1),Pt={class:"pool-card__amount"},Vt=t("div",{class:"pool-card__stats__delimiter"},null,-1),Ct={class:"pool-card__stats__item q-mt-xs text-center"},Dt=t("div",{class:"pool-card__label"}," Fees 24H ",-1),Lt={class:"pool-card__amount"},Qt={key:0,class:"row q-mt-md"},Et={class:"col"},Ht=N({__name:"PoolsListItem",props:{pubkey:Object,data:Object,poolStats:Object,userTokens:Number,useEmit:Boolean},emits:["selectPool"],setup(o){const l=o,$=M(),B=m(()=>$.tokens),i=m(()=>B.value.find(d=>d.mint===l.data?.tokenAMint.toBase58())),c=m(()=>B.value.find(d=>d.mint===l.data?.tokenBMint.toBase58())),h=F(),j=A();async function q(d=!1){i.value&&c.value&&l.pubkey&&l.data&&(h.state.from=i.value,h.state.to=c.value,await j.push(d?"liquidity":"/swap"),h.setTokenSwap({pubkey:l.pubkey,data:l.data}),console.log("[swap] swapAction: ",l.pubkey.toBase58()))}const u=m(()=>l.data&&h.getPoolFee(l.data)),x=m(()=>u.value&&u.value.ownerTrade+u.value.trade),S=P(!1);return(d,n)=>{const f=I;return o.pubkey&&o.data&&s(i)&&s(c)?(_(),V(T,{key:0,class:"pool-card",onClick:n[3]||(n[3]=b=>o.useEmit?d.$emit("selectPool"):void 0)},{default:p(()=>[a(C,{class:"pool-card__body full-height"},{default:p(()=>[t("div",H,[t("div",O,[s(i)?.image?(_(),v("img",{key:0,src:s(i)?.image,alt:s(i)?.symbol},null,8,R)):r("",!0),s(c)?.image?(_(),v("img",{key:1,src:s(c)?.image,alt:s(c)?.symbol},null,8,U)):r("",!0)]),t("div",W,[t("span",null,e(s(i)?.symbol)+"/"+e(s(c)?.symbol),1)]),t("span",G,[D(" i "),a(L,{modelValue:s(S),"onUpdate:modelValue":n[0]||(n[0]=b=>Q(S)?S.value=b:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:p(()=>[a(T,{class:"pool-info q-pa-md"},{default:p(()=>[t("div",Y,[t("div",null,[J,s(x)?(_(),v("div",K,e(s(k).format(s(x))),1)):r("",!0)]),Z,t("div",null,[z,s(u)?(_(),v("div",X,e(s(k).format(s(u).ownerWithdraw)),1)):r("",!0)])]),t("div",tt,[t("div",ot,[st,t("div",et,[t("span",at,e(s(y)(o.pubkey.toBase58(),14)),1),a(f,{text:o.pubkey.toBase58()},null,8,["text"])])]),t("div",lt,[nt,t("div",it,[t("span",ct,e(s(y)(o.data.tokenAMint.toBase58(),14)),1),a(f,{text:o.data.tokenAMint.toBase58()},null,8,["text"])])]),t("div",dt,[_t,t("div",rt,[t("span",ut,e(s(y)(o.data.tokenBMint.toBase58(),14)),1),a(f,{text:o.data.tokenBMint.toBase58()},null,8,["text"])])]),t("div",mt,[pt,t("div",vt,[t("span",ht,e(s(y)(o.data.poolMint.toBase58(),14)),1),a(f,{text:o.data.poolMint.toBase58()},null,8,["text"])])])])]),_:1})]),_:1},8,["modelValue"])])]),t("div",ft,[t("div",null,[bt,t("div",kt,e(o.poolStats&&!Number.isNaN(o.poolStats.apr24)?`${s(k).format(o.poolStats.apr24)}`:"---"),1)]),t("div",yt,[t("div",null,[wt,t("div",St,e(o.poolStats&&!Number.isNaN(o.poolStats.poolTokenSupply)&&o.userTokens?`$${s(w).format(o.userTokens/o.poolStats.poolTokenSupply*o.poolStats.tvl)}`:"---"),1)]),t("div",Bt,[qt,t("div",xt,e(o.poolStats&&!Number.isNaN(o.poolStats.poolTokenSupply)&&o.userTokens?`${s(k).format(o.userTokens/o.poolStats.poolTokenSupply)}`:"---"),1)])])]),t("div",Tt,[t("div",gt,[$t,t("div",jt,e(o.poolStats?`$${s(w).format(o.poolStats.volume24)}`:"---"),1)]),Nt,t("div",Mt,[At,t("div",Pt,e(o.poolStats?`$${s(w).format(o.poolStats.tvl)}`:"---"),1)]),Vt,t("div",Ct,[Dt,t("div",Lt,e(o.poolStats?`$${s(w).format(o.poolStats.fees24)}`:"---"),1)])]),o.useEmit?r("",!0):(_(),v("div",Qt,[t("div",Et,[a(E,{spread:"",unelevated:"",square:"",class:"pool-card__actions"},{default:p(()=>[a(g,{label:"ADD LIQUIDITY",color:"primary","text-color":"white",target:"_blank",class:"q-mr-md",onClick:n[1]||(n[1]=b=>q(!0))}),a(g,{label:"SWAP",color:"warning","text-color":"black",target:"_blank",onClick:n[2]||(n[2]=b=>q(!1))})]),_:1})])]))]),_:1})]),_:1})):r("",!0)}}});export{Ht as _}; diff --git a/assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js b/assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js similarity index 86% rename from assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js rename to assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js index 0b59393..c2a4ac7 100644 --- a/assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js +++ b/assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js @@ -1 +1 @@ -import{_ as g}from"./PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js";import{V as k,v as w,G as S,a3 as s,o as r,i,j as t,a9 as v,a2 as u,a5 as h,Z as d,a0 as y,a8 as V,$ as x,ad as C,au as b,aE as B,as as N,aI as P,a4 as Q}from"./index-d1afe763.js";import{u as $}from"./swap-a8389507.js";const q={key:0},z={class:"row items-center"},D={class:"text-weight-medium fs-13"},j=k({__name:"SelectPool",setup(E){const n=$(),l=w(()=>n.tokenSwaps),{state:m}=n,a=S(!1);function p(c){n.setTokenSwap(c),a.value=!1}return(c,o)=>{const _=g;return s(l).length>1?(r(),i("div",q,[t(v,{showing:s(m)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",z,[u("div",D," Found "+h(s(l).length)+" pools for this token pair ",1),t(V,{"text-color":"primary",class:"q-ml-auto swap-card__select-pool-btn",size:"sm",onClick:o[0]||(o[0]=e=>a.value=!0)},{default:d(()=>[y(" Select ")]),_:1})]),t(P,{modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=e=>N(a)?a.value=e:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:d(()=>[t(x,{class:"q-pa-md"},{default:d(()=>[(r(!0),i(C,null,b(s(l),(e,f)=>(r(),i("div",{key:e.pubkey.toBase58(),class:"cursor-pointer"},[t(_,{pubkey:e.pubkey,data:e.data,"use-emit":"",class:B({"q-mt-md":f}),onSelectPool:F=>p(e)},null,8,["pubkey","data","class","onSelectPool"])]))),128))]),_:1})]),_:1},8,["modelValue"])])):Q("",!0)}}});export{j as _}; +import{_ as g}from"./PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js";import{V as k,v as w,G as S,a3 as s,o as r,i,j as t,a9 as v,a2 as u,a5 as h,Z as d,a0 as y,a8 as V,$ as x,ad as C,au as b,aE as B,as as N,aI as P,a4 as Q}from"./index-3e319056.js";import{u as $}from"./swap-6005a05e.js";const q={key:0},z={class:"row items-center"},D={class:"text-weight-medium fs-13"},j=k({__name:"SelectPool",setup(E){const n=$(),l=w(()=>n.tokenSwaps),{state:m}=n,a=S(!1);function p(c){n.setTokenSwap(c),a.value=!1}return(c,o)=>{const _=g;return s(l).length>1?(r(),i("div",q,[t(v,{showing:s(m)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",z,[u("div",D," Found "+h(s(l).length)+" pools for this token pair ",1),t(V,{"text-color":"primary",class:"q-ml-auto swap-card__select-pool-btn",size:"sm",onClick:o[0]||(o[0]=e=>a.value=!0)},{default:d(()=>[y(" Select ")]),_:1})]),t(P,{modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=e=>N(a)?a.value=e:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:d(()=>[t(x,{class:"q-pa-md"},{default:d(()=>[(r(!0),i(C,null,b(s(l),(e,f)=>(r(),i("div",{key:e.pubkey.toBase58(),class:"cursor-pointer"},[t(_,{pubkey:e.pubkey,data:e.data,"use-emit":"",class:B({"q-mt-md":f}),onSelectPool:F=>p(e)},null,8,["pubkey","data","class","onSelectPool"])]))),128))]),_:1})]),_:1},8,["modelValue"])])):Q("",!0)}}});export{j as _}; diff --git a/assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js b/assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js similarity index 99% rename from assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js rename to assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js index dfb504f..453a169 100644 --- a/assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js +++ b/assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js @@ -1 +1 @@ -import{bD as m,bE as J,V as F,G as g,C as x,v as q,o as k,i as K,j as t,Z as r,av as v,a2 as C,a3 as d,a7 as h,as as p,Y as X,aj as A,bF as R,a4 as ee,ax as S,ay as ue,bG as b,az as ae,a0 as y,a5 as ne,aA as oe,aE as re}from"./index-d1afe763.js";function ou(e){const u=e.keyCode?e.keyCode:e.which;(u<48||u>57)&&u!==46&&e.preventDefault(),u===46&&String(e.target.value).includes(".")&&e.preventDefault()}function te(e,u){for(var a=-1,n=e==null?0:e.length,o=Array(n);++aa.token,l=>{o.value=l});function c(){n.value=""}const Y=q(()=>a.options.map(l=>({...l,inactive:L(String(l?.symbol))===L(a.swapToken)})));return x(n,l=>{u("handleSearchToken",l)}),x(o,l=>{u("setToken",l,a.direction)}),(l,i)=>(k(),K("div",{class:re(["token-select",{"token-select--inactive":e.destinationUnavailable}])},[t(oe,{modelValue:d(o),"onUpdate:modelValue":i[3]||(i[3]=s=>p(o)?o.value=s:null),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:d(Y),dense:"","options-dense":!1,disable:e.disable,"option-value":"mint","option-label":"symbol",onPopupHide:c},{prepend:r(()=>[t(v,null,{default:r(()=>[C("img",{src:d(o)?.image,alt:d(o)?.symbol},null,8,uu)]),_:1})]),"before-options":r(()=>[t(h,{modelValue:d(n),"onUpdate:modelValue":i[0]||(i[0]=s=>p(n)?n.value=s:null),maxlength:8,outlined:"",class:"token-search",placeholder:"search"},{append:r(()=>[d(n)?(k(),X(A,{key:0,name:d(R),class:"cursor-pointer token-search__close",onClick:c},null,8,["name"])):ee("",!0)]),_:1},8,["modelValue"])]),option:r(s=>[t(S,ue(s.itemProps,{class:"token-select__token"}),{default:r(()=>[t(b,{avatar:"",class:"token-select__token--item"},{default:r(()=>[t(v,null,{default:r(()=>[C("img",{src:s.opt.image},null,8,au)]),_:2},1024)]),_:2},1024),t(b,null,{default:r(()=>[t(ae,null,{default:r(()=>[y(ne(s.opt.symbol),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),"no-option":r(()=>[t(h,{modelValue:d(n),"onUpdate:modelValue":i[2]||(i[2]=s=>p(n)?n.value=s:null),maxlength:8,outlined:"",class:"token-search"},{append:r(()=>[t(A,{name:d(R),class:"cursor-pointer token-search__close",onClick:i[1]||(i[1]=s=>n.value="")},null,8,["name"])]),_:1},8,["modelValue"]),t(S,null,{default:r(()=>[t(b,{class:"text-grey"},{default:r(()=>[y(" No results ")]),_:1})]),_:1})]),_:1},8,["modelValue","options","disable"])],2))}});export{ru as _,ou as o}; +import{bD as m,bE as J,V as F,G as g,C as x,v as q,o as k,i as K,j as t,Z as r,av as v,a2 as C,a3 as d,a7 as h,as as p,Y as X,aj as A,bF as R,a4 as ee,ax as S,ay as ue,bG as b,az as ae,a0 as y,a5 as ne,aA as oe,aE as re}from"./index-3e319056.js";function ou(e){const u=e.keyCode?e.keyCode:e.which;(u<48||u>57)&&u!==46&&e.preventDefault(),u===46&&String(e.target.value).includes(".")&&e.preventDefault()}function te(e,u){for(var a=-1,n=e==null?0:e.length,o=Array(n);++aa.token,l=>{o.value=l});function c(){n.value=""}const Y=q(()=>a.options.map(l=>({...l,inactive:L(String(l?.symbol))===L(a.swapToken)})));return x(n,l=>{u("handleSearchToken",l)}),x(o,l=>{u("setToken",l,a.direction)}),(l,i)=>(k(),K("div",{class:re(["token-select",{"token-select--inactive":e.destinationUnavailable}])},[t(oe,{modelValue:d(o),"onUpdate:modelValue":i[3]||(i[3]=s=>p(o)?o.value=s:null),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:d(Y),dense:"","options-dense":!1,disable:e.disable,"option-value":"mint","option-label":"symbol",onPopupHide:c},{prepend:r(()=>[t(v,null,{default:r(()=>[C("img",{src:d(o)?.image,alt:d(o)?.symbol},null,8,uu)]),_:1})]),"before-options":r(()=>[t(h,{modelValue:d(n),"onUpdate:modelValue":i[0]||(i[0]=s=>p(n)?n.value=s:null),maxlength:8,outlined:"",class:"token-search",placeholder:"search"},{append:r(()=>[d(n)?(k(),X(A,{key:0,name:d(R),class:"cursor-pointer token-search__close",onClick:c},null,8,["name"])):ee("",!0)]),_:1},8,["modelValue"])]),option:r(s=>[t(S,ue(s.itemProps,{class:"token-select__token"}),{default:r(()=>[t(b,{avatar:"",class:"token-select__token--item"},{default:r(()=>[t(v,null,{default:r(()=>[C("img",{src:s.opt.image},null,8,au)]),_:2},1024)]),_:2},1024),t(b,null,{default:r(()=>[t(ae,null,{default:r(()=>[y(ne(s.opt.symbol),1)]),_:2},1024)]),_:2},1024)]),_:2},1040)]),"no-option":r(()=>[t(h,{modelValue:d(n),"onUpdate:modelValue":i[2]||(i[2]=s=>p(n)?n.value=s:null),maxlength:8,outlined:"",class:"token-search"},{append:r(()=>[t(A,{name:d(R),class:"cursor-pointer token-search__close",onClick:i[1]||(i[1]=s=>n.value="")},null,8,["name"])]),_:1},8,["modelValue"]),t(S,null,{default:r(()=>[t(b,{class:"text-grey"},{default:r(()=>[y(" No results ")]),_:1})]),_:1})]),_:1},8,["modelValue","options","disable"])],2))}});export{ru as _,ou as o}; diff --git a/assets/TransportWebHID-ae61659d.js b/assets/TransportWebHID-cf6557f6.js similarity index 77% rename from assets/TransportWebHID-ae61659d.js rename to assets/TransportWebHID-cf6557f6.js index de44e94..eae1479 100644 --- a/assets/TransportWebHID-ae61659d.js +++ b/assets/TransportWebHID-cf6557f6.js @@ -1 +1 @@ -import{g as Cn,l as Bn,a as B,c as En,p as xn,D as Mn,T as Be,d as jn,e as Vn,f as Fn}from"./index-d1afe763.js";var gn={};const Xn=Cn(Bn);(function(t){t.__esModule=!0;var e=Xn,n=5;function r(c){var d=B.Buffer.alloc(2);return d.writeUInt16BE(c,0),d}var s={data:B.Buffer.alloc(0),dataLength:0,sequence:0},i=function(c,d){return{makeBlocks:function(a){var o=B.Buffer.concat([r(a.length),a]),_=d-5,l=Math.ceil(o.length/_);o=B.Buffer.concat([o,B.Buffer.alloc(l*_-o.length+1).fill(0)]);for(var R=[],p=0;pR&&(l=l.slice(0,R)),{data:l,dataLength:R,sequence:p}},getReducedResult:function(a){if(a&&a.dataLength===a.data.length)return a.data}}};t.default=i})(gn);const Wn=En(gn);var Se={exports:{}};const Yn="2.0.0",vn=256,Kn=Number.MAX_SAFE_INTEGER||9007199254740991,qn=16,zn=vn-6,Jn=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var pe={MAX_LENGTH:vn,MAX_SAFE_COMPONENT_LENGTH:qn,MAX_SAFE_BUILD_LENGTH:zn,MAX_SAFE_INTEGER:Kn,RELEASE_TYPES:Jn,SEMVER_SPEC_VERSION:Yn,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Zn=typeof xn=="object"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG&&/\bsemver\b/i.test({GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var de=Zn;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=pe,i=de;e=t.exports={};const c=e.re=[],d=e.safeRe=[],a=e.src=[],o=e.t={};let _=0;const l="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",s],[l,r]],p=U=>{for(const[$,y]of R)U=U.split(`${$}*`).join(`${$}{0,${y}}`).split(`${$}+`).join(`${$}{1,${y}}`);return U},h=(U,$,y)=>{const D=p($),X=_++;i(U,X,$),o[U]=X,a[X]=$,c[X]=new RegExp($,y?"g":void 0),d[X]=new RegExp(D,y?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${l}*`),h("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${l}+`),h("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),h("FULL",`^${a[o.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),h("LOOSE",`^${a[o.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),h("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),h("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),h("COERCERTL",a[o.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",h("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",h("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Se,Se.exports);var se=Se.exports;const Qn=Object.freeze({loose:!0}),et=Object.freeze({}),nt=t=>t?typeof t!="object"?Qn:t:et;var ke=nt;const xe=/^[0-9]+$/,Tn=(t,e)=>{const n=xe.test(t),r=xe.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tTn(e,t);var Rn={compareIdentifiers:Tn,rcompareIdentifiers:tt};const ie=de,{MAX_LENGTH:Me,MAX_SAFE_INTEGER:ae}=pe,{safeRe:je,t:Ve}=se,rt=ke,{compareIdentifiers:z}=Rn;let st=class C{constructor(e,n){if(n=rt(n),e instanceof C){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Me)throw new TypeError(`version is longer than ${Me} characters`);ie("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=e.trim().match(n.loose?je[Ve.LOOSE]:je[Ve.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ae||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ae||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ae||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),z(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var k=st;const Fe=k,it=(t,e,n=!1)=>{if(t instanceof Fe)return t;try{return new Fe(t,e)}catch(r){if(!n)return null;throw r}};var Q=it;const at=Q,ot=(t,e)=>{const n=at(t,e);return n?n.version:null};var _t=ot;const ct=Q,ut=(t,e)=>{const n=ct(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};var lt=ut;const Xe=k,pt=(t,e,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new Xe(t instanceof Xe?t.version:t,n).inc(e,r,s).version}catch{return null}};var dt=pt;const We=Q,mt=(t,e)=>{const n=We(t,null,!0),r=We(e,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,c=i?n:r,d=i?r:n,a=!!c.prerelease.length;if(!!d.prerelease.length&&!a)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const _=a?"pre":"";return n.major!==r.major?_+"major":n.minor!==r.minor?_+"minor":n.patch!==r.patch?_+"patch":"prerelease"};var ht=mt;const ft=k,Et=(t,e)=>new ft(t,e).major;var gt=Et;const vt=k,Tt=(t,e)=>new vt(t,e).minor;var Rt=Tt;const It=k,bt=(t,e)=>new It(t,e).patch;var Ot=bt;const Nt=Q,At=(t,e)=>{const n=Nt(t,e);return n&&n.prerelease.length?n.prerelease:null};var St=At;const Ye=k,Dt=(t,e,n)=>new Ye(t,n).compare(new Ye(e,n));var H=Dt;const Lt=H,$t=(t,e,n)=>Lt(e,t,n);var kt=$t;const Ut=H,yt=(t,e)=>Ut(t,e,!0);var Pt=yt;const Ke=k,wt=(t,e,n)=>{const r=new Ke(t,n),s=new Ke(e,n);return r.compare(s)||r.compareBuild(s)};var Ue=wt;const Ht=Ue,Gt=(t,e)=>t.sort((n,r)=>Ht(n,r,e));var Ct=Gt;const Bt=Ue,xt=(t,e)=>t.sort((n,r)=>Bt(r,n,e));var Mt=xt;const jt=H,Vt=(t,e,n)=>jt(t,e,n)>0;var me=Vt;const Ft=H,Xt=(t,e,n)=>Ft(t,e,n)<0;var ye=Xt;const Wt=H,Yt=(t,e,n)=>Wt(t,e,n)===0;var In=Yt;const Kt=H,qt=(t,e,n)=>Kt(t,e,n)!==0;var bn=qt;const zt=H,Jt=(t,e,n)=>zt(t,e,n)>=0;var Pe=Jt;const Zt=H,Qt=(t,e,n)=>Zt(t,e,n)<=0;var we=Qt;const er=In,nr=bn,tr=me,rr=Pe,sr=ye,ir=we,ar=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return er(t,n,r);case"!=":return nr(t,n,r);case">":return tr(t,n,r);case">=":return rr(t,n,r);case"<":return sr(t,n,r);case"<=":return ir(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};var On=ar;const or=k,_r=Q,{safeRe:oe,t:_e}=se,cr=(t,e)=>{if(t instanceof or)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(oe[_e.COERCE]);else{let r;for(;(r=oe[_e.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||r.index+r[0].length!==n.index+n[0].length)&&(n=r),oe[_e.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;oe[_e.COERCERTL].lastIndex=-1}return n===null?null:_r(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,e)};var ur=cr,Ee,qe;function lr(){return qe||(qe=1,Ee=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),Ee}var pr=b;b.Node=q;b.create=b;function b(t){var e=this;if(e instanceof b||(e=new b),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=e;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)n=t(n,r.value,s),r=r.next;return n};b.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)n=t(n,r.value,s),r=r.prev;return n};b.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;n!==null;e++)t[e]=n.value,n=n.next;return t};b.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;n!==null;e++)t[e]=n.value,n=n.prev;return t};b.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new b;if(ethis.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&rthis.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)n.push(s.value);return n};b.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r1;class Er{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Y]=e.max||1/0;const n=e.length||ge;if(this[J]=typeof n!="function"?ge:n,this[re]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[K]=e.maxAge||0,this[x]=e.dispose,this[ze]=e.noDisposeOnSet||!1,this[Nn]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Y]=e||1/0,ne(this)}get max(){return this[Y]}set allowStale(e){this[re]=!!e}get allowStale(){return this[re]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[K]=e,ne(this)}get maxAge(){return this[K]}set lengthCalculator(e){typeof e!="function"&&(e=ge),e!==this[J]&&(this[J]=e,this[M]=0,this[S].forEach(n=>{n.length=this[J](n.value,n.key),this[M]+=n.length})),ne(this)}get lengthCalculator(){return this[J]}get length(){return this[M]}get itemCount(){return this[S].length}rforEach(e,n){n=n||this;for(let r=this[S].tail;r!==null;){const s=r.prev;Je(this,e,r,n),r=s}}forEach(e,n){n=n||this;for(let r=this[S].head;r!==null;){const s=r.next;Je(this,e,r,n),r=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[x]&&this[S]&&this[S].length&&this[S].forEach(e=>this[x](e.key,e.value)),this[w]=new Map,this[S]=new fr,this[M]=0}dump(){return this[S].map(e=>ue(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,n,r){if(r=r||this[K],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[J](n,e);if(this[w].has(e)){if(i>this[Y])return Z(this,this[w].get(e)),!1;const a=this[w].get(e).value;return this[x]&&(this[ze]||this[x](e,a.value)),a.now=s,a.maxAge=r,a.value=n,this[M]+=i-a.length,a.length=i,this.get(e),ne(this),!0}const c=new gr(e,n,i,s,r);return c.length>this[Y]?(this[x]&&this[x](e,n),!1):(this[M]+=c.length,this[S].unshift(c),this[w].set(e,this[S].head),ne(this),!0)}has(e){if(!this[w].has(e))return!1;const n=this[w].get(e).value;return!ue(this,n)}get(e){return ve(this,e,!0)}peek(e){return ve(this,e,!1)}pop(){const e=this[S].tail;return e?(Z(this,e),e.value):null}del(e){Z(this,this[w].get(e))}load(e){this.reset();const n=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const c=i-n;c>0&&this.set(s.k,s.v,c)}}}prune(){this[w].forEach((e,n)=>ve(this,n,!1))}}const ve=(t,e,n)=>{const r=t[w].get(e);if(r){const s=r.value;if(ue(t,s)){if(Z(t,r),!t[re])return}else n&&(t[Nn]&&(r.value.now=Date.now()),t[S].unshiftNode(r));return s.value}},ue=(t,e)=>{if(!e||!e.maxAge&&!t[K])return!1;const n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[K]&&n>t[K]},ne=t=>{if(t[M]>t[Y])for(let e=t[S].tail;t[M]>t[Y]&&e!==null;){const n=e.prev;Z(t,e),e=n}},Z=(t,e)=>{if(e){const n=e.value;t[x]&&t[x](n.key,n.value),t[M]-=n.length,t[w].delete(n.key),t[S].removeNode(e)}};class gr{constructor(e,n,r,s,i){this.key=e,this.value=n,this.length=r,this.now=s,this.maxAge=i||0}}const Je=(t,e,n,r)=>{let s=n.value;ue(t,s)&&(Z(t,n),t[re]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var vr=Er,Te,Ze;function G(){if(Ze)return Te;Ze=1;class t{constructor(u,v){if(v=r(v),u instanceof t)return u.loose===!!v.loose&&u.includePrerelease===!!v.includePrerelease?u:new t(u.raw,v);if(u instanceof s)return this.raw=u.value,this.set=[[u]],this.format(),this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=u.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(E=>this.parseRange(E.trim())).filter(E=>E.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const E=this.set[0];if(this.set=this.set.filter(g=>!h(g[0])),this.set.length===0)this.set=[E];else if(this.set.length>1){for(const g of this.set)if(g.length===1&&U(g[0])){this.set=[g];break}}}this.format()}format(){return this.range=this.set.map(u=>u.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(u){const E=((this.options.includePrerelease&&R)|(this.options.loose&&p))+":"+u,g=n.get(E);if(g)return g;const f=this.options.loose,T=f?d[a.HYPHENRANGELOOSE]:d[a.HYPHENRANGE];u=u.replace(T,Hn(this.options.includePrerelease)),i("hyphen replace",u),u=u.replace(d[a.COMPARATORTRIM],o),i("comparator trim",u),u=u.replace(d[a.TILDETRIM],_),i("tilde trim",u),u=u.replace(d[a.CARETTRIM],l),i("caret trim",u);let O=u.split(" ").map(A=>y(A,this.options)).join(" ").split(/\s+/).map(A=>wn(A,this.options));f&&(O=O.filter(A=>(i("loose invalid filter",A,this.options),!!A.match(d[a.COMPARATORLOOSE])))),i("range list",O);const I=new Map,N=O.map(A=>new s(A,this.options));for(const A of N){if(h(A))return[A];I.set(A.value,A)}I.size>1&&I.has("")&&I.delete("");const P=[...I.values()];return n.set(E,P),P}intersects(u,v){if(!(u instanceof t))throw new TypeError("a Range is required");return this.set.some(E=>$(E,v)&&u.set.some(g=>$(g,v)&&E.every(f=>g.every(T=>f.intersects(T,v)))))}test(u){if(!u)return!1;if(typeof u=="string")try{u=new c(u,this.options)}catch{return!1}for(let v=0;vm.value==="<0.0.0-0",U=m=>m.value==="",$=(m,u)=>{let v=!0;const E=m.slice();let g=E.pop();for(;v&&E.length;)v=E.every(f=>g.intersects(f,u)),g=E.pop();return v},y=(m,u)=>(i("comp",m,u),m=$n(m,u),i("caret",m),m=X(m,u),i("tildes",m),m=Un(m,u),i("xrange",m),m=Pn(m,u),i("stars",m),m),D=m=>!m||m.toLowerCase()==="x"||m==="*",X=(m,u)=>m.trim().split(/\s+/).map(v=>Ln(v,u)).join(" "),Ln=(m,u)=>{const v=u.loose?d[a.TILDELOOSE]:d[a.TILDE];return m.replace(v,(E,g,f,T,O)=>{i("tilde",m,E,g,f,T,O);let I;return D(g)?I="":D(f)?I=`>=${g}.0.0 <${+g+1}.0.0-0`:D(T)?I=`>=${g}.${f}.0 <${g}.${+f+1}.0-0`:O?(i("replaceTilde pr",O),I=`>=${g}.${f}.${T}-${O} <${g}.${+f+1}.0-0`):I=`>=${g}.${f}.${T} <${g}.${+f+1}.0-0`,i("tilde return",I),I})},$n=(m,u)=>m.trim().split(/\s+/).map(v=>kn(v,u)).join(" "),kn=(m,u)=>{i("caret",m,u);const v=u.loose?d[a.CARETLOOSE]:d[a.CARET],E=u.includePrerelease?"-0":"";return m.replace(v,(g,f,T,O,I)=>{i("caret",m,g,f,T,O,I);let N;return D(f)?N="":D(T)?N=`>=${f}.0.0${E} <${+f+1}.0.0-0`:D(O)?f==="0"?N=`>=${f}.${T}.0${E} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.0${E} <${+f+1}.0.0-0`:I?(i("replaceCaret pr",I),f==="0"?T==="0"?N=`>=${f}.${T}.${O}-${I} <${f}.${T}.${+O+1}-0`:N=`>=${f}.${T}.${O}-${I} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.${O}-${I} <${+f+1}.0.0-0`):(i("no pr"),f==="0"?T==="0"?N=`>=${f}.${T}.${O}${E} <${f}.${T}.${+O+1}-0`:N=`>=${f}.${T}.${O}${E} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.${O} <${+f+1}.0.0-0`),i("caret return",N),N})},Un=(m,u)=>(i("replaceXRanges",m,u),m.split(/\s+/).map(v=>yn(v,u)).join(" ")),yn=(m,u)=>{m=m.trim();const v=u.loose?d[a.XRANGELOOSE]:d[a.XRANGE];return m.replace(v,(E,g,f,T,O,I)=>{i("xRange",m,E,g,f,T,O,I);const N=D(f),P=N||D(T),A=P||D(O),ee=A;return g==="="&&ee&&(g=""),I=u.includePrerelease?"-0":"",N?g===">"||g==="<"?E="<0.0.0-0":E="*":g&&ee?(P&&(T=0),O=0,g===">"?(g=">=",P?(f=+f+1,T=0,O=0):(T=+T+1,O=0)):g==="<="&&(g="<",P?f=+f+1:T=+T+1),g==="<"&&(I="-0"),E=`${g+f}.${T}.${O}${I}`):P?E=`>=${f}.0.0${I} <${+f+1}.0.0-0`:A&&(E=`>=${f}.${T}.0${I} <${f}.${+T+1}.0-0`),i("xRange return",E),E})},Pn=(m,u)=>(i("replaceStars",m,u),m.trim().replace(d[a.STAR],"")),wn=(m,u)=>(i("replaceGTE0",m,u),m.trim().replace(d[u.includePrerelease?a.GTE0PRE:a.GTE0],"")),Hn=m=>(u,v,E,g,f,T,O,I,N,P,A,ee,ti)=>(D(E)?v="":D(g)?v=`>=${E}.0.0${m?"-0":""}`:D(f)?v=`>=${E}.${g}.0${m?"-0":""}`:T?v=`>=${v}`:v=`>=${v}${m?"-0":""}`,D(N)?I="":D(P)?I=`<${+N+1}.0.0-0`:D(A)?I=`<${N}.${+P+1}.0-0`:ee?I=`<=${N}.${P}.${A}-${ee}`:m?I=`<${N}.${P}.${+A+1}-0`:I=`<=${I}`,`${v} ${I}`.trim()),Gn=(m,u,v)=>{for(let E=0;E0){const g=m[E].semver;if(g.major===u.major&&g.minor===u.minor&&g.patch===u.patch)return!0}return!1}return!0};return Te}var Re,Qe;function he(){if(Qe)return Re;Qe=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(_,l){if(l=n(l),_ instanceof e){if(_.loose===!!l.loose)return _;_=_.value}_=_.trim().split(/\s+/).join(" "),c("comparator",_,l),this.options=l,this.loose=!!l.loose,this.parse(_),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(_){const l=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],R=_.match(l);if(!R)throw new TypeError(`Invalid comparator: ${_}`);this.operator=R[1]!==void 0?R[1]:"",this.operator==="="&&(this.operator=""),R[2]?this.semver=new d(R[2],this.options.loose):this.semver=t}toString(){return this.value}test(_){if(c("Comparator.test",_,this.options.loose),this.semver===t||_===t)return!0;if(typeof _=="string")try{_=new d(_,this.options)}catch{return!1}return i(_,this.operator,this.semver,this.options)}intersects(_,l){if(!(_ instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(_.value,l).test(this.value):_.operator===""?_.value===""?!0:new a(this.value,l).test(_.semver):(l=n(l),l.includePrerelease&&(this.value==="<0.0.0-0"||_.value==="<0.0.0-0")||!l.includePrerelease&&(this.value.startsWith("<0.0.0")||_.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&_.operator.startsWith(">")||this.operator.startsWith("<")&&_.operator.startsWith("<")||this.semver.version===_.semver.version&&this.operator.includes("=")&&_.operator.includes("=")||i(this.semver,"<",_.semver,l)&&this.operator.startsWith(">")&&_.operator.startsWith("<")||i(this.semver,">",_.semver,l)&&this.operator.startsWith("<")&&_.operator.startsWith(">")))}}Re=e;const n=ke,{safeRe:r,t:s}=se,i=On,c=de,d=k,a=G();return Re}const Tr=G(),Rr=(t,e,n)=>{try{e=new Tr(e,n)}catch{return!1}return e.test(t)};var fe=Rr;const Ir=G(),br=(t,e)=>new Ir(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var Or=br;const Nr=k,Ar=G(),Sr=(t,e,n)=>{let r=null,s=null,i=null;try{i=new Ar(e,n)}catch{return null}return t.forEach(c=>{i.test(c)&&(!r||s.compare(c)===-1)&&(r=c,s=new Nr(r,n))}),r};var Dr=Sr;const Lr=k,$r=G(),kr=(t,e,n)=>{let r=null,s=null,i=null;try{i=new $r(e,n)}catch{return null}return t.forEach(c=>{i.test(c)&&(!r||s.compare(c)===1)&&(r=c,s=new Lr(r,n))}),r};var Ur=kr;const Ie=k,yr=G(),en=me,Pr=(t,e)=>{t=new yr(t,e);let n=new Ie("0.0.0");if(t.test(n)||(n=new Ie("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r{const d=new Ie(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!i||en(d,i))&&(i=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),i&&(!n||en(n,i))&&(n=i)}return n&&t.test(n)?n:null};var wr=Pr;const Hr=G(),Gr=(t,e)=>{try{return new Hr(t,e).range||"*"}catch{return null}};var Cr=Gr;const Br=k,An=he(),{ANY:xr}=An,Mr=G(),jr=fe,nn=me,tn=ye,Vr=we,Fr=Pe,Xr=(t,e,n,r)=>{t=new Br(t,r),e=new Mr(e,r);let s,i,c,d,a;switch(n){case">":s=nn,i=Vr,c=tn,d=">",a=">=";break;case"<":s=tn,i=Fr,c=nn,d="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jr(t,e,r))return!1;for(let o=0;o{p.semver===xr&&(p=new An(">=0.0.0")),l=l||p,R=R||p,s(p.semver,l.semver,r)?l=p:c(p.semver,R.semver,r)&&(R=p)}),l.operator===d||l.operator===a||(!R.operator||R.operator===d)&&i(t,R.semver))return!1;if(R.operator===a&&c(t,R.semver))return!1}return!0};var He=Xr;const Wr=He,Yr=(t,e,n)=>Wr(t,e,">",n);var Kr=Yr;const qr=He,zr=(t,e,n)=>qr(t,e,"<",n);var Jr=zr;const rn=G(),Zr=(t,e,n)=>(t=new rn(t,n),e=new rn(e,n),t.intersects(e,n));var Qr=Zr;const es=fe,ns=H;var ts=(t,e,n)=>{const r=[];let s=null,i=null;const c=t.sort((_,l)=>ns(_,l,n));for(const _ of c)es(_,e,n)?(i=_,s||(s=_)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const d=[];for(const[_,l]of r)_===l?d.push(_):!l&&_===c[0]?d.push("*"):l?_===c[0]?d.push(`<=${l}`):d.push(`${_} - ${l}`):d.push(`>=${_}`);const a=d.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return a.length{if(t===e)return!0;t=new sn(t,n),e=new sn(e,n);let r=!1;e:for(const s of t.set){for(const i of e.set){const c=is(s,i,n);if(r=r||c!==null,c)continue e}if(r)return!1}return!0},ss=[new Ge(">=0.0.0-0")],an=[new Ge(">=0.0.0")],is=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===be){if(e.length===1&&e[0].semver===be)return!0;n.includePrerelease?t=ss:t=an}if(e.length===1&&e[0].semver===be){if(n.includePrerelease)return!0;e=an}const r=new Set;let s,i;for(const p of t)p.operator===">"||p.operator===">="?s=on(s,p,n):p.operator==="<"||p.operator==="<="?i=_n(i,p,n):r.add(p.semver);if(r.size>1)return null;let c;if(s&&i){if(c=Ce(s.semver,i.semver,n),c>0)return null;if(c===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const p of r){if(s&&!te(p,String(s),n)||i&&!te(p,String(i),n))return null;for(const h of e)if(!te(p,String(h),n))return!1;return!0}let d,a,o,_,l=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,R=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;l&&l.prerelease.length===1&&i.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(const p of e){if(_=_||p.operator===">"||p.operator===">=",o=o||p.operator==="<"||p.operator==="<=",s){if(R&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===R.major&&p.semver.minor===R.minor&&p.semver.patch===R.patch&&(R=!1),p.operator===">"||p.operator===">="){if(d=on(s,p,n),d===p&&d!==s)return!1}else if(s.operator===">="&&!te(s.semver,String(p),n))return!1}if(i){if(l&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===l.major&&p.semver.minor===l.minor&&p.semver.patch===l.patch&&(l=!1),p.operator==="<"||p.operator==="<="){if(a=_n(i,p,n),a===p&&a!==i)return!1}else if(i.operator==="<="&&!te(i.semver,String(p),n))return!1}if(!p.operator&&(i||s)&&c!==0)return!1}return!(s&&o&&!i&&c!==0||i&&_&&!s&&c!==0||R||l)},on=(t,e,n)=>{if(!t)return e;const r=Ce(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},_n=(t,e,n)=>{if(!t)return e;const r=Ce(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};var as=rs;const Oe=se,cn=pe,os=k,un=Rn,_s=Q,cs=_t,us=lt,ls=dt,ps=ht,ds=gt,ms=Rt,hs=Ot,fs=St,Es=H,gs=kt,vs=Pt,Ts=Ue,Rs=Ct,Is=Mt,bs=me,Os=ye,Ns=In,As=bn,Ss=Pe,Ds=we,Ls=On,$s=ur,ks=he(),Us=G(),ys=fe,Ps=Or,ws=Dr,Hs=Ur,Gs=wr,Cs=Cr,Bs=He,xs=Kr,Ms=Jr,js=Qr,Vs=ts,Fs=as;var Xs={parse:_s,valid:cs,clean:us,inc:ls,diff:ps,major:ds,minor:ms,patch:hs,prerelease:fs,compare:Es,rcompare:gs,compareLoose:vs,compareBuild:Ts,sort:Rs,rsort:Is,gt:bs,lt:Os,eq:Ns,neq:As,gte:Ss,lte:Ds,cmp:Ls,coerce:$s,Comparator:ks,Range:Us,satisfies:ys,toComparators:Ps,maxSatisfying:ws,minSatisfying:Hs,minVersion:Gs,validRange:Cs,outside:Bs,gtr:xs,ltr:Ms,intersects:js,simplifyRange:Vs,subset:Fs,SemVer:os,re:Oe.re,src:Oe.src,tokens:Oe.t,SEMVER_SPEC_VERSION:cn.SEMVER_SPEC_VERSION,RELEASE_TYPES:cn.RELEASE_TYPES,compareIdentifiers:un.compareIdentifiers,rcompareIdentifiers:un.rcompareIdentifiers};const ln=En(Xs);var De=globalThis&&globalThis.__assign||function(){return De=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>8,r=pn.find(function(s){return s.productIdMM===n});return r},Ws=[],mn={};for(var Ys in Le){var hn=Le[Ys],Ne=hn.bluetoothSpec;if(Ne)for(var Ae=0;Ae0&&i[i.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]0)&&!(s=r.next()).done;)i.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return i},Qs=[{vendorId:Sn}],ei=function(){return Promise.resolve(!!(window.navigator&&window.navigator.hid))},le=function(){var t=navigator.hid;if(!t)throw new Vn("navigator.hid is not supported","HIDNotSupported");return t};function Dn(){return j(this,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return[4,le().requestDevice({filters:Qs})];case 1:return t=e.sent(),Array.isArray(t)?[2,t]:[2,[t]]}})})}function $e(){return j(this,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return[4,le().getDevices()];case 1:return t=e.sent(),[2,t.filter(function(n){return n.vendorId===Sn})]}})})}function ni(){return j(this,void 0,void 0,function(){var t,e;return V(this,function(n){switch(n.label){case 0:return[4,$e()];case 1:return t=n.sent(),t.length>0?[2,t[0]]:[4,Dn()];case 2:return e=n.sent(),[2,e[0]]}})})}var si=function(t){Js(e,t);function e(n){var r=t.call(this)||this;return r.channel=Math.floor(Math.random()*65535),r.packetSize=64,r.inputs=[],r.read=function(){return r.inputs.length?Promise.resolve(r.inputs.shift()):new Promise(function(s){r.inputCallback=s})},r.onInputReport=function(s){var i=B.Buffer.from(s.data.buffer);r.inputCallback?(r.inputCallback(i),r.inputCallback=null):r.inputs.push(i)},r._disconnectEmitted=!1,r._emitDisconnect=function(s){r._disconnectEmitted||(r._disconnectEmitted=!0,r.emit("disconnect",s))},r.exchange=function(s){return j(r,void 0,void 0,function(){var i,c=this;return V(this,function(d){switch(d.label){case 0:return[4,this.exchangeAtomicImpl(function(){return j(c,void 0,void 0,function(){var a,o,_,l,R,p,h,U,$;return V(this,function(y){switch(y.label){case 0:a=this,o=a.channel,_=a.packetSize,fn("apdu","=> "+s.toString("hex")),l=Wn(o,_),R=l.makeBlocks(s),p=0,y.label=1;case 1:return pR&&(c=c.slice(0,R)),{data:c,dataLength:R,sequence:p}},getReducedResult:function(a){if(a&&a.dataLength===a.data.length)return a.data}}};t.default=i})(gn);const Wn=En(gn);var Se={exports:{}};const Yn="2.0.0",vn=256,Kn=Number.MAX_SAFE_INTEGER||9007199254740991,qn=16,zn=vn-6,Jn=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var pe={MAX_LENGTH:vn,MAX_SAFE_COMPONENT_LENGTH:qn,MAX_SAFE_BUILD_LENGTH:zn,MAX_SAFE_INTEGER:Kn,RELEASE_TYPES:Jn,SEMVER_SPEC_VERSION:Yn,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Zn=typeof xn=="object"&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}&&{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG&&/\bsemver\b/i.test({GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var de=Zn;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=pe,i=de;e=t.exports={};const u=e.re=[],d=e.safeRe=[],a=e.src=[],o=e.t={};let _=0;const c="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",s],[c,r]],p=U=>{for(const[$,y]of R)U=U.split(`${$}*`).join(`${$}{0,${y}}`).split(`${$}+`).join(`${$}{1,${y}}`);return U},h=(U,$,y)=>{const D=p($),X=_++;i(U,X,$),o[U]=X,a[X]=$,u[X]=new RegExp($,y?"g":void 0),d[X]=new RegExp(D,y?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),h("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${c}+`),h("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),h("FULL",`^${a[o.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),h("LOOSE",`^${a[o.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),h("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),h("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),h("COERCERTL",a[o.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",h("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",h("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Se,Se.exports);var se=Se.exports;const Qn=Object.freeze({loose:!0}),et=Object.freeze({}),nt=t=>t?typeof t!="object"?Qn:t:et;var ke=nt;const xe=/^[0-9]+$/,Tn=(t,e)=>{const n=xe.test(t),r=xe.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tTn(e,t);var Rn={compareIdentifiers:Tn,rcompareIdentifiers:tt};const ie=de,{MAX_LENGTH:Me,MAX_SAFE_INTEGER:ae}=pe,{safeRe:je,t:Ve}=se,rt=ke,{compareIdentifiers:z}=Rn;let st=class C{constructor(e,n){if(n=rt(n),e instanceof C){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Me)throw new TypeError(`version is longer than ${Me} characters`);ie("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=e.trim().match(n.loose?je[Ve.LOOSE]:je[Ve.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ae||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ae||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ae||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),z(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var k=st;const Fe=k,it=(t,e,n=!1)=>{if(t instanceof Fe)return t;try{return new Fe(t,e)}catch(r){if(!n)return null;throw r}};var Q=it;const at=Q,ot=(t,e)=>{const n=at(t,e);return n?n.version:null};var _t=ot;const ut=Q,lt=(t,e)=>{const n=ut(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};var ct=lt;const Xe=k,pt=(t,e,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new Xe(t instanceof Xe?t.version:t,n).inc(e,r,s).version}catch{return null}};var dt=pt;const We=Q,mt=(t,e)=>{const n=We(t,null,!0),r=We(e,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,u=i?n:r,d=i?r:n,a=!!u.prerelease.length;if(!!d.prerelease.length&&!a)return!d.patch&&!d.minor?"major":u.patch?"patch":u.minor?"minor":"major";const _=a?"pre":"";return n.major!==r.major?_+"major":n.minor!==r.minor?_+"minor":n.patch!==r.patch?_+"patch":"prerelease"};var ht=mt;const ft=k,Et=(t,e)=>new ft(t,e).major;var gt=Et;const vt=k,Tt=(t,e)=>new vt(t,e).minor;var Rt=Tt;const It=k,Ot=(t,e)=>new It(t,e).patch;var bt=Ot;const Nt=Q,At=(t,e)=>{const n=Nt(t,e);return n&&n.prerelease.length?n.prerelease:null};var St=At;const Ye=k,Dt=(t,e,n)=>new Ye(t,n).compare(new Ye(e,n));var H=Dt;const Lt=H,$t=(t,e,n)=>Lt(e,t,n);var kt=$t;const Ut=H,yt=(t,e)=>Ut(t,e,!0);var Pt=yt;const Ke=k,wt=(t,e,n)=>{const r=new Ke(t,n),s=new Ke(e,n);return r.compare(s)||r.compareBuild(s)};var Ue=wt;const Ht=Ue,Gt=(t,e)=>t.sort((n,r)=>Ht(n,r,e));var Ct=Gt;const Bt=Ue,xt=(t,e)=>t.sort((n,r)=>Bt(r,n,e));var Mt=xt;const jt=H,Vt=(t,e,n)=>jt(t,e,n)>0;var me=Vt;const Ft=H,Xt=(t,e,n)=>Ft(t,e,n)<0;var ye=Xt;const Wt=H,Yt=(t,e,n)=>Wt(t,e,n)===0;var In=Yt;const Kt=H,qt=(t,e,n)=>Kt(t,e,n)!==0;var On=qt;const zt=H,Jt=(t,e,n)=>zt(t,e,n)>=0;var Pe=Jt;const Zt=H,Qt=(t,e,n)=>Zt(t,e,n)<=0;var we=Qt;const er=In,nr=On,tr=me,rr=Pe,sr=ye,ir=we,ar=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return er(t,n,r);case"!=":return nr(t,n,r);case">":return tr(t,n,r);case">=":return rr(t,n,r);case"<":return sr(t,n,r);case"<=":return ir(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};var bn=ar;const or=k,_r=Q,{safeRe:oe,t:_e}=se,ur=(t,e)=>{if(t instanceof or)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(oe[_e.COERCE]);else{let r;for(;(r=oe[_e.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||r.index+r[0].length!==n.index+n[0].length)&&(n=r),oe[_e.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;oe[_e.COERCERTL].lastIndex=-1}return n===null?null:_r(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,e)};var lr=ur,Ee,qe;function cr(){return qe||(qe=1,Ee=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),Ee}var pr=O;O.Node=q;O.create=O;function O(t){var e=this;if(e instanceof O||(e=new O),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=e;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)n=t(n,r.value,s),r=r.next;return n};O.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)n=t(n,r.value,s),r=r.prev;return n};O.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;n!==null;e++)t[e]=n.value,n=n.next;return t};O.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;n!==null;e++)t[e]=n.value,n=n.prev;return t};O.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var n=new O;if(ethis.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&rthis.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)n.push(s.value);return n};O.prototype.splice=function(t,e,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r1;class Er{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Y]=e.max||1/0;const n=e.length||ge;if(this[J]=typeof n!="function"?ge:n,this[re]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[K]=e.maxAge||0,this[x]=e.dispose,this[ze]=e.noDisposeOnSet||!1,this[Nn]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Y]=e||1/0,ne(this)}get max(){return this[Y]}set allowStale(e){this[re]=!!e}get allowStale(){return this[re]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[K]=e,ne(this)}get maxAge(){return this[K]}set lengthCalculator(e){typeof e!="function"&&(e=ge),e!==this[J]&&(this[J]=e,this[M]=0,this[S].forEach(n=>{n.length=this[J](n.value,n.key),this[M]+=n.length})),ne(this)}get lengthCalculator(){return this[J]}get length(){return this[M]}get itemCount(){return this[S].length}rforEach(e,n){n=n||this;for(let r=this[S].tail;r!==null;){const s=r.prev;Je(this,e,r,n),r=s}}forEach(e,n){n=n||this;for(let r=this[S].head;r!==null;){const s=r.next;Je(this,e,r,n),r=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[x]&&this[S]&&this[S].length&&this[S].forEach(e=>this[x](e.key,e.value)),this[w]=new Map,this[S]=new fr,this[M]=0}dump(){return this[S].map(e=>le(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,n,r){if(r=r||this[K],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[J](n,e);if(this[w].has(e)){if(i>this[Y])return Z(this,this[w].get(e)),!1;const a=this[w].get(e).value;return this[x]&&(this[ze]||this[x](e,a.value)),a.now=s,a.maxAge=r,a.value=n,this[M]+=i-a.length,a.length=i,this.get(e),ne(this),!0}const u=new gr(e,n,i,s,r);return u.length>this[Y]?(this[x]&&this[x](e,n),!1):(this[M]+=u.length,this[S].unshift(u),this[w].set(e,this[S].head),ne(this),!0)}has(e){if(!this[w].has(e))return!1;const n=this[w].get(e).value;return!le(this,n)}get(e){return ve(this,e,!0)}peek(e){return ve(this,e,!1)}pop(){const e=this[S].tail;return e?(Z(this,e),e.value):null}del(e){Z(this,this[w].get(e))}load(e){this.reset();const n=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const u=i-n;u>0&&this.set(s.k,s.v,u)}}}prune(){this[w].forEach((e,n)=>ve(this,n,!1))}}const ve=(t,e,n)=>{const r=t[w].get(e);if(r){const s=r.value;if(le(t,s)){if(Z(t,r),!t[re])return}else n&&(t[Nn]&&(r.value.now=Date.now()),t[S].unshiftNode(r));return s.value}},le=(t,e)=>{if(!e||!e.maxAge&&!t[K])return!1;const n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[K]&&n>t[K]},ne=t=>{if(t[M]>t[Y])for(let e=t[S].tail;t[M]>t[Y]&&e!==null;){const n=e.prev;Z(t,e),e=n}},Z=(t,e)=>{if(e){const n=e.value;t[x]&&t[x](n.key,n.value),t[M]-=n.length,t[w].delete(n.key),t[S].removeNode(e)}};class gr{constructor(e,n,r,s,i){this.key=e,this.value=n,this.length=r,this.now=s,this.maxAge=i||0}}const Je=(t,e,n,r)=>{let s=n.value;le(t,s)&&(Z(t,n),t[re]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var vr=Er,Te,Ze;function G(){if(Ze)return Te;Ze=1;class t{constructor(l,v){if(v=r(v),l instanceof t)return l.loose===!!v.loose&&l.includePrerelease===!!v.includePrerelease?l:new t(l.raw,v);if(l instanceof s)return this.raw=l.value,this.set=[[l]],this.format(),this;if(this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease,this.raw=l.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(E=>this.parseRange(E.trim())).filter(E=>E.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const E=this.set[0];if(this.set=this.set.filter(g=>!h(g[0])),this.set.length===0)this.set=[E];else if(this.set.length>1){for(const g of this.set)if(g.length===1&&U(g[0])){this.set=[g];break}}}this.format()}format(){return this.range=this.set.map(l=>l.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(l){const E=((this.options.includePrerelease&&R)|(this.options.loose&&p))+":"+l,g=n.get(E);if(g)return g;const f=this.options.loose,T=f?d[a.HYPHENRANGELOOSE]:d[a.HYPHENRANGE];l=l.replace(T,Hn(this.options.includePrerelease)),i("hyphen replace",l),l=l.replace(d[a.COMPARATORTRIM],o),i("comparator trim",l),l=l.replace(d[a.TILDETRIM],_),i("tilde trim",l),l=l.replace(d[a.CARETTRIM],c),i("caret trim",l);let b=l.split(" ").map(A=>y(A,this.options)).join(" ").split(/\s+/).map(A=>wn(A,this.options));f&&(b=b.filter(A=>(i("loose invalid filter",A,this.options),!!A.match(d[a.COMPARATORLOOSE])))),i("range list",b);const I=new Map,N=b.map(A=>new s(A,this.options));for(const A of N){if(h(A))return[A];I.set(A.value,A)}I.size>1&&I.has("")&&I.delete("");const P=[...I.values()];return n.set(E,P),P}intersects(l,v){if(!(l instanceof t))throw new TypeError("a Range is required");return this.set.some(E=>$(E,v)&&l.set.some(g=>$(g,v)&&E.every(f=>g.every(T=>f.intersects(T,v)))))}test(l){if(!l)return!1;if(typeof l=="string")try{l=new u(l,this.options)}catch{return!1}for(let v=0;vm.value==="<0.0.0-0",U=m=>m.value==="",$=(m,l)=>{let v=!0;const E=m.slice();let g=E.pop();for(;v&&E.length;)v=E.every(f=>g.intersects(f,l)),g=E.pop();return v},y=(m,l)=>(i("comp",m,l),m=$n(m,l),i("caret",m),m=X(m,l),i("tildes",m),m=Un(m,l),i("xrange",m),m=Pn(m,l),i("stars",m),m),D=m=>!m||m.toLowerCase()==="x"||m==="*",X=(m,l)=>m.trim().split(/\s+/).map(v=>Ln(v,l)).join(" "),Ln=(m,l)=>{const v=l.loose?d[a.TILDELOOSE]:d[a.TILDE];return m.replace(v,(E,g,f,T,b)=>{i("tilde",m,E,g,f,T,b);let I;return D(g)?I="":D(f)?I=`>=${g}.0.0 <${+g+1}.0.0-0`:D(T)?I=`>=${g}.${f}.0 <${g}.${+f+1}.0-0`:b?(i("replaceTilde pr",b),I=`>=${g}.${f}.${T}-${b} <${g}.${+f+1}.0-0`):I=`>=${g}.${f}.${T} <${g}.${+f+1}.0-0`,i("tilde return",I),I})},$n=(m,l)=>m.trim().split(/\s+/).map(v=>kn(v,l)).join(" "),kn=(m,l)=>{i("caret",m,l);const v=l.loose?d[a.CARETLOOSE]:d[a.CARET],E=l.includePrerelease?"-0":"";return m.replace(v,(g,f,T,b,I)=>{i("caret",m,g,f,T,b,I);let N;return D(f)?N="":D(T)?N=`>=${f}.0.0${E} <${+f+1}.0.0-0`:D(b)?f==="0"?N=`>=${f}.${T}.0${E} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.0${E} <${+f+1}.0.0-0`:I?(i("replaceCaret pr",I),f==="0"?T==="0"?N=`>=${f}.${T}.${b}-${I} <${f}.${T}.${+b+1}-0`:N=`>=${f}.${T}.${b}-${I} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.${b}-${I} <${+f+1}.0.0-0`):(i("no pr"),f==="0"?T==="0"?N=`>=${f}.${T}.${b}${E} <${f}.${T}.${+b+1}-0`:N=`>=${f}.${T}.${b}${E} <${f}.${+T+1}.0-0`:N=`>=${f}.${T}.${b} <${+f+1}.0.0-0`),i("caret return",N),N})},Un=(m,l)=>(i("replaceXRanges",m,l),m.split(/\s+/).map(v=>yn(v,l)).join(" ")),yn=(m,l)=>{m=m.trim();const v=l.loose?d[a.XRANGELOOSE]:d[a.XRANGE];return m.replace(v,(E,g,f,T,b,I)=>{i("xRange",m,E,g,f,T,b,I);const N=D(f),P=N||D(T),A=P||D(b),ee=A;return g==="="&&ee&&(g=""),I=l.includePrerelease?"-0":"",N?g===">"||g==="<"?E="<0.0.0-0":E="*":g&&ee?(P&&(T=0),b=0,g===">"?(g=">=",P?(f=+f+1,T=0,b=0):(T=+T+1,b=0)):g==="<="&&(g="<",P?f=+f+1:T=+T+1),g==="<"&&(I="-0"),E=`${g+f}.${T}.${b}${I}`):P?E=`>=${f}.0.0${I} <${+f+1}.0.0-0`:A&&(E=`>=${f}.${T}.0${I} <${f}.${+T+1}.0-0`),i("xRange return",E),E})},Pn=(m,l)=>(i("replaceStars",m,l),m.trim().replace(d[a.STAR],"")),wn=(m,l)=>(i("replaceGTE0",m,l),m.trim().replace(d[l.includePrerelease?a.GTE0PRE:a.GTE0],"")),Hn=m=>(l,v,E,g,f,T,b,I,N,P,A,ee,ti)=>(D(E)?v="":D(g)?v=`>=${E}.0.0${m?"-0":""}`:D(f)?v=`>=${E}.${g}.0${m?"-0":""}`:T?v=`>=${v}`:v=`>=${v}${m?"-0":""}`,D(N)?I="":D(P)?I=`<${+N+1}.0.0-0`:D(A)?I=`<${N}.${+P+1}.0-0`:ee?I=`<=${N}.${P}.${A}-${ee}`:m?I=`<${N}.${P}.${+A+1}-0`:I=`<=${I}`,`${v} ${I}`.trim()),Gn=(m,l,v)=>{for(let E=0;E0){const g=m[E].semver;if(g.major===l.major&&g.minor===l.minor&&g.patch===l.patch)return!0}return!1}return!0};return Te}var Re,Qe;function he(){if(Qe)return Re;Qe=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(_,c){if(c=n(c),_ instanceof e){if(_.loose===!!c.loose)return _;_=_.value}_=_.trim().split(/\s+/).join(" "),u("comparator",_,c),this.options=c,this.loose=!!c.loose,this.parse(_),this.semver===t?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(_){const c=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],R=_.match(c);if(!R)throw new TypeError(`Invalid comparator: ${_}`);this.operator=R[1]!==void 0?R[1]:"",this.operator==="="&&(this.operator=""),R[2]?this.semver=new d(R[2],this.options.loose):this.semver=t}toString(){return this.value}test(_){if(u("Comparator.test",_,this.options.loose),this.semver===t||_===t)return!0;if(typeof _=="string")try{_=new d(_,this.options)}catch{return!1}return i(_,this.operator,this.semver,this.options)}intersects(_,c){if(!(_ instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(_.value,c).test(this.value):_.operator===""?_.value===""?!0:new a(this.value,c).test(_.semver):(c=n(c),c.includePrerelease&&(this.value==="<0.0.0-0"||_.value==="<0.0.0-0")||!c.includePrerelease&&(this.value.startsWith("<0.0.0")||_.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&_.operator.startsWith(">")||this.operator.startsWith("<")&&_.operator.startsWith("<")||this.semver.version===_.semver.version&&this.operator.includes("=")&&_.operator.includes("=")||i(this.semver,"<",_.semver,c)&&this.operator.startsWith(">")&&_.operator.startsWith("<")||i(this.semver,">",_.semver,c)&&this.operator.startsWith("<")&&_.operator.startsWith(">")))}}Re=e;const n=ke,{safeRe:r,t:s}=se,i=bn,u=de,d=k,a=G();return Re}const Tr=G(),Rr=(t,e,n)=>{try{e=new Tr(e,n)}catch{return!1}return e.test(t)};var fe=Rr;const Ir=G(),Or=(t,e)=>new Ir(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var br=Or;const Nr=k,Ar=G(),Sr=(t,e,n)=>{let r=null,s=null,i=null;try{i=new Ar(e,n)}catch{return null}return t.forEach(u=>{i.test(u)&&(!r||s.compare(u)===-1)&&(r=u,s=new Nr(r,n))}),r};var Dr=Sr;const Lr=k,$r=G(),kr=(t,e,n)=>{let r=null,s=null,i=null;try{i=new $r(e,n)}catch{return null}return t.forEach(u=>{i.test(u)&&(!r||s.compare(u)===1)&&(r=u,s=new Lr(r,n))}),r};var Ur=kr;const Ie=k,yr=G(),en=me,Pr=(t,e)=>{t=new yr(t,e);let n=new Ie("0.0.0");if(t.test(n)||(n=new Ie("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r{const d=new Ie(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!i||en(d,i))&&(i=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),i&&(!n||en(n,i))&&(n=i)}return n&&t.test(n)?n:null};var wr=Pr;const Hr=G(),Gr=(t,e)=>{try{return new Hr(t,e).range||"*"}catch{return null}};var Cr=Gr;const Br=k,An=he(),{ANY:xr}=An,Mr=G(),jr=fe,nn=me,tn=ye,Vr=we,Fr=Pe,Xr=(t,e,n,r)=>{t=new Br(t,r),e=new Mr(e,r);let s,i,u,d,a;switch(n){case">":s=nn,i=Vr,u=tn,d=">",a=">=";break;case"<":s=tn,i=Fr,u=nn,d="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jr(t,e,r))return!1;for(let o=0;o{p.semver===xr&&(p=new An(">=0.0.0")),c=c||p,R=R||p,s(p.semver,c.semver,r)?c=p:u(p.semver,R.semver,r)&&(R=p)}),c.operator===d||c.operator===a||(!R.operator||R.operator===d)&&i(t,R.semver))return!1;if(R.operator===a&&u(t,R.semver))return!1}return!0};var He=Xr;const Wr=He,Yr=(t,e,n)=>Wr(t,e,">",n);var Kr=Yr;const qr=He,zr=(t,e,n)=>qr(t,e,"<",n);var Jr=zr;const rn=G(),Zr=(t,e,n)=>(t=new rn(t,n),e=new rn(e,n),t.intersects(e,n));var Qr=Zr;const es=fe,ns=H;var ts=(t,e,n)=>{const r=[];let s=null,i=null;const u=t.sort((_,c)=>ns(_,c,n));for(const _ of u)es(_,e,n)?(i=_,s||(s=_)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const d=[];for(const[_,c]of r)_===c?d.push(_):!c&&_===u[0]?d.push("*"):c?_===u[0]?d.push(`<=${c}`):d.push(`${_} - ${c}`):d.push(`>=${_}`);const a=d.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return a.length{if(t===e)return!0;t=new sn(t,n),e=new sn(e,n);let r=!1;e:for(const s of t.set){for(const i of e.set){const u=is(s,i,n);if(r=r||u!==null,u)continue e}if(r)return!1}return!0},ss=[new Ge(">=0.0.0-0")],an=[new Ge(">=0.0.0")],is=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Oe){if(e.length===1&&e[0].semver===Oe)return!0;n.includePrerelease?t=ss:t=an}if(e.length===1&&e[0].semver===Oe){if(n.includePrerelease)return!0;e=an}const r=new Set;let s,i;for(const p of t)p.operator===">"||p.operator===">="?s=on(s,p,n):p.operator==="<"||p.operator==="<="?i=_n(i,p,n):r.add(p.semver);if(r.size>1)return null;let u;if(s&&i){if(u=Ce(s.semver,i.semver,n),u>0)return null;if(u===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const p of r){if(s&&!te(p,String(s),n)||i&&!te(p,String(i),n))return null;for(const h of e)if(!te(p,String(h),n))return!1;return!0}let d,a,o,_,c=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,R=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;c&&c.prerelease.length===1&&i.operator==="<"&&c.prerelease[0]===0&&(c=!1);for(const p of e){if(_=_||p.operator===">"||p.operator===">=",o=o||p.operator==="<"||p.operator==="<=",s){if(R&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===R.major&&p.semver.minor===R.minor&&p.semver.patch===R.patch&&(R=!1),p.operator===">"||p.operator===">="){if(d=on(s,p,n),d===p&&d!==s)return!1}else if(s.operator===">="&&!te(s.semver,String(p),n))return!1}if(i){if(c&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===c.major&&p.semver.minor===c.minor&&p.semver.patch===c.patch&&(c=!1),p.operator==="<"||p.operator==="<="){if(a=_n(i,p,n),a===p&&a!==i)return!1}else if(i.operator==="<="&&!te(i.semver,String(p),n))return!1}if(!p.operator&&(i||s)&&u!==0)return!1}return!(s&&o&&!i&&u!==0||i&&_&&!s&&u!==0||R||c)},on=(t,e,n)=>{if(!t)return e;const r=Ce(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},_n=(t,e,n)=>{if(!t)return e;const r=Ce(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};var as=rs;const be=se,un=pe,os=k,ln=Rn,_s=Q,us=_t,ls=ct,cs=dt,ps=ht,ds=gt,ms=Rt,hs=bt,fs=St,Es=H,gs=kt,vs=Pt,Ts=Ue,Rs=Ct,Is=Mt,Os=me,bs=ye,Ns=In,As=On,Ss=Pe,Ds=we,Ls=bn,$s=lr,ks=he(),Us=G(),ys=fe,Ps=br,ws=Dr,Hs=Ur,Gs=wr,Cs=Cr,Bs=He,xs=Kr,Ms=Jr,js=Qr,Vs=ts,Fs=as;var Xs={parse:_s,valid:us,clean:ls,inc:cs,diff:ps,major:ds,minor:ms,patch:hs,prerelease:fs,compare:Es,rcompare:gs,compareLoose:vs,compareBuild:Ts,sort:Rs,rsort:Is,gt:Os,lt:bs,eq:Ns,neq:As,gte:Ss,lte:Ds,cmp:Ls,coerce:$s,Comparator:ks,Range:Us,satisfies:ys,toComparators:Ps,maxSatisfying:ws,minSatisfying:Hs,minVersion:Gs,validRange:Cs,outside:Bs,gtr:xs,ltr:Ms,intersects:js,simplifyRange:Vs,subset:Fs,SemVer:os,re:be.re,src:be.src,tokens:be.t,SEMVER_SPEC_VERSION:un.SEMVER_SPEC_VERSION,RELEASE_TYPES:un.RELEASE_TYPES,compareIdentifiers:ln.compareIdentifiers,rcompareIdentifiers:ln.rcompareIdentifiers};const cn=En(Xs);var De=globalThis&&globalThis.__assign||function(){return De=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>8,r=pn.find(function(s){return s.productIdMM===n});return r},Ws=[],mn={};for(var Ys in Le){var hn=Le[Ys],Ne=hn.bluetoothSpec;if(Ne)for(var Ae=0;Ae0&&i[i.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]0)&&!(s=r.next()).done;)i.push(s.value)}catch(d){u={error:d}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return i},Qs=[{vendorId:Sn}],ei=function(){return Promise.resolve(!!(window.navigator&&window.navigator.hid))},ce=function(){var t=navigator.hid;if(!t)throw new Vn("navigator.hid is not supported","HIDNotSupported");return t};function Dn(){return j(this,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return[4,ce().requestDevice({filters:Qs})];case 1:return t=e.sent(),Array.isArray(t)?[2,t]:[2,[t]]}})})}function $e(){return j(this,void 0,void 0,function(){var t;return V(this,function(e){switch(e.label){case 0:return[4,ce().getDevices()];case 1:return t=e.sent(),[2,t.filter(function(n){return n.vendorId===Sn})]}})})}function ni(){return j(this,void 0,void 0,function(){var t,e;return V(this,function(n){switch(n.label){case 0:return[4,$e()];case 1:return t=n.sent(),t.length>0?[2,t[0]]:[4,Dn()];case 2:return e=n.sent(),[2,e[0]]}})})}var si=function(t){Js(e,t);function e(n){var r=t.call(this)||this;return r.channel=Math.floor(Math.random()*65535),r.packetSize=64,r.inputs=[],r.read=function(){return r.inputs.length?Promise.resolve(r.inputs.shift()):new Promise(function(s){r.inputCallback=s})},r.onInputReport=function(s){var i=B.Buffer.from(s.data.buffer);r.inputCallback?(r.inputCallback(i),r.inputCallback=null):r.inputs.push(i)},r._disconnectEmitted=!1,r._emitDisconnect=function(s){r._disconnectEmitted||(r._disconnectEmitted=!0,r.emit("disconnect",s))},r.exchange=function(s){return j(r,void 0,void 0,function(){var i,u=this;return V(this,function(d){switch(d.label){case 0:return[4,this.exchangeAtomicImpl(function(){return j(u,void 0,void 0,function(){var a,o,_,c,R,p,h,U,$;return V(this,function(y){switch(y.label){case 0:a=this,o=a.channel,_=a.packetSize,fn("apdu","=> "+s.toString("hex")),c=Wn(o,_),R=c.makeBlocks(s),p=0,y.label=1;case 1:return pa){if(t.data.length===x)throw new m;if(t.data[a]!=f.Account)throw new z;s=t.data.slice(a+S)}return{address:e,mint:n.mint,owner:n.owner,amount:n.amount,delegate:n.delegateOption?n.delegate:null,delegatedAmount:n.delegatedAmount,isInitialized:n.state!==c.Uninitialized,isFrozen:n.state===c.Frozen,isNative:!!n.isNativeOption,rentExemptReserve:n.isNativeOption?n.isNative:null,closeAuthority:n.closeAuthorityOption?n.closeAuthority:null,tlvData:s}}function M(e,t,i,n,s=l,d=p){return _(e,t,i,n,k.Buffer.alloc(0),s,d)}function _(e,t,i,n,s,d=l,I=p){const T=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:v.programId,isSigner:!1,isWritable:!1},{pubkey:d,isSigner:!1,isWritable:!1}];return new O({keys:T,programId:I,data:s})}export{p as A,W as N,h as T,y as a,l as b,M as c,F as d,L as g}; +import{m as o,aN as w,aO as b,ba as N,b8 as r,b9 as g,b7 as A,a as k,S as v,q as O}from"./index-3e319056.js";const l=new o("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");new o("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");const p=new o("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),W=new o("So11111111111111111111111111111111111111112");new o("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");class u extends Error{constructor(t){super(t)}}class h extends u{constructor(){super(...arguments),this.name="TokenAccountNotFoundError"}}class z extends u{constructor(){super(...arguments),this.name="TokenInvalidAccountError"}}class y extends u{constructor(){super(...arguments),this.name="TokenInvalidAccountOwnerError"}}class m extends u{constructor(){super(...arguments),this.name="TokenInvalidAccountSizeError"}}class F extends u{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}var f;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Mint=1]="Mint",e[e.Account=2]="Account"})(f||(f={}));const S=1,P=w([b("m"),b("n"),N("isInitialized"),r("signer1"),r("signer2"),r("signer3"),r("signer4"),r("signer5"),r("signer6"),r("signer7"),r("signer8"),r("signer9"),r("signer10"),r("signer11")]),x=P.span;var c;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Frozen=2]="Frozen"})(c||(c={}));const E=w([r("mint"),r("owner"),g("amount"),A("delegateOption"),r("delegate"),b("state"),A("isNativeOption"),g("isNative"),g("delegatedAmount"),A("closeAuthorityOption"),r("closeAuthority")]),a=E.span;async function L(e,t,i,n=l){const s=await e.getAccountInfo(t,i);return C(t,s,n)}function C(e,t,i=l){if(!t)throw new h;if(!t.owner.equals(i))throw new y;if(t.data.lengtha){if(t.data.length===x)throw new m;if(t.data[a]!=f.Account)throw new z;s=t.data.slice(a+S)}return{address:e,mint:n.mint,owner:n.owner,amount:n.amount,delegate:n.delegateOption?n.delegate:null,delegatedAmount:n.delegatedAmount,isInitialized:n.state!==c.Uninitialized,isFrozen:n.state===c.Frozen,isNative:!!n.isNativeOption,rentExemptReserve:n.isNativeOption?n.isNative:null,closeAuthority:n.closeAuthorityOption?n.closeAuthority:null,tlvData:s}}function M(e,t,i,n,s=l,d=p){return _(e,t,i,n,k.Buffer.alloc(0),s,d)}function _(e,t,i,n,s,d=l,I=p){const T=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:v.programId,isSigner:!1,isWritable:!1},{pubkey:d,isSigner:!1,isWritable:!1}];return new O({keys:T,programId:I,data:s})}export{p as A,W as N,h as T,y as a,l as b,M as c,F as d,L as g}; diff --git a/assets/converter-44eaa8a5.js b/assets/converter-44519e3e.js similarity index 78% rename from assets/converter-44eaa8a5.js rename to assets/converter-44519e3e.js index 15b6b7d..e359c11 100644 --- a/assets/converter-44eaa8a5.js +++ b/assets/converter-44519e3e.js @@ -1 +1 @@ -var He=Object.defineProperty;var je=(i,e,t)=>e in i?He(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>(je(i,typeof e!="symbol"?e+"":e,t),t);import{_ as qe,a as Oe,b as Ge}from"./AppDescriptionTop-ae09eb9e.js";import{_ as Re}from"./PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js";import{o as Ue,_ as Fe}from"./SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js";import{k as a,bc as v,P as g,b6 as B,aQ as x,aR as ee,bi as Xe,K as _e,aY as I,ae as Je,bj as Ye,bk as et,bl as tt,bm as Pe,R as be,J as it,b3 as nt,b4 as st,b5 as rt,a as N,s as at,u as Se,x as Ke,w as Ce,B as ot,v as _,bn as Ee,C as $,bf as ct,a_ as ut,bo as lt,am as dt,z as Ve,U as Te,V as Ae,o as z,Y as te,Z as M,j as k,a1 as Le,a2 as u,a3 as o,i as U,a5 as S,a4 as H,a0 as F,a6 as ie,a7 as ne,a8 as se,bp as Qe,a9 as Ze,$ as we,y as Ne,G as mt,aF as ft,as as Be,aE as pt,aD as Ie,aH as yt,aG as Me,_ as gt,ad as ht}from"./index-d1afe763.js";import{c as kt,A as bt}from"./setAuthority-3cfe3852.js";import{b as St,g as At,m as wt}from"./index-12a77bbd.js";import"./internal-c2cc419b.js";const vt="/assets/unrecognized-token-3289de57.svg";function xe(i,e){if(e)return e[i]?.symbol??""}function re(i){return i??vt}const _t=[244,158,220,65,8,73,4,65];class E{constructor(e,t){this.authority=e,this.isPlatformPaused=t}static fromArgs(e){return new E(e.authority,e.isPlatformPaused)}static fromAccountInfo(e,t=0){return E.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Admin account at ${t}`);return E.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,q)}static deserialize(e,t=0){return q.deserialize(e,t)}serialize(){return q.serialize({accountDiscriminator:_t,...this})}static get byteSize(){return q.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(E.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===E.byteSize}pretty(){return{authority:this.authority.toBase58(),isPlatformPaused:this.isPlatformPaused}}}const q=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isPlatformPaused",a.bool]],E.fromArgs,"Admin"),Pt=[221,78,171,233,213,142,113,56];class V{constructor(e,t){this.authority=e,this.isAllPaused=t}static fromArgs(e){return new V(e.authority,e.isAllPaused)}static fromAccountInfo(e,t=0){return V.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Manager account at ${t}`);return V.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,O)}static deserialize(e,t=0){return O.deserialize(e,t)}serialize(){return O.serialize({accountDiscriminator:Pt,...this})}static get byteSize(){return O.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(V.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===V.byteSize}pretty(){return{authority:this.authority.toBase58(),isAllPaused:this.isAllPaused}}}const O=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isAllPaused",a.bool]],V.fromArgs,"Manager"),ve=new a.BeetArgsStruct([["num",a.u64],["denom",a.u64]],"Ratio"),De=[85,72,49,176,182,228,141,82];class L{constructor(e,t,n,s,r,c,l,d,p,m){this.authority=e,this.tokenA=t,this.tokenB=n,this.lockedAmount=s,this.ratio=r,this.isPaused=c,this.lockFee=l,this.unlockFee=d,this.feeReceiver=p,this.policy=m}static fromArgs(e){return new L(e.authority,e.tokenA,e.tokenB,e.lockedAmount,e.ratio,e.isPaused,e.lockFee,e.unlockFee,e.feeReceiver,e.policy)}static fromAccountInfo(e,t=0){return L.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Pair account at ${t}`);return L.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,G)}static deserialize(e,t=0){return G.deserialize(e,t)}serialize(){return G.serialize({accountDiscriminator:De,...this})}static byteSize(e){const t=L.fromArgs(e);return G.toFixedFromValue({accountDiscriminator:De,...t}).byteSize}static async getMinimumBalanceForRentExemption(e,t,n){return t.getMinimumBalanceForRentExemption(L.byteSize(e),n)}pretty(){return{authority:this.authority.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),lockedAmount:(()=>{const e=this.lockedAmount;if(typeof e.toNumber=="function")try{return e.toNumber()}catch{return e}return e})(),ratio:this.ratio,isPaused:this.isPaused,lockFee:this.lockFee,unlockFee:this.unlockFee,feeReceiver:this.feeReceiver.toBase58(),policy:this.policy}}}const G=new a.FixableBeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["tokenA",v.publicKey],["tokenB",v.publicKey],["lockedAmount",a.u64],["ratio",ve],["isPaused",a.bool],["lockFee",a.u16],["unlockFee",a.u16],["feeReceiver",v.publicKey],["policy",a.coption(v.publicKey)]],L.fromArgs,"Pair"),Tt=[159,117,95,227,239,151,58,236];class Q{constructor(e,t){this.authority=e,this.isBlocked=t}static fromArgs(e){return new Q(e.authority,e.isBlocked)}static fromAccountInfo(e,t=0){return Q.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find User account at ${t}`);return Q.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,X)}static deserialize(e,t=0){return X.deserialize(e,t)}serialize(){return X.serialize({accountDiscriminator:Tt,...this})}static get byteSize(){return X.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(Q.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===Q.byteSize}pretty(){return{authority:this.authority.toBase58(),isBlocked:this.isBlocked}}}const X=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isBlocked",a.bool]],Q.fromArgs,"User"),Bt=[17,50,115,0,10,220,15,157];class Z{constructor(e,t){this.user=e,this.pair=t}static fromArgs(e){return new Z(e.user,e.pair)}static fromAccountInfo(e,t=0){return Z.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find WhitelistedUserInfo account at ${t}`);return Z.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,Y)}static deserialize(e,t=0){return Y.deserialize(e,t)}serialize(){return Y.serialize({accountDiscriminator:Bt,...this})}static get byteSize(){return Y.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(Z.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===Z.byteSize}pretty(){return{user:this.user.toBase58(),pair:this.pair.toBase58()}}}const Y=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["user",v.publicKey],["pair",v.publicKey]],Z.fromArgs,"WhitelistedUserInfo"),J=new Map,K=new Map;class ce extends Error{constructor(){super("Unauthorized action");A(this,"code",6e3);A(this,"name","Unauthorized");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ce)}}J.set(6e3,()=>new ce);K.set("Unauthorized",()=>new ce);class ue extends Error{constructor(){super("Paused");A(this,"code",6001);A(this,"name","IsPaused");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ue)}}J.set(6001,()=>new ue);K.set("IsPaused",()=>new ue);class le extends Error{constructor(){super("Already resumed");A(this,"code",6002);A(this,"name","AlreadyResumed");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,le)}}J.set(6002,()=>new le);K.set("AlreadyResumed",()=>new le);class de extends Error{constructor(){super("Pair still have locked tokens");A(this,"code",6003);A(this,"name","StillRemainingLockedTokens");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,de)}}J.set(6003,()=>new de);K.set("StillRemainingLockedTokens",()=>new de);class me extends Error{constructor(){super("User is blocked");A(this,"code",6004);A(this,"name","IsBlocked");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me)}}J.set(6004,()=>new me);K.set("IsBlocked",()=>new me);class fe extends Error{constructor(){super("User is already unblocked");A(this,"code",6005);A(this,"name","AlreadyUnblocked");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fe)}}J.set(6005,()=>new fe);K.set("AlreadyUnblocked",()=>new fe);class pe extends Error{constructor(){super("Insufficient locked amount");A(this,"code",6006);A(this,"name","InsufficientLockedAmount");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,pe)}}J.set(6006,()=>new pe);K.set("InsufficientLockedAmount",()=>new pe);class ye extends Error{constructor(){super("Insufficient funds");A(this,"code",6007);A(this,"name","InsufficientFunds");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ye)}}J.set(6007,()=>new ye);K.set("InsufficientFunds",()=>new ye);const It=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["key",v.publicKey]],"AddManagerInstructionArgs"),Mt=[125,38,192,212,101,91,179,16];function xt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=It.serialize({instructionDiscriminator:Mt,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Dt=new a.FixableBeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["policy",a.coption(v.publicKey)],["ratio",ve]],"AddPairInstructionArgs"),Wt=[209,230,17,236,218,162,86,118];function zt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Dt.serialize({instructionDiscriminator:Wt,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Rt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"AddUserToWhitelistInstructionArgs"),Ut=[244,177,124,12,22,50,139,152];function Ft(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Rt.serialize({instructionDiscriminator:Ut}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.userAuthority,isWritable:!1,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!0,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Jt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"BlockUserInstructionArgs"),Kt=[10,164,178,6,231,175,185,191];function Ct(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Jt.serialize({instructionDiscriminator:Kt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Et=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"LockTokensInstructionArgs"),Vt=[136,11,32,232,161,117,54,211];function Lt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Et.serialize({instructionDiscriminator:Vt,...e}),s=[{pubkey:i.proofRequest??t,isWritable:!1,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!1,isSigner:!1},{pubkey:i.userAuthority,isWritable:!0,isSigner:!0},{pubkey:i.whitelistedUserInfo,isWritable:!1,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.sourceA,isWritable:!0,isSigner:!1},{pubkey:i.destinationA,isWritable:!0,isSigner:!1},{pubkey:i.destinationB,isWritable:!0,isSigner:!1},{pubkey:i.feePayer,isWritable:!0,isSigner:!0},{pubkey:i.feeReceiver,isWritable:!0,isSigner:!1},{pubkey:i.tokenProgram??ee,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Qt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"PausePairsInstructionArgs"),Zt=[147,150,152,192,119,95,137,64];function Nt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Qt.serialize({instructionDiscriminator:Zt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const $t=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"PausePlatformInstructionArgs"),Ht=[232,46,204,130,181,0,172,57];function jt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=$t.serialize({instructionDiscriminator:Ht}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const qt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemoveManagerInstructionArgs"),Ot=[150,55,157,77,128,148,7,15];function Gt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=qt.serialize({instructionDiscriminator:Ot}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Xt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemovePairInstructionArgs"),Yt=[181,42,154,249,167,123,20,81];function ei(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Xt.serialize({instructionDiscriminator:Yt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const ti=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemoveUserFromWhitelistInstructionArgs"),ii=[198,73,139,218,243,209,180,182];function ni(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=ti.serialize({instructionDiscriminator:ii}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const si=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"ResumePairsInstructionArgs"),ri=[23,106,248,226,173,20,247,74];function ai(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=si.serialize({instructionDiscriminator:ri}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const oi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"ResumePlatformInstructionArgs"),ci=[23,162,56,123,186,207,109,131];function ui(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=oi.serialize({instructionDiscriminator:ci}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const li=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["key",v.publicKey]],"SetAdminInstructionArgs"),di=[251,163,0,52,91,194,187,92];function mi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=li.serialize({instructionDiscriminator:di,...e}),s=[{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const fi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"UnblockUserInstructionArgs"),pi=[216,208,128,98,74,210,18,114];function yi(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=fi.serialize({instructionDiscriminator:pi}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const gi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"UnlockTokensInstructionArgs"),hi=[233,35,95,159,37,185,47,88];function ki(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=gi.serialize({instructionDiscriminator:hi,...e}),s=[{pubkey:i.proofRequest??t,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!1,isSigner:!1},{pubkey:i.userAuthority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.sourceA,isWritable:!0,isSigner:!1},{pubkey:i.destinationA,isWritable:!0,isSigner:!1},{pubkey:i.sourceB,isWritable:!0,isSigner:!1},{pubkey:i.feePayer,isWritable:!0,isSigner:!0},{pubkey:i.feeReceiver,isWritable:!0,isSigner:!1},{pubkey:i.tokenProgram??ee,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const bi=new a.FixableBeetArgsStruct([["newAuthority",a.coption(v.publicKey)],["isPaused",a.coption(a.bool)],["ratio",a.coption(ve)],["lockFee",a.coption(a.u16)],["unlockFee",a.coption(a.u16)],["feeReceiver",a.coption(v.publicKey)]],"UpdatePairData"),Si=new a.FixableBeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["data",bi]],"UpdatePairInstructionArgs"),Ai=[176,62,36,215,255,206,35,12];function wi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Si.serialize({instructionDiscriminator:Ai,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const vi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"WithdrawFeeInstructionArgs"),_i=[14,122,231,218,31,238,223,150];function Pi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=vi.serialize({instructionDiscriminator:_i,...e}),s=[{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!0,isSigner:!1},{pubkey:i.destination,isWritable:!0,isSigner:!1},{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Ti="JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm",We=new g(Ti),Bi={version:"0.0.6",name:"smart_converter",instructions:[{name:"setAdmin",accounts:[{name:"admin",isMut:!0,isSigner:!1},{name:"authority",isMut:!0,isSigner:!0},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"key",type:"publicKey"}]},{name:"addManager",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!1,isSigner:!1},{name:"manager",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"key",type:"publicKey"}]},{name:"addPair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"policy",type:{option:"publicKey"}},{name:"ratio",type:{defined:"Ratio"}}]},{name:"addUserToWhitelist",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"userAuthority",isMut:!1,isSigner:!1},{name:"whitelistedUserInfo",isMut:!0,isSigner:!1},{name:"pair",isMut:!0,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"removeUserFromWhitelist",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"whitelistedUserInfo",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"pausePlatform",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"resumePlatform",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"lockTokens",accounts:[{name:"proofRequest",isMut:!1,isSigner:!1,isOptional:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"user",isMut:!1,isSigner:!1},{name:"userAuthority",isMut:!0,isSigner:!0},{name:"whitelistedUserInfo",isMut:!1,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"manager",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"sourceA",isMut:!0,isSigner:!1},{name:"destinationA",isMut:!0,isSigner:!1},{name:"destinationB",isMut:!0,isSigner:!1},{name:"feePayer",isMut:!0,isSigner:!0},{name:"feeReceiver",isMut:!0,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"unlockTokens",accounts:[{name:"proofRequest",isMut:!1,isSigner:!1,isOptional:!0},{name:"user",isMut:!1,isSigner:!1},{name:"userAuthority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"whitelistedUserInfo",isMut:!1,isSigner:!1},{name:"manager",isMut:!1,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"sourceA",isMut:!0,isSigner:!1},{name:"destinationA",isMut:!0,isSigner:!1},{name:"sourceB",isMut:!0,isSigner:!1},{name:"feePayer",isMut:!0,isSigner:!0},{name:"feeReceiver",isMut:!0,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"removeManager",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"pausePairs",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"resumePairs",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"removePair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"updatePair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"data",type:{defined:"UpdatePairData"}}]},{name:"blockUser",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"unblockUser",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"withdrawFee",accounts:[{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!0,isSigner:!1},{name:"destination",isMut:!0,isSigner:!1},{name:"authority",isMut:!0,isSigner:!0},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]}],accounts:[{name:"pair",type:{kind:"struct",fields:[{name:"authority",docs:["Manager authority"],type:"publicKey"},{name:"tokenA",docs:["Security token mint address"],type:"publicKey"},{name:"tokenB",docs:["Utility token mint address"],type:"publicKey"},{name:"lockedAmount",docs:["Amount of security tokens currently locked"],type:"u64"},{name:"ratio",docs:["Ratio of token A to token B"],type:{defined:"Ratio"}},{name:"isPaused",docs:["Indicates if pair is paused or not"],type:"bool"},{name:"lockFee",docs:["Fee for locking token A"],type:"u16"},{name:"unlockFee",docs:["Fee for unlocking token A"],type:"u16"},{name:"feeReceiver",docs:["Wallet that will receive fee"],type:"publicKey"},{name:"policy",docs:["Albus policy"],type:{option:"publicKey"}}]}},{name:"admin",type:{kind:"struct",fields:[{name:"authority",docs:["Manager wallet address"],type:"publicKey"},{name:"isPlatformPaused",docs:["Indicates if platform is paused or not"],type:"bool"}]}},{name:"manager",type:{kind:"struct",fields:[{name:"authority",docs:["Manager address"],type:"publicKey"},{name:"isAllPaused",docs:["Indicates if manager's pairs are paused or not"],type:"bool"}]}},{name:"user",type:{kind:"struct",fields:[{name:"authority",docs:["User address"],type:"publicKey"},{name:"isBlocked",docs:["Indicates if user is blocked or not"],type:"bool"}]}},{name:"whitelistedUserInfo",type:{kind:"struct",fields:[{name:"user",docs:["User address"],type:"publicKey"},{name:"pair",docs:["Pair address"],type:"publicKey"}]}}],types:[{name:"UpdatePairData",type:{kind:"struct",fields:[{name:"newAuthority",type:{option:"publicKey"}},{name:"isPaused",type:{option:"bool"}},{name:"ratio",type:{option:{defined:"Ratio"}}},{name:"lockFee",type:{option:"u16"}},{name:"unlockFee",type:{option:"u16"}},{name:"feeReceiver",type:{option:"publicKey"}}]}},{name:"Ratio",type:{kind:"struct",fields:[{name:"num",type:"u64"},{name:"denom",type:"u64"}]}}],events:[{name:"LockTokensEvent",fields:[{name:"pair",type:"publicKey",index:!0},{name:"user",type:"publicKey",index:!1},{name:"userAuthority",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"timestamp",type:"i64",index:!1}]},{name:"UnlockTokensEvent",fields:[{name:"pair",type:"publicKey",index:!0},{name:"user",type:"publicKey",index:!1},{name:"userAuthority",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"timestamp",type:"i64",index:!1}]}],errors:[{code:6e3,name:"Unauthorized",msg:"Unauthorized action"},{code:6001,name:"IsPaused",msg:"Paused"},{code:6002,name:"AlreadyResumed",msg:"Already resumed"},{code:6003,name:"StillRemainingLockedTokens",msg:"Pair still have locked tokens"},{code:6004,name:"IsBlocked",msg:"User is blocked"},{code:6005,name:"AlreadyUnblocked",msg:"User is already unblocked"},{code:6006,name:"InsufficientLockedAmount",msg:"Insufficient locked amount"},{code:6007,name:"InsufficientFunds",msg:"Insufficient funds"}]};function ze(i){return"version"in i}class Ii{constructor(e){this.payer=e}async signTransaction(e){return ze(e)?e.sign([this.payer]):e.partialSign(this.payer),e}async signAllTransactions(e){return e.map(t=>(ze(t)?t.sign([this.payer]):t.partialSign(this.payer),t))}get publicKey(){return this.payer.publicKey}}const Mi="user",xi="manager",Di="pair",Wi="admin",zi="whitelist",oe=class oe{constructor(e){A(this,"program");this.provider=e,this.program=new Xe(Bi,We,e)}static fromWallet(e,t,n){return new this(new _e(e,t??{publicKey:g.default},{..._e.defaultOptions(),...n}))}static fromKeypair(e,t,n){return oe.fromWallet(e,new Ii(t),n)}get idl(){return this.program.idl}get pda(){return new Ri}fetchManager(e){return this.program.account.manager.fetchNullable(e)}fetchAdmin(e){return this.program.account.admin.fetchNullable(e??this.pda.admin()[0])}fetchUser(e){return this.program.account.user.fetchNullable(e)}fetchPair(e){return this.program.account.pair.fetchNullable(e)}fetchWhitelistedUserInfo(e){return this.program.account.whitelistedUserInfo.fetchNullable(e)}fetchWhitelistedUserInfoByUserAndPair(e,t){const[n]=this.pda.whitelistedUserInfo(e,t);return this.fetchWhitelistedUserInfo(n)}findManagers(){return this.program.account.manager.all()}findPairs(){return this.program.account.pair.all()}async findManagerPairs(e){return(await this.program.account.pair.all()).filter(n=>n.account.authority.toBase58()===e.toBase58())}async findWhitelistedUsers(e){return(await this.program.account.whitelistedUserInfo.all()).filter(n=>n.account.pair.toBase58()===e.toBase58())}async findUserWhitelistInfos(e){return(await this.program.account.whitelistedUserInfo.all()).filter(n=>n.account.user.toBase58()===e.toBase58())}async addManager(e){const t=this.provider.publicKey,[n]=this.pda.manager(e.managerWallet),[s]=this.pda.admin(),r=xt({authority:t,admin:s,manager:n},{key:e.managerWallet}),c=new I().add(r);return{signature:await this.provider.sendAndConfirm(c),manager:n}}async addPair(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.tokenA;let r=e.tokenB;const c=new I,l=[];let d,p;if(r)d=this.pda.pair(s,r)[0],p=this.pda.pairAuthority(d)[0],c.add(kt(r,this.provider.publicKey,bt.MintTokens,p));else{const y=e.tokenBKeypair??Je.generate();r=y.publicKey,l.push(y),d=this.pda.pair(s,r)[0],p=this.pda.pairAuthority(d)[0];const f=await Ye(this.provider.connection);c.add(B.createAccount({fromPubkey:t,newAccountPubkey:y.publicKey,space:et,lamports:f,programId:ee}),tt(y.publicKey,9,p,null,ee))}return await this.handleMissingTokenAccount(c,s,p),await this.handleMissingTokenAccount(c,r,p),c.add(zt({authority:t,manager:n,pair:d,pairAuthority:p,tokenA:s,tokenB:r},{ratio:e.ratio??{num:1,denom:1},policy:e.policy??null})),{signature:await this.provider.sendAndConfirm(c,l),pair:d}}async lockTokens(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.user(t),[c]=this.pda.pair(n,s),l=await this.fetchPair(c),[d]=this.pda.admin(),[p]=this.pda.manager(l.authority),[m]=this.pda.pairAuthority(c),[y]=this.pda.whitelistedUserInfo(t,c),f=new I,b=Pe(n,t),w=await this.handleMissingTokenAccount(f,n,m),P=await this.handleMissingTokenAccount(f,s,t);return f.add(Lt({proofRequest:e.proofRequest,user:r,userAuthority:t,pair:c,pairAuthority:m,admin:d,manager:p,whitelistedUserInfo:y,feePayer:e.feePayer??t,feeReceiver:l.feeReceiver,sourceA:b,destinationA:w,destinationB:P,tokenA:n,tokenB:s},{amount:new be(e.amount)})),{signature:await this.provider.sendAndConfirm(f),pair:c}}async unlockTokens(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.admin(),[c]=this.pda.user(t),[l]=this.pda.pair(n,s),[d]=this.pda.pairAuthority(l),[p]=this.pda.whitelistedUserInfo(t,l),m=await this.fetchPair(l),[y]=this.pda.manager(m.authority),f=new I,b=await this.handleMissingTokenAccount(f,s,t),w=await this.handleMissingTokenAccount(f,n,d),P=await this.handleMissingTokenAccount(f,n,t);return f.add(ki({proofRequest:e.proofRequest,user:c,userAuthority:t,pair:l,pairAuthority:d,feePayer:e.feePayer??t,feeReceiver:m.feeReceiver,whitelistedUserInfo:p,admin:r,destinationA:P,manager:y,sourceA:w,sourceB:b,tokenA:n,tokenB:s},{amount:new be(e.amount)})),{signature:await this.provider.sendAndConfirm(f),pair:l,user:c}}async addUserToWhitelist(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.userWallet,[r]=this.pda.user(s),c=e.tokenA,l=e.tokenB,[d]=this.pda.pair(c,l),[p]=this.pda.whitelistedUserInfo(s,d),m=Ft({userAuthority:s,authority:t,manager:n,pair:d,tokenA:c,tokenB:l,user:r,whitelistedUserInfo:p}),y=new I().add(m);return{signature:await this.provider.sendAndConfirm(y),user:r,whitelistedUserInfo:p}}async removeUserFromWhitelist(e){const t=this.provider.publicKey,n=e.userWallet,[s]=this.pda.user(n),[r]=this.pda.pair(e.tokenA,e.tokenB),[c]=this.pda.whitelistedUserInfo(n,r),l=ni({authority:t,pair:r,whitelistedUserInfo:c}),d=new I().add(l);return{signature:await this.provider.sendAndConfirm(d),user:s,whitelistedUserInfo:c}}async blockUser(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.userWallet,[r]=this.pda.user(s),c=Ct({authority:t,manager:n,user:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),user:r}}async unblockUser(e){const t=this.provider.publicKey,n=e.userWallet,[s]=this.pda.manager(t),[r]=this.pda.user(n),c=yi({authority:t,manager:s,user:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),user:r}}async pausePairs(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=Nt({admin:r,authority:t,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async pausePlatform(){const e=this.provider.publicKey,[t]=this.pda.admin(),n=jt({admin:t,authority:e}),s=new I().add(n);return{signature:await this.provider.sendAndConfirm(s),admin:t}}async removeManager(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=Gt({admin:r,authority:t,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async removePair(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.pair(n,s),c=ei({authority:t,pair:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),pair:r}}async resumePairs(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=ai({authority:t,admin:r,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async resumePlatform(){const e=this.provider.publicKey,[t]=this.pda.admin(),n=ui({authority:e,admin:t}),s=new I().add(n);return{signature:await this.provider.sendAndConfirm(s),admin:t}}async setAdmin(e){const t=this.provider.publicKey,[n]=this.pda.admin(),s=mi({authority:t,admin:n},{key:e.authority}),r=new I().add(s);return{signature:await this.provider.sendAndConfirm(r)}}async withdrawFee(e){const t=this.provider.publicKey,[n]=this.pda.pair(e.tokenA,e.tokenB),[s]=this.pda.pairAuthority(n),r=Pi({authority:t,pair:n,pairAuthority:s,destination:e.destination},{amount:new be(e.amount)}),c=new I().add(r);return{signature:await this.provider.sendAndConfirm(c)}}async updatePair(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.pair(n,s),c=wi({authority:t,pair:r},{data:{feeReceiver:e.feeReceiver??null,lockFee:e.lockFee??null,unlockFee:e.unlockFee??null,newAuthority:e.newAuthority??null,isPaused:e.isPaused??null,ratio:e.ratio??null}}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),pair:r}}async handleMissingTokenAccount(e,t,n){const s=n??this.provider.publicKey,r=Pe(t,s,!0);try{await it(this.provider.connection,r)}catch(c){(c instanceof nt||c instanceof st)&&e.add(rt(this.provider.publicKey,r,s,t))}return r}};A(oe,"programId",We);let ae=oe;class Ri{constructor(){A(this,"pairAuthority",e=>this.pda([new g(e).toBuffer()]));A(this,"admin",()=>this.pda([N.Buffer.from(Wi)]));A(this,"manager",e=>this.pda([N.Buffer.from(xi),new g(e).toBuffer()]));A(this,"user",e=>this.pda([N.Buffer.from(Mi),new g(e).toBuffer()]));A(this,"pair",(e,t)=>this.pda([N.Buffer.from(Di),new g(e).toBuffer(),new g(t).toBuffer()]));A(this,"whitelistedUserInfo",(e,t)=>this.pda([N.Buffer.from(zi),new g(e).toBuffer(),new g(t).toBuffer()]))}pda(e){return g.findProgramAddressSync(e,ae.programId)}}const ge=at("converter",()=>{const i=Se(),e=Ke(),{setContractPolicy:t}=Ce(),n=ot({from:{amount:void 0},to:{amount:void 0},token:void 0,allTokens:[],pairs:[],selectedPair:void 0,searchToken:"",converting:!1,loading:!1,isLock:!0}),s=_(()=>ae.fromWallet(i.connection,e.value));async function r(m,y,f){try{const b=await ut.Metadata.fromAccountAddress(m,lt(y)),w=b.data?.uri;if(w){const{data:P}=await dt.get(w);return{...P,image:re(P?.image)}}return b}catch{return{symbol:f,image:re()}}}const c=m=>n.allTokens.find(f=>f.mint.toBase58()===m)?.balance??0,l=async()=>{try{const m=e.value?.publicKey;if(!m)return;n.allTokens=await ct(i.connection,m)}catch(m){console.log(m)}},d=async()=>{try{n.loading=!0;const m=await s.value.findPairs();if(n.pairs.length!==0)return;const y=await Promise.all(m.map(async f=>{const b=f.account,w=b.tokenA.toBase58(),P=b.tokenB.toBase58(),h=await r(i.connection,w,"tokenA"),R=await r(i.connection,P,"tokenB"),T={[w]:h,[P]:R};return{...f,tokensMetadata:T}}));n.pairs=y}catch(m){console.log(m)}finally{n.loading=!1}},p=async m=>{try{n.loading=!0;const y=await s.value.fetchPair(m);if(y){const f=n.pairs.findIndex(b=>b.publicKey.toBase58()===m);if(f!==-1){const b=n.pairs[f];n.pairs[f]={...b,account:y},n.selectedPair=n.pairs[f]}}}catch(y){console.log(y),await d()}finally{n.loading=!1}};return Ee(s,async m=>{i.cluster==="devnet"&&await d()},{immediate:!0,debounce:500,maxWait:1e3}),$(()=>i.cluster,m=>{m!=="devnet"&&(n.pairs=[],n.selectedPair=void 0,n.token=void 0,n.from={amount:void 0},n.to={amount:void 0})}),$(()=>e.value?.publicKey,async m=>{if(!m){n.allTokens=[],n.from.balance=0,n.to.balance=0;return}await l()},{immediate:!0}),$([()=>n.token,()=>n.allTokens,()=>n.pairs],([m])=>{const y=n.selectedPair;if(!y)return;const f=y.account?.policy;f&&t(String(f));for(const b in y.tokensMetadata){const w=y.tokensMetadata[b],P=c(String(b));b===m?.mint?n.from={...w,balance:P,amount:void 0}:n.to={...w,balance:P,amount:void 0}}}),$(()=>n.isLock,()=>{n.token=void 0}),{state:n,getAllTokens:l,updatePairData:p,converterClient:s}});function $e(){const i=ge(),e=Ce(),t=Se(),{notify:n}=Ve();function s(h){console.log("set token ======== ",h),i.state.selectedPair=i.state.pairs.find(R=>R.publicKey.toBase58()===h?.publicKey?.toBase58()),i.state.token=h}function r(h){i.state.searchToken=h}const c=_(()=>i.state.pairs.map(T=>{const D=Object.entries(T.tokensMetadata)[i.state.isLock?0:1];return{...D[1],mint:D[0],publicKey:T.publicKey}}).flat().filter(T=>T.symbol.toLowerCase().includes(i.state.searchToken.toLowerCase()))),l=_(()=>i.state.selectedPair?.account),d=_(()=>l.value?.ratio?.num?.toNumber()??1),p=_(()=>l.value?.lockedAmount?.toNumber()/Te),m=_(()=>l.value?.lockFee),y=_(()=>{const h=l.value?.tokenA?.toString();return xe(h,i.state.selectedPair?.tokensMetadata)}),f=_(()=>{const h=l.value?.tokenB?.toString();return xe(h,i.state.selectedPair?.tokensMetadata)}),b=_(()=>i.state.pairs.length===0),w=_(()=>!!e.state.certificates?.find(h=>h.data?.policy.toBase58()===String(e.requiredPolicy)));async function P(h=!0){const R=e.state.certificates?.find(T=>T.data?.policy.toBase58()===String(e.requiredPolicy))?.pubkey;if(!(!l.value||!R))try{i.state.converting=!0;const T=l.value.tokenA,D=l.value.tokenB,j=Number(i.state.from.amount*Te)/(i.state.isLock?1:d.value);let W;h?W=await i.converterClient.lockTokens({tokenA:T,tokenB:D,amount:j,proofRequest:R}):W=await i.converterClient.unlockTokens({tokenA:T,tokenB:D,amount:j,proofRequest:R}),n({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${W.signature}?cluster=${t.cluster}`,onClick:()=>!1}]}),setTimeout(async()=>{Promise.all([await i.getAllTokens(),await i.updatePairData(i.state.selectedPair.publicKey.toBase58())])},1e3)}catch(T){console.error("lockedToken error: ",T),n({type:"negative",message:`${T}`})}finally{i.state.converting=!1}}return Ee(c,h=>{h.length!==0&&!i.state.token&&s(h[0])},{immediate:!0,debounce:100,maxWait:1e3}),$(()=>i.state.from.amount,h=>{if(!h){i.state.to.amount=void 0;return}i.state.to.amount=i.state.isLock?h*d.value:h/d.value}),{options:c,setToken:s,handleSearchToken:r,pairRatio:d,pairLockedAmount:p,pairLockFee:m,tokenASymbol:y,tokenBSymbol:f,isHaveCertificate:w,lockUnlockToken:P,isDisabledInputs:b}}const Ui={class:"swap-form"},Fi={class:"swap-field"},Ji={class:"swap-field__info"},Ki={class:"row items-end"},Ci=u("div",{class:"col swap-field__label"}," FROM: ",-1),Ei={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Vi={key:0,class:"insufficient-error"},Li=u("div",{class:"swap-change"},null,-1),Qi={class:"swap-field"},Zi={class:"swap-field__info"},Ni={class:"row"},$i=u("div",{class:"col swap-field__label"}," TO: ",-1),Hi={class:"col swap-field__balance"},ji={class:"convert-to"},qi=["src"],Oi={class:"swap-info q-mt-md q-pt-xs"},Gi=u("dt",null,"Received",-1),Xi=u("dt",null,"Locked amount",-1),Yi=u("dt",null,"Ratio",-1),en={key:0},tn={key:1},nn=u("dt",null,"Lock fee",-1),sn={class:"swap-submit q-mt-md"},rn={class:"row q-mt-md text-center relative-position full-width"},an={class:"swap-rate q-mx-auto"},on=Ae({__name:"UnlockCard",setup(i){const{state:e}=ge(),{options:t,setToken:n,handleSearchToken:s,pairRatio:r,pairLockedAmount:c,pairLockFee:l,tokenASymbol:d,tokenBSymbol:p,isHaveCertificate:m,lockUnlockToken:y,isDisabledInputs:f}=$e();e.isLock=!1;const b=Ke(),w=_(()=>e.from.balance),P=_(()=>e.to.balance),h=_(()=>e.to.amount??0);function R(){e.from.amount=w.value}async function T(){await y(!1)}const D=_(()=>e.from.amount>w.value?"Insufficient funds":!1);return(j,W)=>{const he=Fe,ke=Re;return z(),te(we,{class:"swap-card swap-widget converting-card"},{default:M(()=>[k(Le,{class:"swap-card__body"},{default:M(()=>[u("div",Ui,[u("div",Fi,[u("div",Ji,[u("div",Ki,[Ci,u("div",Ei,[o(D)?(z(),U("div",Vi,S(o(D)),1)):H("",!0),F(" Balance: "+S(o(ie)(o(w))),1)])])]),k(ne,{modelValue:o(e).from.amount,"onUpdate:modelValue":W[0]||(W[0]=C=>o(e).from.amount=C),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",disable:o(f),onKeypress:o(Ue)},{append:M(()=>[k(se,{disable:o(f),dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:R},{default:M(()=>[F(" MAX ")]),_:1},8,["disable"]),o(e).token?(z(),te(he,{key:0,options:o(t),token:o(e).token,"swap-token":String(o(e).to.symbol),onHandleSearchToken:o(s),onSetToken:o(n)},null,8,["options","token","swap-token","onHandleSearchToken","onSetToken"])):H("",!0)]),_:1},8,["modelValue","disable","onKeypress"])]),Li,u("div",Qi,[u("div",Zi,[u("div",Ni,[$i,u("div",Hi," Balance: "+S(o(ie)(o(P))),1)])]),k(ne,{modelValue:o(e).to.amount,"onUpdate:modelValue":W[1]||(W[1]=C=>o(e).to.amount=C),disable:o(f),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},Qe({_:2},[o(e).to?.symbol?{name:"append",fn:M(()=>[u("div",ji,[u("img",{src:o(re)(o(e).to?.image)},null,8,qi),F(),u("span",null,S(o(e).to?.symbol),1)])]),key:"0"}:void 0]),1032,["modelValue","disable"])])]),u("div",Oi,[u("dl",null,[Gi,u("dd",null,S(o(h))+" "+S(o(p)),1)]),u("dl",null,[Xi,u("dd",null,S(o(c))+" "+S(o(d)),1)]),u("dl",null,[Yi,o(r)?(z(),U("dd",en,S(o(r))+":1 ",1)):(z(),U("dd",tn," - "))]),u("dl",null,[nn,u("dd",null,S(o(l))+" SOL",1)])]),k(ke,{class:"q-mt-md q-mx-auto"}),u("div",sn,[k(se,{loading:o(e).converting,rounded:"",ripple:!1,disable:!o(b)?.publicKey||!o(e).from.amount||o(e).from.amount<=0||!!o(D)||!o(m),onClick:T},{default:M(()=>[F(" Unlock token ")]),_:1},8,["loading","disable"])]),u("div",rn,[u("div",an," 1 "+S(o(p))+" = "+S(1/o(r))+" "+S(o(d)),1)])]),_:1}),k(Ze,{showing:o(e)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),cn={class:"swap-form"},un={class:"swap-field"},ln={class:"swap-field__info"},dn={class:"row items-end"},mn=u("div",{class:"col swap-field__label"}," FROM: ",-1),fn={class:"col-8 col-xs-10 row justify-end swap-field__balance"},pn={key:0,class:"insufficient-error"},yn=u("div",{class:"swap-change"},null,-1),gn={class:"swap-field"},hn={class:"swap-field__info"},kn={class:"row"},bn=u("div",{class:"col swap-field__label"}," TO: ",-1),Sn={class:"col swap-field__balance"},An={class:"convert-to"},wn=["src"],vn={class:"swap-info q-mt-md q-pt-xs"},_n=u("dt",null,"Received",-1),Pn=u("dt",null,"Locked amount",-1),Tn=u("dt",null,"Ratio",-1),Bn={key:0},In={key:1},Mn=u("dt",null,"Lock fee",-1),xn={class:"swap-submit q-mt-md"},Dn={class:"row q-mt-md text-center relative-position full-width"},Wn={class:"swap-rate q-mx-auto"},zn=Ae({__name:"LockCard",setup(i){const e=Ne(),{state:t}=ge(),{options:n,setToken:s,handleSearchToken:r,pairRatio:c,pairLockedAmount:l,pairLockFee:d,tokenASymbol:p,tokenBSymbol:m,isHaveCertificate:y,lockUnlockToken:f,isDisabledInputs:b}=$e();t.isLock=!0;const w=_(()=>t.from.balance),P=_(()=>t.to.balance),h=_(()=>t.to.amount??0);function R(){t.from.amount=w.value}async function T(){await f()}const D=_(()=>t.from.amount>w.value?"Insufficient funds":!1);return(j,W)=>{const he=Fe,ke=Re;return z(),te(we,{class:"swap-card swap-widget converting-card"},{default:M(()=>[k(Le,{class:"swap-card__body"},{default:M(()=>[u("div",cn,[u("div",un,[u("div",ln,[u("div",dn,[mn,u("div",fn,[o(D)?(z(),U("div",pn,S(o(D)),1)):H("",!0),F(" Balance: "+S(o(ie)(o(w))),1)])])]),k(ne,{modelValue:o(t).from.amount,"onUpdate:modelValue":W[0]||(W[0]=C=>o(t).from.amount=C),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",disable:o(b),onKeypress:o(Ue)},{append:M(()=>[k(se,{disable:o(b),dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:R},{default:M(()=>[F(" MAX ")]),_:1},8,["disable"]),o(t).token?(z(),te(he,{key:0,options:o(n),token:o(t).token,"swap-token":String(o(t).to.symbol),onHandleSearchToken:o(r),onSetToken:o(s)},null,8,["options","token","swap-token","onHandleSearchToken","onSetToken"])):H("",!0)]),_:1},8,["modelValue","disable","onKeypress"])]),yn,u("div",gn,[u("div",hn,[u("div",kn,[bn,u("div",Sn," Balance: "+S(o(ie)(o(P))),1)])]),k(ne,{modelValue:o(t).to.amount,"onUpdate:modelValue":W[1]||(W[1]=C=>o(t).to.amount=C),disable:o(b),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},Qe({_:2},[o(t).to?.symbol?{name:"append",fn:M(()=>[u("div",An,[u("img",{src:o(re)(o(t).to?.image)},null,8,wn),F(),u("span",null,S(o(t).to?.symbol),1)])]),key:"0"}:void 0]),1032,["modelValue","disable"])])]),u("div",vn,[u("dl",null,[_n,u("dd",null,S(o(h))+" "+S(o(m)),1)]),u("dl",null,[Pn,u("dd",null,S(o(l))+" "+S(o(p)),1)]),u("dl",null,[Tn,o(c)?(z(),U("dd",Bn," 1:"+S(o(c)),1)):(z(),U("dd",In," - "))]),u("dl",null,[Mn,u("dd",null,S(o(d))+" SOL",1)])]),k(ke,{class:"q-mt-md q-mx-auto"}),u("div",xn,[k(se,{loading:o(t).converting,rounded:"",ripple:!1,disable:!o(e)?.publicKey||!o(t).from.amount||o(t).from.amount<=0||!!o(D)||!o(y),onClick:T},{default:M(()=>[F(" Lock token ")]),_:1},8,["loading","disable"])]),u("div",Dn,[u("div",Wn," 1 "+S(o(p))+" = "+S(o(c))+" "+S(o(m)),1)])]),_:1}),k(Ze,{showing:o(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Rn="/assets/faucet-icon-9cedc046.svg",Un={class:"converter"},Fn={key:0,class:"converter-faucet"},Jn=u("div",{class:"converter-faucet__descr"}," To get the opTK token, click on faucet. ",-1),Kn=["src"],Cn=Ae({__name:"ConverterCard",setup(i){const e=Se(),{publicKey:t}=Ne(),n=ge(),{notify:s}=Ve(),r=mt("lock"),c=_(()=>e.cluster==="devnet");async function l(){if(t.value)try{n.state.loading=!0;const d=Je.fromSecretKey(St.decode("38f57pVjJEb9wGuzAmonU2k76ctmrDWBVyn9v5hMMURLVqYC5xWwd31UhHAWmNkTwvh1r8d1SgNoLKTiDUDnTo1u")),p=new g("CDcwg5UiZcXBtQ7eBRZpSr23vHntpGotmmgCSoxAjfrM"),m=await At(e.connection,d,p,t.value);await wt(e.connection,d,p,m.address,d,1e10),await n.getAllTokens(),n.state.from.amount=10,s({type:"positive",message:"You got 10 opTK"})}catch(d){console.log("failed mint e:",d)}finally{n.state.loading=!1}}return(d,p)=>{const m=zn,y=on;return z(),U("div",Un,[o(n).state.pairs.length!==0&&o(c)&&o(t)?(z(),U("div",Fn,[Jn,u("img",{src:o(Rn),alt:"faucet icon",onClick:l},null,8,Kn)])):H("",!0),k(we,{class:"liquidity-tabs swap-card swap-widget"},{default:M(()=>[k(ft,{modelValue:o(r),"onUpdate:modelValue":p[0]||(p[0]=f=>Be(r)?r.value=f:null),align:"justify","indicator-color":"transparent",class:pt(d.$q.dark.isActive?"bg-blue-grey-9":"bg-grey-3"),"active-color":"white","active-bg-color":"primary"},{default:M(()=>[k(Ie,{ripple:!1,label:"LOCK",name:"lock"}),k(Ie,{ripple:!1,label:"UNLOCK",name:"unlock"})]),_:1},8,["modelValue","class"]),k(yt,{modelValue:o(r),"onUpdate:modelValue":p[1]||(p[1]=f=>Be(r)?r.value=f:null),animated:"",class:"bg-transparent"},{default:M(()=>[k(Me,{name:"lock"},{default:M(()=>[k(m)]),_:1}),k(Me,{name:"unlock"},{default:M(()=>[k(y)]),_:1})]),_:1},8,["modelValue"])]),_:1})])}}});const En={},Vn={class:"main-block row justify-center"};function Ln(i,e){const t=qe,n=Cn,s=Oe,r=Ge;return z(),U(ht,null,[k(t,{class:"q-mt-lg"}),u("div",Vn,[k(n)]),k(s,{class:"q-mt-lg"}),k(r,{class:"q-mt-lg"})],64)}const Gn=gt(En,[["render",Ln]]);export{Gn as default}; +var He=Object.defineProperty;var je=(i,e,t)=>e in i?He(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>(je(i,typeof e!="symbol"?e+"":e,t),t);import{_ as qe,a as Oe,b as Ge}from"./AppDescriptionTop-8f9fdf69.js";import{_ as Re}from"./PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js";import{o as Ue,_ as Fe}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import{k as a,bc as v,P as g,b6 as B,aQ as x,aR as ee,bi as Xe,K as _e,aY as I,ae as Je,bj as Ye,bk as et,bl as tt,bm as Pe,R as be,J as it,b3 as nt,b4 as st,b5 as rt,a as N,s as at,u as Se,x as Ke,w as Ce,B as ot,v as _,bn as Ee,C as $,bf as ct,a_ as ut,bo as lt,am as dt,z as Ve,U as Te,V as Ae,o as z,Y as te,Z as M,j as k,a1 as Le,a2 as u,a3 as o,i as U,a5 as S,a4 as H,a0 as F,a6 as ie,a7 as ne,a8 as se,bp as Qe,a9 as Ze,$ as we,y as Ne,G as mt,aF as ft,as as Be,aE as pt,aD as Ie,aH as yt,aG as Me,_ as gt,ad as ht}from"./index-3e319056.js";import{c as kt,A as bt}from"./setAuthority-d61ee5de.js";import{b as St,g as At,m as wt}from"./index-6f941dc9.js";import"./internal-446163cd.js";const vt="/assets/unrecognized-token-3289de57.svg";function xe(i,e){if(e)return e[i]?.symbol??""}function re(i){return i??vt}const _t=[244,158,220,65,8,73,4,65];class E{constructor(e,t){this.authority=e,this.isPlatformPaused=t}static fromArgs(e){return new E(e.authority,e.isPlatformPaused)}static fromAccountInfo(e,t=0){return E.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Admin account at ${t}`);return E.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,q)}static deserialize(e,t=0){return q.deserialize(e,t)}serialize(){return q.serialize({accountDiscriminator:_t,...this})}static get byteSize(){return q.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(E.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===E.byteSize}pretty(){return{authority:this.authority.toBase58(),isPlatformPaused:this.isPlatformPaused}}}const q=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isPlatformPaused",a.bool]],E.fromArgs,"Admin"),Pt=[221,78,171,233,213,142,113,56];class V{constructor(e,t){this.authority=e,this.isAllPaused=t}static fromArgs(e){return new V(e.authority,e.isAllPaused)}static fromAccountInfo(e,t=0){return V.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Manager account at ${t}`);return V.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,O)}static deserialize(e,t=0){return O.deserialize(e,t)}serialize(){return O.serialize({accountDiscriminator:Pt,...this})}static get byteSize(){return O.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(V.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===V.byteSize}pretty(){return{authority:this.authority.toBase58(),isAllPaused:this.isAllPaused}}}const O=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isAllPaused",a.bool]],V.fromArgs,"Manager"),ve=new a.BeetArgsStruct([["num",a.u64],["denom",a.u64]],"Ratio"),De=[85,72,49,176,182,228,141,82];class L{constructor(e,t,n,s,r,c,l,d,p,m){this.authority=e,this.tokenA=t,this.tokenB=n,this.lockedAmount=s,this.ratio=r,this.isPaused=c,this.lockFee=l,this.unlockFee=d,this.feeReceiver=p,this.policy=m}static fromArgs(e){return new L(e.authority,e.tokenA,e.tokenB,e.lockedAmount,e.ratio,e.isPaused,e.lockFee,e.unlockFee,e.feeReceiver,e.policy)}static fromAccountInfo(e,t=0){return L.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find Pair account at ${t}`);return L.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,G)}static deserialize(e,t=0){return G.deserialize(e,t)}serialize(){return G.serialize({accountDiscriminator:De,...this})}static byteSize(e){const t=L.fromArgs(e);return G.toFixedFromValue({accountDiscriminator:De,...t}).byteSize}static async getMinimumBalanceForRentExemption(e,t,n){return t.getMinimumBalanceForRentExemption(L.byteSize(e),n)}pretty(){return{authority:this.authority.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),lockedAmount:(()=>{const e=this.lockedAmount;if(typeof e.toNumber=="function")try{return e.toNumber()}catch{return e}return e})(),ratio:this.ratio,isPaused:this.isPaused,lockFee:this.lockFee,unlockFee:this.unlockFee,feeReceiver:this.feeReceiver.toBase58(),policy:this.policy}}}const G=new a.FixableBeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["tokenA",v.publicKey],["tokenB",v.publicKey],["lockedAmount",a.u64],["ratio",ve],["isPaused",a.bool],["lockFee",a.u16],["unlockFee",a.u16],["feeReceiver",v.publicKey],["policy",a.coption(v.publicKey)]],L.fromArgs,"Pair"),Tt=[159,117,95,227,239,151,58,236];class Q{constructor(e,t){this.authority=e,this.isBlocked=t}static fromArgs(e){return new Q(e.authority,e.isBlocked)}static fromAccountInfo(e,t=0){return Q.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find User account at ${t}`);return Q.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,X)}static deserialize(e,t=0){return X.deserialize(e,t)}serialize(){return X.serialize({accountDiscriminator:Tt,...this})}static get byteSize(){return X.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(Q.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===Q.byteSize}pretty(){return{authority:this.authority.toBase58(),isBlocked:this.isBlocked}}}const X=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["authority",v.publicKey],["isBlocked",a.bool]],Q.fromArgs,"User"),Bt=[17,50,115,0,10,220,15,157];class Z{constructor(e,t){this.user=e,this.pair=t}static fromArgs(e){return new Z(e.user,e.pair)}static fromAccountInfo(e,t=0){return Z.deserialize(e.data,t)}static async fromAccountAddress(e,t,n){const s=await e.getAccountInfo(t,n);if(s==null)throw new Error(`Unable to find WhitelistedUserInfo account at ${t}`);return Z.fromAccountInfo(s,0)[0]}static gpaBuilder(e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){return v.GpaBuilder.fromStruct(e,Y)}static deserialize(e,t=0){return Y.deserialize(e,t)}serialize(){return Y.serialize({accountDiscriminator:Bt,...this})}static get byteSize(){return Y.byteSize}static async getMinimumBalanceForRentExemption(e,t){return e.getMinimumBalanceForRentExemption(Z.byteSize,t)}static hasCorrectByteSize(e,t=0){return e.byteLength-t===Z.byteSize}pretty(){return{user:this.user.toBase58(),pair:this.pair.toBase58()}}}const Y=new a.BeetStruct([["accountDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["user",v.publicKey],["pair",v.publicKey]],Z.fromArgs,"WhitelistedUserInfo"),J=new Map,K=new Map;class ce extends Error{constructor(){super("Unauthorized action");A(this,"code",6e3);A(this,"name","Unauthorized");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ce)}}J.set(6e3,()=>new ce);K.set("Unauthorized",()=>new ce);class ue extends Error{constructor(){super("Paused");A(this,"code",6001);A(this,"name","IsPaused");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ue)}}J.set(6001,()=>new ue);K.set("IsPaused",()=>new ue);class le extends Error{constructor(){super("Already resumed");A(this,"code",6002);A(this,"name","AlreadyResumed");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,le)}}J.set(6002,()=>new le);K.set("AlreadyResumed",()=>new le);class de extends Error{constructor(){super("Pair still have locked tokens");A(this,"code",6003);A(this,"name","StillRemainingLockedTokens");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,de)}}J.set(6003,()=>new de);K.set("StillRemainingLockedTokens",()=>new de);class me extends Error{constructor(){super("User is blocked");A(this,"code",6004);A(this,"name","IsBlocked");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me)}}J.set(6004,()=>new me);K.set("IsBlocked",()=>new me);class fe extends Error{constructor(){super("User is already unblocked");A(this,"code",6005);A(this,"name","AlreadyUnblocked");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fe)}}J.set(6005,()=>new fe);K.set("AlreadyUnblocked",()=>new fe);class pe extends Error{constructor(){super("Insufficient locked amount");A(this,"code",6006);A(this,"name","InsufficientLockedAmount");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,pe)}}J.set(6006,()=>new pe);K.set("InsufficientLockedAmount",()=>new pe);class ye extends Error{constructor(){super("Insufficient funds");A(this,"code",6007);A(this,"name","InsufficientFunds");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ye)}}J.set(6007,()=>new ye);K.set("InsufficientFunds",()=>new ye);const It=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["key",v.publicKey]],"AddManagerInstructionArgs"),Mt=[125,38,192,212,101,91,179,16];function xt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=It.serialize({instructionDiscriminator:Mt,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Dt=new a.FixableBeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["policy",a.coption(v.publicKey)],["ratio",ve]],"AddPairInstructionArgs"),Wt=[209,230,17,236,218,162,86,118];function zt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Dt.serialize({instructionDiscriminator:Wt,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Rt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"AddUserToWhitelistInstructionArgs"),Ut=[244,177,124,12,22,50,139,152];function Ft(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Rt.serialize({instructionDiscriminator:Ut}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.userAuthority,isWritable:!1,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!0,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Jt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"BlockUserInstructionArgs"),Kt=[10,164,178,6,231,175,185,191];function Ct(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Jt.serialize({instructionDiscriminator:Kt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Et=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"LockTokensInstructionArgs"),Vt=[136,11,32,232,161,117,54,211];function Lt(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Et.serialize({instructionDiscriminator:Vt,...e}),s=[{pubkey:i.proofRequest??t,isWritable:!1,isSigner:!1},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!1,isSigner:!1},{pubkey:i.userAuthority,isWritable:!0,isSigner:!0},{pubkey:i.whitelistedUserInfo,isWritable:!1,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.sourceA,isWritable:!0,isSigner:!1},{pubkey:i.destinationA,isWritable:!0,isSigner:!1},{pubkey:i.destinationB,isWritable:!0,isSigner:!1},{pubkey:i.feePayer,isWritable:!0,isSigner:!0},{pubkey:i.feeReceiver,isWritable:!0,isSigner:!1},{pubkey:i.tokenProgram??ee,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Qt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"PausePairsInstructionArgs"),Zt=[147,150,152,192,119,95,137,64];function Nt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Qt.serialize({instructionDiscriminator:Zt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const $t=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"PausePlatformInstructionArgs"),Ht=[232,46,204,130,181,0,172,57];function jt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=$t.serialize({instructionDiscriminator:Ht}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const qt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemoveManagerInstructionArgs"),Ot=[150,55,157,77,128,148,7,15];function Gt(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=qt.serialize({instructionDiscriminator:Ot}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const Xt=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemovePairInstructionArgs"),Yt=[181,42,154,249,167,123,20,81];function ei(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=Xt.serialize({instructionDiscriminator:Yt}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const ti=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"RemoveUserFromWhitelistInstructionArgs"),ii=[198,73,139,218,243,209,180,182];function ni(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=ti.serialize({instructionDiscriminator:ii}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const si=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"ResumePairsInstructionArgs"),ri=[23,106,248,226,173,20,247,74];function ai(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=si.serialize({instructionDiscriminator:ri}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!0,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const oi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"ResumePlatformInstructionArgs"),ci=[23,162,56,123,186,207,109,131];function ui(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=oi.serialize({instructionDiscriminator:ci}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const li=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["key",v.publicKey]],"SetAdminInstructionArgs"),di=[251,163,0,52,91,194,187,92];function mi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=li.serialize({instructionDiscriminator:di,...e}),s=[{pubkey:i.admin,isWritable:!0,isSigner:!1},{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const fi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)]],"UnblockUserInstructionArgs"),pi=[216,208,128,98,74,210,18,114];function yi(i,e=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[t]=fi.serialize({instructionDiscriminator:pi}),n=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const r of i.anchorRemainingAccounts)n.push(r);return new x({programId:e,keys:n,data:t})}const gi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"UnlockTokensInstructionArgs"),hi=[233,35,95,159,37,185,47,88];function ki(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=gi.serialize({instructionDiscriminator:hi,...e}),s=[{pubkey:i.proofRequest??t,isWritable:!1,isSigner:!1},{pubkey:i.user,isWritable:!1,isSigner:!1},{pubkey:i.userAuthority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!1,isSigner:!1},{pubkey:i.whitelistedUserInfo,isWritable:!1,isSigner:!1},{pubkey:i.manager,isWritable:!1,isSigner:!1},{pubkey:i.admin,isWritable:!1,isSigner:!1},{pubkey:i.tokenA,isWritable:!0,isSigner:!1},{pubkey:i.tokenB,isWritable:!0,isSigner:!1},{pubkey:i.sourceA,isWritable:!0,isSigner:!1},{pubkey:i.destinationA,isWritable:!0,isSigner:!1},{pubkey:i.sourceB,isWritable:!0,isSigner:!1},{pubkey:i.feePayer,isWritable:!0,isSigner:!0},{pubkey:i.feeReceiver,isWritable:!0,isSigner:!1},{pubkey:i.tokenProgram??ee,isWritable:!1,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const bi=new a.FixableBeetArgsStruct([["newAuthority",a.coption(v.publicKey)],["isPaused",a.coption(a.bool)],["ratio",a.coption(ve)],["lockFee",a.coption(a.u16)],["unlockFee",a.coption(a.u16)],["feeReceiver",a.coption(v.publicKey)]],"UpdatePairData"),Si=new a.FixableBeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["data",bi]],"UpdatePairInstructionArgs"),Ai=[176,62,36,215,255,206,35,12];function wi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=Si.serialize({instructionDiscriminator:Ai,...e}),s=[{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const vi=new a.BeetArgsStruct([["instructionDiscriminator",a.uniformFixedSizeArray(a.u8,8)],["amount",a.u64]],"WithdrawFeeInstructionArgs"),_i=[14,122,231,218,31,238,223,150];function Pi(i,e,t=new g("JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm")){const[n]=vi.serialize({instructionDiscriminator:_i,...e}),s=[{pubkey:i.pair,isWritable:!0,isSigner:!1},{pubkey:i.pairAuthority,isWritable:!0,isSigner:!1},{pubkey:i.destination,isWritable:!0,isSigner:!1},{pubkey:i.authority,isWritable:!0,isSigner:!0},{pubkey:i.systemProgram??B.programId,isWritable:!1,isSigner:!1}];if(i.anchorRemainingAccounts!=null)for(const c of i.anchorRemainingAccounts)s.push(c);return new x({programId:t,keys:s,data:n})}const Ti="JDe51ZjpQ3tZzL6QTVPHt5VT5NzaDuJnrTmJJUFrC3vm",We=new g(Ti),Bi={version:"0.0.6",name:"smart_converter",instructions:[{name:"setAdmin",accounts:[{name:"admin",isMut:!0,isSigner:!1},{name:"authority",isMut:!0,isSigner:!0},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"key",type:"publicKey"}]},{name:"addManager",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!1,isSigner:!1},{name:"manager",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"key",type:"publicKey"}]},{name:"addPair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"policy",type:{option:"publicKey"}},{name:"ratio",type:{defined:"Ratio"}}]},{name:"addUserToWhitelist",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"userAuthority",isMut:!1,isSigner:!1},{name:"whitelistedUserInfo",isMut:!0,isSigner:!1},{name:"pair",isMut:!0,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"removeUserFromWhitelist",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"whitelistedUserInfo",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"pausePlatform",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"resumePlatform",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"admin",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"lockTokens",accounts:[{name:"proofRequest",isMut:!1,isSigner:!1,isOptional:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"user",isMut:!1,isSigner:!1},{name:"userAuthority",isMut:!0,isSigner:!0},{name:"whitelistedUserInfo",isMut:!1,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"manager",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"sourceA",isMut:!0,isSigner:!1},{name:"destinationA",isMut:!0,isSigner:!1},{name:"destinationB",isMut:!0,isSigner:!1},{name:"feePayer",isMut:!0,isSigner:!0},{name:"feeReceiver",isMut:!0,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"unlockTokens",accounts:[{name:"proofRequest",isMut:!1,isSigner:!1,isOptional:!0},{name:"user",isMut:!1,isSigner:!1},{name:"userAuthority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!1,isSigner:!1},{name:"whitelistedUserInfo",isMut:!1,isSigner:!1},{name:"manager",isMut:!1,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"tokenA",isMut:!0,isSigner:!1},{name:"tokenB",isMut:!0,isSigner:!1},{name:"sourceA",isMut:!0,isSigner:!1},{name:"destinationA",isMut:!0,isSigner:!1},{name:"sourceB",isMut:!0,isSigner:!1},{name:"feePayer",isMut:!0,isSigner:!0},{name:"feeReceiver",isMut:!0,isSigner:!1},{name:"tokenProgram",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]},{name:"removeManager",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"pausePairs",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"resumePairs",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!0,isSigner:!1},{name:"admin",isMut:!1,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"removePair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"updatePair",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"pair",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"data",type:{defined:"UpdatePairData"}}]},{name:"blockUser",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"unblockUser",accounts:[{name:"authority",isMut:!0,isSigner:!0},{name:"manager",isMut:!1,isSigner:!1},{name:"user",isMut:!0,isSigner:!1},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[]},{name:"withdrawFee",accounts:[{name:"pair",isMut:!0,isSigner:!1},{name:"pairAuthority",isMut:!0,isSigner:!1},{name:"destination",isMut:!0,isSigner:!1},{name:"authority",isMut:!0,isSigner:!0},{name:"systemProgram",isMut:!1,isSigner:!1}],args:[{name:"amount",type:"u64"}]}],accounts:[{name:"pair",type:{kind:"struct",fields:[{name:"authority",docs:["Manager authority"],type:"publicKey"},{name:"tokenA",docs:["Security token mint address"],type:"publicKey"},{name:"tokenB",docs:["Utility token mint address"],type:"publicKey"},{name:"lockedAmount",docs:["Amount of security tokens currently locked"],type:"u64"},{name:"ratio",docs:["Ratio of token A to token B"],type:{defined:"Ratio"}},{name:"isPaused",docs:["Indicates if pair is paused or not"],type:"bool"},{name:"lockFee",docs:["Fee for locking token A"],type:"u16"},{name:"unlockFee",docs:["Fee for unlocking token A"],type:"u16"},{name:"feeReceiver",docs:["Wallet that will receive fee"],type:"publicKey"},{name:"policy",docs:["Albus policy"],type:{option:"publicKey"}}]}},{name:"admin",type:{kind:"struct",fields:[{name:"authority",docs:["Manager wallet address"],type:"publicKey"},{name:"isPlatformPaused",docs:["Indicates if platform is paused or not"],type:"bool"}]}},{name:"manager",type:{kind:"struct",fields:[{name:"authority",docs:["Manager address"],type:"publicKey"},{name:"isAllPaused",docs:["Indicates if manager's pairs are paused or not"],type:"bool"}]}},{name:"user",type:{kind:"struct",fields:[{name:"authority",docs:["User address"],type:"publicKey"},{name:"isBlocked",docs:["Indicates if user is blocked or not"],type:"bool"}]}},{name:"whitelistedUserInfo",type:{kind:"struct",fields:[{name:"user",docs:["User address"],type:"publicKey"},{name:"pair",docs:["Pair address"],type:"publicKey"}]}}],types:[{name:"UpdatePairData",type:{kind:"struct",fields:[{name:"newAuthority",type:{option:"publicKey"}},{name:"isPaused",type:{option:"bool"}},{name:"ratio",type:{option:{defined:"Ratio"}}},{name:"lockFee",type:{option:"u16"}},{name:"unlockFee",type:{option:"u16"}},{name:"feeReceiver",type:{option:"publicKey"}}]}},{name:"Ratio",type:{kind:"struct",fields:[{name:"num",type:"u64"},{name:"denom",type:"u64"}]}}],events:[{name:"LockTokensEvent",fields:[{name:"pair",type:"publicKey",index:!0},{name:"user",type:"publicKey",index:!1},{name:"userAuthority",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"timestamp",type:"i64",index:!1}]},{name:"UnlockTokensEvent",fields:[{name:"pair",type:"publicKey",index:!0},{name:"user",type:"publicKey",index:!1},{name:"userAuthority",type:"publicKey",index:!1},{name:"amount",type:"u64",index:!1},{name:"timestamp",type:"i64",index:!1}]}],errors:[{code:6e3,name:"Unauthorized",msg:"Unauthorized action"},{code:6001,name:"IsPaused",msg:"Paused"},{code:6002,name:"AlreadyResumed",msg:"Already resumed"},{code:6003,name:"StillRemainingLockedTokens",msg:"Pair still have locked tokens"},{code:6004,name:"IsBlocked",msg:"User is blocked"},{code:6005,name:"AlreadyUnblocked",msg:"User is already unblocked"},{code:6006,name:"InsufficientLockedAmount",msg:"Insufficient locked amount"},{code:6007,name:"InsufficientFunds",msg:"Insufficient funds"}]};function ze(i){return"version"in i}class Ii{constructor(e){this.payer=e}async signTransaction(e){return ze(e)?e.sign([this.payer]):e.partialSign(this.payer),e}async signAllTransactions(e){return e.map(t=>(ze(t)?t.sign([this.payer]):t.partialSign(this.payer),t))}get publicKey(){return this.payer.publicKey}}const Mi="user",xi="manager",Di="pair",Wi="admin",zi="whitelist",oe=class oe{constructor(e){A(this,"program");this.provider=e,this.program=new Xe(Bi,We,e)}static fromWallet(e,t,n){return new this(new _e(e,t??{publicKey:g.default},{..._e.defaultOptions(),...n}))}static fromKeypair(e,t,n){return oe.fromWallet(e,new Ii(t),n)}get idl(){return this.program.idl}get pda(){return new Ri}fetchManager(e){return this.program.account.manager.fetchNullable(e)}fetchAdmin(e){return this.program.account.admin.fetchNullable(e??this.pda.admin()[0])}fetchUser(e){return this.program.account.user.fetchNullable(e)}fetchPair(e){return this.program.account.pair.fetchNullable(e)}fetchWhitelistedUserInfo(e){return this.program.account.whitelistedUserInfo.fetchNullable(e)}fetchWhitelistedUserInfoByUserAndPair(e,t){const[n]=this.pda.whitelistedUserInfo(e,t);return this.fetchWhitelistedUserInfo(n)}findManagers(){return this.program.account.manager.all()}findPairs(){return this.program.account.pair.all()}async findManagerPairs(e){return(await this.program.account.pair.all()).filter(n=>n.account.authority.toBase58()===e.toBase58())}async findWhitelistedUsers(e){return(await this.program.account.whitelistedUserInfo.all()).filter(n=>n.account.pair.toBase58()===e.toBase58())}async findUserWhitelistInfos(e){return(await this.program.account.whitelistedUserInfo.all()).filter(n=>n.account.user.toBase58()===e.toBase58())}async addManager(e){const t=this.provider.publicKey,[n]=this.pda.manager(e.managerWallet),[s]=this.pda.admin(),r=xt({authority:t,admin:s,manager:n},{key:e.managerWallet}),c=new I().add(r);return{signature:await this.provider.sendAndConfirm(c),manager:n}}async addPair(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.tokenA;let r=e.tokenB;const c=new I,l=[];let d,p;if(r)d=this.pda.pair(s,r)[0],p=this.pda.pairAuthority(d)[0],c.add(kt(r,this.provider.publicKey,bt.MintTokens,p));else{const y=e.tokenBKeypair??Je.generate();r=y.publicKey,l.push(y),d=this.pda.pair(s,r)[0],p=this.pda.pairAuthority(d)[0];const f=await Ye(this.provider.connection);c.add(B.createAccount({fromPubkey:t,newAccountPubkey:y.publicKey,space:et,lamports:f,programId:ee}),tt(y.publicKey,9,p,null,ee))}return await this.handleMissingTokenAccount(c,s,p),await this.handleMissingTokenAccount(c,r,p),c.add(zt({authority:t,manager:n,pair:d,pairAuthority:p,tokenA:s,tokenB:r},{ratio:e.ratio??{num:1,denom:1},policy:e.policy??null})),{signature:await this.provider.sendAndConfirm(c,l),pair:d}}async lockTokens(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.user(t),[c]=this.pda.pair(n,s),l=await this.fetchPair(c),[d]=this.pda.admin(),[p]=this.pda.manager(l.authority),[m]=this.pda.pairAuthority(c),[y]=this.pda.whitelistedUserInfo(t,c),f=new I,b=Pe(n,t),w=await this.handleMissingTokenAccount(f,n,m),P=await this.handleMissingTokenAccount(f,s,t);return f.add(Lt({proofRequest:e.proofRequest,user:r,userAuthority:t,pair:c,pairAuthority:m,admin:d,manager:p,whitelistedUserInfo:y,feePayer:e.feePayer??t,feeReceiver:l.feeReceiver,sourceA:b,destinationA:w,destinationB:P,tokenA:n,tokenB:s},{amount:new be(e.amount)})),{signature:await this.provider.sendAndConfirm(f),pair:c}}async unlockTokens(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.admin(),[c]=this.pda.user(t),[l]=this.pda.pair(n,s),[d]=this.pda.pairAuthority(l),[p]=this.pda.whitelistedUserInfo(t,l),m=await this.fetchPair(l),[y]=this.pda.manager(m.authority),f=new I,b=await this.handleMissingTokenAccount(f,s,t),w=await this.handleMissingTokenAccount(f,n,d),P=await this.handleMissingTokenAccount(f,n,t);return f.add(ki({proofRequest:e.proofRequest,user:c,userAuthority:t,pair:l,pairAuthority:d,feePayer:e.feePayer??t,feeReceiver:m.feeReceiver,whitelistedUserInfo:p,admin:r,destinationA:P,manager:y,sourceA:w,sourceB:b,tokenA:n,tokenB:s},{amount:new be(e.amount)})),{signature:await this.provider.sendAndConfirm(f),pair:l,user:c}}async addUserToWhitelist(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.userWallet,[r]=this.pda.user(s),c=e.tokenA,l=e.tokenB,[d]=this.pda.pair(c,l),[p]=this.pda.whitelistedUserInfo(s,d),m=Ft({userAuthority:s,authority:t,manager:n,pair:d,tokenA:c,tokenB:l,user:r,whitelistedUserInfo:p}),y=new I().add(m);return{signature:await this.provider.sendAndConfirm(y),user:r,whitelistedUserInfo:p}}async removeUserFromWhitelist(e){const t=this.provider.publicKey,n=e.userWallet,[s]=this.pda.user(n),[r]=this.pda.pair(e.tokenA,e.tokenB),[c]=this.pda.whitelistedUserInfo(n,r),l=ni({authority:t,pair:r,whitelistedUserInfo:c}),d=new I().add(l);return{signature:await this.provider.sendAndConfirm(d),user:s,whitelistedUserInfo:c}}async blockUser(e){const t=this.provider.publicKey,[n]=this.pda.manager(t),s=e.userWallet,[r]=this.pda.user(s),c=Ct({authority:t,manager:n,user:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),user:r}}async unblockUser(e){const t=this.provider.publicKey,n=e.userWallet,[s]=this.pda.manager(t),[r]=this.pda.user(n),c=yi({authority:t,manager:s,user:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),user:r}}async pausePairs(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=Nt({admin:r,authority:t,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async pausePlatform(){const e=this.provider.publicKey,[t]=this.pda.admin(),n=jt({admin:t,authority:e}),s=new I().add(n);return{signature:await this.provider.sendAndConfirm(s),admin:t}}async removeManager(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=Gt({admin:r,authority:t,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async removePair(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.pair(n,s),c=ei({authority:t,pair:r}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),pair:r}}async resumePairs(e){const t=this.provider.publicKey,n=e.managerWallet,[s]=this.pda.manager(n),[r]=this.pda.admin(),c=ai({authority:t,admin:r,manager:s}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),manager:s}}async resumePlatform(){const e=this.provider.publicKey,[t]=this.pda.admin(),n=ui({authority:e,admin:t}),s=new I().add(n);return{signature:await this.provider.sendAndConfirm(s),admin:t}}async setAdmin(e){const t=this.provider.publicKey,[n]=this.pda.admin(),s=mi({authority:t,admin:n},{key:e.authority}),r=new I().add(s);return{signature:await this.provider.sendAndConfirm(r)}}async withdrawFee(e){const t=this.provider.publicKey,[n]=this.pda.pair(e.tokenA,e.tokenB),[s]=this.pda.pairAuthority(n),r=Pi({authority:t,pair:n,pairAuthority:s,destination:e.destination},{amount:new be(e.amount)}),c=new I().add(r);return{signature:await this.provider.sendAndConfirm(c)}}async updatePair(e){const t=this.provider.publicKey,n=e.tokenA,s=e.tokenB,[r]=this.pda.pair(n,s),c=wi({authority:t,pair:r},{data:{feeReceiver:e.feeReceiver??null,lockFee:e.lockFee??null,unlockFee:e.unlockFee??null,newAuthority:e.newAuthority??null,isPaused:e.isPaused??null,ratio:e.ratio??null}}),l=new I().add(c);return{signature:await this.provider.sendAndConfirm(l),pair:r}}async handleMissingTokenAccount(e,t,n){const s=n??this.provider.publicKey,r=Pe(t,s,!0);try{await it(this.provider.connection,r)}catch(c){(c instanceof nt||c instanceof st)&&e.add(rt(this.provider.publicKey,r,s,t))}return r}};A(oe,"programId",We);let ae=oe;class Ri{constructor(){A(this,"pairAuthority",e=>this.pda([new g(e).toBuffer()]));A(this,"admin",()=>this.pda([N.Buffer.from(Wi)]));A(this,"manager",e=>this.pda([N.Buffer.from(xi),new g(e).toBuffer()]));A(this,"user",e=>this.pda([N.Buffer.from(Mi),new g(e).toBuffer()]));A(this,"pair",(e,t)=>this.pda([N.Buffer.from(Di),new g(e).toBuffer(),new g(t).toBuffer()]));A(this,"whitelistedUserInfo",(e,t)=>this.pda([N.Buffer.from(zi),new g(e).toBuffer(),new g(t).toBuffer()]))}pda(e){return g.findProgramAddressSync(e,ae.programId)}}const ge=at("converter",()=>{const i=Se(),e=Ke(),{setContractPolicy:t}=Ce(),n=ot({from:{amount:void 0},to:{amount:void 0},token:void 0,allTokens:[],pairs:[],selectedPair:void 0,searchToken:"",converting:!1,loading:!1,isLock:!0}),s=_(()=>ae.fromWallet(i.connection,e.value));async function r(m,y,f){try{const b=await ut.Metadata.fromAccountAddress(m,lt(y)),w=b.data?.uri;if(w){const{data:P}=await dt.get(w);return{...P,image:re(P?.image)}}return b}catch{return{symbol:f,image:re()}}}const c=m=>n.allTokens.find(f=>f.mint.toBase58()===m)?.balance??0,l=async()=>{try{const m=e.value?.publicKey;if(!m)return;n.allTokens=await ct(i.connection,m)}catch(m){console.log(m)}},d=async()=>{try{n.loading=!0;const m=await s.value.findPairs();if(n.pairs.length!==0)return;const y=await Promise.all(m.map(async f=>{const b=f.account,w=b.tokenA.toBase58(),P=b.tokenB.toBase58(),h=await r(i.connection,w,"tokenA"),R=await r(i.connection,P,"tokenB"),T={[w]:h,[P]:R};return{...f,tokensMetadata:T}}));n.pairs=y}catch(m){console.log(m)}finally{n.loading=!1}},p=async m=>{try{n.loading=!0;const y=await s.value.fetchPair(m);if(y){const f=n.pairs.findIndex(b=>b.publicKey.toBase58()===m);if(f!==-1){const b=n.pairs[f];n.pairs[f]={...b,account:y},n.selectedPair=n.pairs[f]}}}catch(y){console.log(y),await d()}finally{n.loading=!1}};return Ee(s,async m=>{i.cluster==="devnet"&&await d()},{immediate:!0,debounce:500,maxWait:1e3}),$(()=>i.cluster,m=>{m!=="devnet"&&(n.pairs=[],n.selectedPair=void 0,n.token=void 0,n.from={amount:void 0},n.to={amount:void 0})}),$(()=>e.value?.publicKey,async m=>{if(!m){n.allTokens=[],n.from.balance=0,n.to.balance=0;return}await l()},{immediate:!0}),$([()=>n.token,()=>n.allTokens,()=>n.pairs],([m])=>{const y=n.selectedPair;if(!y)return;const f=y.account?.policy;f&&t(String(f));for(const b in y.tokensMetadata){const w=y.tokensMetadata[b],P=c(String(b));b===m?.mint?n.from={...w,balance:P,amount:void 0}:n.to={...w,balance:P,amount:void 0}}}),$(()=>n.isLock,()=>{n.token=void 0}),{state:n,getAllTokens:l,updatePairData:p,converterClient:s}});function $e(){const i=ge(),e=Ce(),t=Se(),{notify:n}=Ve();function s(h){console.log("set token ======== ",h),i.state.selectedPair=i.state.pairs.find(R=>R.publicKey.toBase58()===h?.publicKey?.toBase58()),i.state.token=h}function r(h){i.state.searchToken=h}const c=_(()=>i.state.pairs.map(T=>{const D=Object.entries(T.tokensMetadata)[i.state.isLock?0:1];return{...D[1],mint:D[0],publicKey:T.publicKey}}).flat().filter(T=>T.symbol.toLowerCase().includes(i.state.searchToken.toLowerCase()))),l=_(()=>i.state.selectedPair?.account),d=_(()=>l.value?.ratio?.num?.toNumber()??1),p=_(()=>l.value?.lockedAmount?l.value?.lockedAmount?.toNumber()/Te:0),m=_(()=>l.value?.lockFee),y=_(()=>{const h=l.value?.tokenA?.toString();return xe(h,i.state.selectedPair?.tokensMetadata)}),f=_(()=>{const h=l.value?.tokenB?.toString();return xe(h,i.state.selectedPair?.tokensMetadata)}),b=_(()=>i.state.pairs.length===0),w=_(()=>!!e.state.certificates?.find(h=>h.data?.policy.toBase58()===String(e.requiredPolicy)));async function P(h=!0){const R=e.state.certificates?.find(T=>T.data?.policy.toBase58()===String(e.requiredPolicy))?.pubkey;if(!(!l.value||!R))try{i.state.converting=!0;const T=l.value.tokenA,D=l.value.tokenB,j=Number(i.state.from.amount*Te)/(i.state.isLock?1:d.value);let W;h?W=await i.converterClient.lockTokens({tokenA:T,tokenB:D,amount:j,proofRequest:R}):W=await i.converterClient.unlockTokens({tokenA:T,tokenB:D,amount:j,proofRequest:R}),n({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${W.signature}?cluster=${t.cluster}`,onClick:()=>!1}]}),setTimeout(async()=>{Promise.all([await i.getAllTokens(),await i.updatePairData(i.state.selectedPair.publicKey.toBase58())])},1e3)}catch(T){console.error("lockedToken error: ",T),n({type:"negative",message:`${T}`})}finally{i.state.converting=!1}}return Ee(c,h=>{h.length!==0&&!i.state.token&&s(h[0])},{immediate:!0,debounce:100,maxWait:1e3}),$(()=>i.state.from.amount,h=>{if(!h){i.state.to.amount=void 0;return}i.state.to.amount=i.state.isLock?h*d.value:h/d.value}),{options:c,setToken:s,handleSearchToken:r,pairRatio:d,pairLockedAmount:p,pairLockFee:m,tokenASymbol:y,tokenBSymbol:f,isHaveCertificate:w,lockUnlockToken:P,isDisabledInputs:b}}const Ui={class:"swap-form"},Fi={class:"swap-field"},Ji={class:"swap-field__info"},Ki={class:"row items-end"},Ci=u("div",{class:"col swap-field__label"}," FROM: ",-1),Ei={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Vi={key:0,class:"insufficient-error"},Li=u("div",{class:"swap-change"},null,-1),Qi={class:"swap-field"},Zi={class:"swap-field__info"},Ni={class:"row"},$i=u("div",{class:"col swap-field__label"}," TO: ",-1),Hi={class:"col swap-field__balance"},ji={class:"convert-to"},qi=["src"],Oi={class:"swap-info q-mt-md q-pt-xs"},Gi=u("dt",null,"Received",-1),Xi=u("dt",null,"Locked amount",-1),Yi=u("dt",null,"Ratio",-1),en={key:0},tn={key:1},nn=u("dt",null,"Lock fee",-1),sn={class:"swap-submit q-mt-md"},rn={class:"row q-mt-md text-center relative-position full-width"},an={class:"swap-rate q-mx-auto"},on=Ae({__name:"UnlockCard",setup(i){const{state:e}=ge(),{options:t,setToken:n,handleSearchToken:s,pairRatio:r,pairLockedAmount:c,pairLockFee:l,tokenASymbol:d,tokenBSymbol:p,isHaveCertificate:m,lockUnlockToken:y,isDisabledInputs:f}=$e();e.isLock=!1;const b=Ke(),w=_(()=>e.from.balance),P=_(()=>e.to.balance),h=_(()=>e.to.amount??0);function R(){e.from.amount=w.value}async function T(){await y(!1)}const D=_(()=>e.from.amount>w.value?"Insufficient funds":!1);return(j,W)=>{const he=Fe,ke=Re;return z(),te(we,{class:"swap-card swap-widget converting-card"},{default:M(()=>[k(Le,{class:"swap-card__body"},{default:M(()=>[u("div",Ui,[u("div",Fi,[u("div",Ji,[u("div",Ki,[Ci,u("div",Ei,[o(D)?(z(),U("div",Vi,S(o(D)),1)):H("",!0),F(" Balance: "+S(o(ie)(o(w))),1)])])]),k(ne,{modelValue:o(e).from.amount,"onUpdate:modelValue":W[0]||(W[0]=C=>o(e).from.amount=C),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",disable:o(f),onKeypress:o(Ue)},{append:M(()=>[k(se,{disable:o(f),dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:R},{default:M(()=>[F(" MAX ")]),_:1},8,["disable"]),o(e).token?(z(),te(he,{key:0,options:o(t),token:o(e).token,"swap-token":String(o(e).to.symbol),onHandleSearchToken:o(s),onSetToken:o(n)},null,8,["options","token","swap-token","onHandleSearchToken","onSetToken"])):H("",!0)]),_:1},8,["modelValue","disable","onKeypress"])]),Li,u("div",Qi,[u("div",Zi,[u("div",Ni,[$i,u("div",Hi," Balance: "+S(o(ie)(o(P))),1)])]),k(ne,{modelValue:o(e).to.amount,"onUpdate:modelValue":W[1]||(W[1]=C=>o(e).to.amount=C),disable:o(f),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},Qe({_:2},[o(e).to?.symbol?{name:"append",fn:M(()=>[u("div",ji,[u("img",{src:o(re)(o(e).to?.image)},null,8,qi),F(),u("span",null,S(o(e).to?.symbol),1)])]),key:"0"}:void 0]),1032,["modelValue","disable"])])]),u("div",Oi,[u("dl",null,[Gi,u("dd",null,S(o(h))+" "+S(o(p)),1)]),u("dl",null,[Xi,u("dd",null,S(o(c))+" "+S(o(d)),1)]),u("dl",null,[Yi,o(r)?(z(),U("dd",en,S(o(r))+":1 ",1)):(z(),U("dd",tn," - "))]),u("dl",null,[nn,u("dd",null,S(o(l))+" SOL",1)])]),k(ke,{class:"q-mt-md q-mx-auto"}),u("div",sn,[k(se,{loading:o(e).converting,rounded:"",ripple:!1,disable:!o(b)?.publicKey||!o(e).from.amount||o(e).from.amount<=0||!!o(D)||!o(m),onClick:T},{default:M(()=>[F(" Unlock token ")]),_:1},8,["loading","disable"])]),u("div",rn,[u("div",an," 1 "+S(o(p))+" = "+S(1/o(r))+" "+S(o(d)),1)])]),_:1}),k(Ze,{showing:o(e)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),cn={class:"swap-form"},un={class:"swap-field"},ln={class:"swap-field__info"},dn={class:"row items-end"},mn=u("div",{class:"col swap-field__label"}," FROM: ",-1),fn={class:"col-8 col-xs-10 row justify-end swap-field__balance"},pn={key:0,class:"insufficient-error"},yn=u("div",{class:"swap-change"},null,-1),gn={class:"swap-field"},hn={class:"swap-field__info"},kn={class:"row"},bn=u("div",{class:"col swap-field__label"}," TO: ",-1),Sn={class:"col swap-field__balance"},An={class:"convert-to"},wn=["src"],vn={class:"swap-info q-mt-md q-pt-xs"},_n=u("dt",null,"Received",-1),Pn=u("dt",null,"Locked amount",-1),Tn=u("dt",null,"Ratio",-1),Bn={key:0},In={key:1},Mn=u("dt",null,"Lock fee",-1),xn={class:"swap-submit q-mt-md"},Dn={class:"row q-mt-md text-center relative-position full-width"},Wn={class:"swap-rate q-mx-auto"},zn=Ae({__name:"LockCard",setup(i){const e=Ne(),{state:t}=ge(),{options:n,setToken:s,handleSearchToken:r,pairRatio:c,pairLockedAmount:l,pairLockFee:d,tokenASymbol:p,tokenBSymbol:m,isHaveCertificate:y,lockUnlockToken:f,isDisabledInputs:b}=$e();t.isLock=!0;const w=_(()=>t.from.balance),P=_(()=>t.to.balance),h=_(()=>t.to.amount??0);function R(){t.from.amount=w.value}async function T(){await f()}const D=_(()=>t.from.amount>w.value?"Insufficient funds":!1);return(j,W)=>{const he=Fe,ke=Re;return z(),te(we,{class:"swap-card swap-widget converting-card"},{default:M(()=>[k(Le,{class:"swap-card__body"},{default:M(()=>[u("div",cn,[u("div",un,[u("div",ln,[u("div",dn,[mn,u("div",fn,[o(D)?(z(),U("div",pn,S(o(D)),1)):H("",!0),F(" Balance: "+S(o(ie)(o(w))),1)])])]),k(ne,{modelValue:o(t).from.amount,"onUpdate:modelValue":W[0]||(W[0]=C=>o(t).from.amount=C),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",disable:o(b),onKeypress:o(Ue)},{append:M(()=>[k(se,{disable:o(b),dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:R},{default:M(()=>[F(" MAX ")]),_:1},8,["disable"]),o(t).token?(z(),te(he,{key:0,options:o(n),token:o(t).token,"swap-token":String(o(t).to.symbol),onHandleSearchToken:o(r),onSetToken:o(s)},null,8,["options","token","swap-token","onHandleSearchToken","onSetToken"])):H("",!0)]),_:1},8,["modelValue","disable","onKeypress"])]),yn,u("div",gn,[u("div",hn,[u("div",kn,[bn,u("div",Sn," Balance: "+S(o(ie)(o(P))),1)])]),k(ne,{modelValue:o(t).to.amount,"onUpdate:modelValue":W[1]||(W[1]=C=>o(t).to.amount=C),disable:o(b),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},Qe({_:2},[o(t).to?.symbol?{name:"append",fn:M(()=>[u("div",An,[u("img",{src:o(re)(o(t).to?.image)},null,8,wn),F(),u("span",null,S(o(t).to?.symbol),1)])]),key:"0"}:void 0]),1032,["modelValue","disable"])])]),u("div",vn,[u("dl",null,[_n,u("dd",null,S(o(h))+" "+S(o(m)),1)]),u("dl",null,[Pn,u("dd",null,S(o(l))+" "+S(o(p)),1)]),u("dl",null,[Tn,o(c)?(z(),U("dd",Bn," 1:"+S(o(c)),1)):(z(),U("dd",In," - "))]),u("dl",null,[Mn,u("dd",null,S(o(d))+" SOL",1)])]),k(ke,{class:"q-mt-md q-mx-auto"}),u("div",xn,[k(se,{loading:o(t).converting,rounded:"",ripple:!1,disable:!o(e)?.publicKey||!o(t).from.amount||o(t).from.amount<=0||!!o(D)||!o(y),onClick:T},{default:M(()=>[F(" Lock token ")]),_:1},8,["loading","disable"])]),u("div",Dn,[u("div",Wn," 1 "+S(o(p))+" = "+S(o(c))+" "+S(o(m)),1)])]),_:1}),k(Ze,{showing:o(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Rn="/assets/faucet-icon-9cedc046.svg",Un={class:"converter"},Fn={key:0,class:"converter-faucet"},Jn=u("div",{class:"converter-faucet__descr"}," To get the opTK token, click on faucet. ",-1),Kn=["src"],Cn=Ae({__name:"ConverterCard",setup(i){const e=Se(),{publicKey:t}=Ne(),n=ge(),{notify:s}=Ve(),r=mt("lock"),c=_(()=>e.cluster==="devnet");async function l(){if(t.value)try{n.state.loading=!0;const d=Je.fromSecretKey(St.decode("38f57pVjJEb9wGuzAmonU2k76ctmrDWBVyn9v5hMMURLVqYC5xWwd31UhHAWmNkTwvh1r8d1SgNoLKTiDUDnTo1u")),p=new g("CDcwg5UiZcXBtQ7eBRZpSr23vHntpGotmmgCSoxAjfrM"),m=await At(e.connection,d,p,t.value);await wt(e.connection,d,p,m.address,d,1e10),await n.getAllTokens(),n.state.from.amount=10,s({type:"positive",message:"You got 10 opTK"})}catch(d){console.log("failed mint e:",d)}finally{n.state.loading=!1}}return(d,p)=>{const m=zn,y=on;return z(),U("div",Un,[o(n).state.pairs.length!==0&&o(c)&&o(t)?(z(),U("div",Fn,[Jn,u("img",{src:o(Rn),alt:"faucet icon",onClick:l},null,8,Kn)])):H("",!0),k(we,{class:"liquidity-tabs swap-card swap-widget"},{default:M(()=>[k(ft,{modelValue:o(r),"onUpdate:modelValue":p[0]||(p[0]=f=>Be(r)?r.value=f:null),align:"justify","indicator-color":"transparent",class:pt(d.$q.dark.isActive?"bg-blue-grey-9":"bg-grey-3"),"active-color":"white","active-bg-color":"primary"},{default:M(()=>[k(Ie,{ripple:!1,label:"LOCK",name:"lock"}),k(Ie,{ripple:!1,label:"UNLOCK",name:"unlock"})]),_:1},8,["modelValue","class"]),k(yt,{modelValue:o(r),"onUpdate:modelValue":p[1]||(p[1]=f=>Be(r)?r.value=f:null),animated:"",class:"bg-transparent"},{default:M(()=>[k(Me,{name:"lock"},{default:M(()=>[k(m)]),_:1}),k(Me,{name:"unlock"},{default:M(()=>[k(y)]),_:1})]),_:1},8,["modelValue"])]),_:1})])}}});const En={},Vn={class:"main-block row justify-center"};function Ln(i,e){const t=qe,n=Cn,s=Oe,r=Ge;return z(),U(ht,null,[k(t,{class:"q-mt-lg"}),u("div",Vn,[k(n)]),k(s,{class:"q-mt-lg"}),k(r,{class:"q-mt-lg"})],64)}const Gn=gt(En,[["render",Ln]]);export{Gn as default}; diff --git a/assets/create-pool-416d2f29.js b/assets/create-pool-cad715b8.js similarity index 98% rename from assets/create-pool-416d2f29.js rename to assets/create-pool-cad715b8.js index 1fac517..69893e3 100644 --- a/assets/create-pool-416d2f29.js +++ b/assets/create-pool-cad715b8.js @@ -1 +1 @@ -import{aN as pe,aO as me,a as ie,aP as ye,aQ as we,aR as ke,V as W,w as O,v as V,o as _,Y as M,Z as p,a3 as t,i as P,a2 as l,a5 as h,ad as _e,au as fe,aS as ve,a4 as q,$ as G,a0 as T,aK as ge,j as s,aT as be,u as z,z as J,aU as Se,G as C,aV as Te,aW as he,aX as Fe,x as re,y as ce,B as Q,ae as ue,aY as H,aZ as Ae,aC as Pe,P as x,a_ as I,a$ as j,b0 as R,W as Be,a1 as K,aA as ee,ax as te,ay as oe,a7 as S,a8 as N,b1 as ae,as as L,at as Ve,aM as Ne,H as Me,I as qe,b2 as ne,J as De,b3 as Ce,b4 as $e,b5 as Ue,b6 as Ie,aB as Le,X as xe,a6 as Ke,a9 as We,_ as Oe}from"./index-d1afe763.js";import{_ as Ee,o as Re}from"./SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js";import{u as Qe,k as se}from"./swap-a8389507.js";import{c as He}from"./setAuthority-3cfe3852.js";import"./associatedTokenAccount-50901cf8.js";import"./internal-c2cc419b.js";const le=pe([me("instruction")]);function je(u,o=ke){const i=[{pubkey:u,isSigner:!1,isWritable:!0}],r=ie.Buffer.alloc(le.span);return le.encode({instruction:ye.SyncNative},r),new we({keys:i,programId:o,data:r})}const Ge={key:0,class:"policy-card__policy q-pa-md"},ze={class:"policy-card__policy__info"},Je={class:"policy-card__policy__subtitle"},Xe={class:"policy-card__policy__subtitle"},Ye=l("div",{class:"policy-card__policy__subtitle"}," Rules: ",-1),Ze={class:"q-ml-xs"},et={key:0},tt=W({__name:"SelectPolicyItem",props:{policyData:Object,policy:Object},setup(u){const o=O(),i=V(()=>o.serviceData),r=V(()=>o.serviceLoading);return(g,c)=>(_(),M(G,{class:""},{default:p(()=>[t(r)?q("",!0):(_(),P("div",Ge,[l("div",ze,[l("div",Je," Address: "+h(u.policy?.toBase58()),1),l("div",Xe," Name: "+h(t(i)?.name)+" "+h(u.policyData?.name),1),Ye,l("div",Ze,[(_(!0),P(_e,null,fe(u.policyData?.rules,(e,k)=>(_(),P("div",{key:k},[e.key!=="maxAge"&&e.key!=="expectedDateTo"||e.label!=="0"?(_(),P("span",et,h(t(ve)(e.key,e.label,e.value)),1)):q("",!0)]))),128))])])]))]),_:1}))}}),ot={key:0},at={key:1},nt=W({__name:"CreatePoolTokenData",props:{balance:[String,Number],mint:String},setup(u){return(o,i)=>(_(),P("div",null,[u.mint?(_(),P("div",ot,[l("div",null," balance: "+h(u.balance),1),l("div",null,[T(" mint: "+h(t(ge)(u.mint))+" ",1),s(be,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:p(()=>[T(h(u.mint),1)]),_:1})])])):(_(),P("div",at," Select token "))]))}});function de(){const u=z(),{notify:o}=J(),i=Se(u,"cluster"),r=C(!1);async function g(c,{onSuccess:e,onError:k,idx:d,commitment:b=Te,sendTimeout:F=he,confirmTimeout:D=Fe}={}){d=d??"";let B=o({progress:!0,type:"ongoing",message:d?`Sending transaction "${d}" ...`:"Sending transaction...",timeout:F});const f={label:"Close",color:"white"};r.value=!0;let m="";try{const w=await c;m=String(typeof w=="object"?await w.signature:await c)}catch(w){r.value=!1,B(),String(w?.message).startsWith("User rejected")||o({message:d?`Transaction "${d}" error`:"Transaction error",caption:w?.message,type:"negative",timeout:0,actions:[f]});return}const v={label:"Explore",color:"white",target:"_blank",href:`https://solscan.io/tx/${m}?cluster=${i.value}`,onClick:()=>!1};try{B(),B=o({progress:!0,type:"ongoing",message:d?`Confirming transaction "${d}" ...`:"Confirming transaction...",actions:[v],timeout:D});const w=await u.connection.getLatestBlockhash(),A=await u.connection.confirmTransaction({blockhash:w.blockhash,lastValidBlockHeight:w.lastValidBlockHeight,signature:m},b);if(B(),A.value.err)throw new Error(JSON.stringify(A.value.err));B=o({message:d?`Transaction "${d}" confirmed`:"Transaction confirmed",type:"positive",actions:[v]}),e&&e(m)}catch(w){B(),o({message:d?`Transaction "${d}" error`:"Transaction error",caption:w.message,type:"negative",timeout:0,actions:[v,f]}),k&&k(w),console.error(w)}finally{r.value=!1}}return{monitorTransaction:g,sending:r}}function st(){const u=Qe(),o=re(),{publicKey:i}=ce(),r=z(),{monitorTransaction:g}=de(),{notify:c}=J(),e=Q({tokenA:void 0,tokenB:void 0,swapPolicy:void 0,addLiquidityPolicy:void 0,hostFeeNumerator:0,hostFeeDenominator:1e3,tradeFeeNumerator:0,tradeFeeDenominator:1e3,ownerTradeFeeNumerator:0,ownerTradeFeeDenominator:1e3,ownerWithdrawFeeNumerator:0,ownerWithdrawFeeDenominator:1e3,creating:!1,tokenSwap:void 0,poolMint:void 0,poolFeeAccount:void 0,swapTokenA:void 0,swapTokenB:void 0}),k=Q({name:"",symbol:"",metadataUrl:"",isMutable:!0});async function d(){!i.value||!o.value||(e.tokenSwap=ue.generate(),console.log("[create swap] token swap pk = ",e.tokenSwap.publicKey.toBase58()),console.log("[create swap] token swap sk = ",e.tokenSwap.secretKey.toString()))}async function b(){if(!i.value||!o.value||!e.tokenSwap)return;const f=u.swapClient.swapAuthority(e.tokenSwap.publicKey),m=new H;e.creating=!0;try{const y=await Ae(r.connection,m,i.value,i.value,Pe),v=x.findProgramAddressSync([ie.Buffer.from("metadata"),I.PROGRAM_ID.toBuffer(),y.publicKey.toBuffer()],I.PROGRAM_ID)[0],w={name:k.name,symbol:k.symbol,uri:k.metadataUrl,sellerFeeBasisPoints:0,creators:null,collection:null,uses:null},A=I.createCreateMetadataAccountV3Instruction({metadata:v,mint:y.publicKey,mintAuthority:i.value,payer:i.value,updateAuthority:i.value},{createMetadataAccountArgsV3:{data:w,isMutable:k.isMutable,collectionDetails:null}});m.add(A);const E=He(y.publicKey,i.value,0,f);m.add(E);const $=I.createUpdateMetadataAccountV2Instruction({metadata:v,updateAuthority:i.value},{updateMetadataAccountArgsV2:{data:w,updateAuthority:f,primarySaleHappened:!0,isMutable:!0}});m.add($),console.log("[create swap] poolMint = ",y.publicKey.toBase58()),m.instructions.length>0&&await g(j(r.connection,o.value,m.instructions,[y]),{onSuccess:()=>{e.poolMint=y.publicKey,c({type:"positive",message:"Pool mint created successfully."})}})}catch(y){console.error(y),c({type:"negative",message:`${y}`})}finally{e.creating=!1}}async function F(){if(!i.value||!o.value)return c({type:"negative",message:"Connect wallet"});if(!e.tokenSwap)return c({type:"negative",message:"Define tokenSwap"});if(!e.poolMint)return c({type:"negative",message:"Define pool mint"});if(!e.tokenA||!e.tokenB)return c({type:"negative",message:"Select tokens"});const f=u.swapClient.swapAuthority(e.tokenSwap.publicKey),m=new H;e.creating=!0;try{const y=await R(r.connection,m,e.poolMint,i.value),v=await R(r.connection,m,new x(e.tokenA.mint),f,i.value,!0),w=await R(r.connection,m,new x(e.tokenB.mint),f,i.value,!0);console.log("[create swap] poolFeeAccount = ",y.toBase58()),console.log("[create swap] swapTokenA = ",v.toBase58()),console.log("[create swap] swapTokenB = ",w.toBase58()),m.instructions.length>0?await g(j(r.connection,o.value,m.instructions),{commitment:"finalized",onSuccess:()=>{e.poolFeeAccount=y,e.swapTokenA=v,e.swapTokenB=w,c({type:"positive",message:"Pool accounts created successfully."})}}):(e.poolFeeAccount=y,e.swapTokenA=v,e.swapTokenB=w)}catch(y){console.error(y),c({type:"negative",message:`${y}`})}finally{e.creating=!1}}async function D(){if(!(!i.value||!o.value||!e.tokenSwap||!e.poolMint||!e.poolFeeAccount||!e.swapTokenA||!e.swapTokenB)){if(!e.tokenA||!e.tokenB)return c({type:"negative",message:"Select tokens"});if(!e.swapPolicy)return c({type:"negative",message:"Select swap policy"});if(!e.addLiquidityPolicy)return c({type:"negative",message:"Select liquidity policy"});console.log("createTokenSwap: ",{tokenSwap:e.tokenSwap.publicKey.toBase58(),poolMint:e.poolMint.toBase58(),poolFee:e.poolFeeAccount.toBase58(),destination:e.poolFeeAccount.toBase58(),tokenA:e.swapTokenA.toBase58(),tokenB:e.swapTokenB.toBase58(),swapPolicy:e.swapPolicy.pubkey.toBase58(),addLiquidityPolicy:e.addLiquidityPolicy.pubkey.toBase58(),curveType:se.ConstantProduct,curveParameters:[],fees:{tradeFeeNumerator:e.tradeFeeNumerator,tradeFeeDenominator:e.tradeFeeDenominator,ownerTradeFeeNumerator:e.ownerTradeFeeNumerator,ownerTradeFeeDenominator:e.ownerTradeFeeDenominator,ownerWithdrawFeeNumerator:e.ownerWithdrawFeeNumerator,ownerWithdrawFeeDenominator:e.ownerWithdrawFeeDenominator,hostFeeNumerator:e.hostFeeNumerator,hostFeeDenominator:e.hostFeeDenominator}}),e.creating=!0;try{const f=await u.swapClient.createTokenSwap({tokenSwap:e.tokenSwap,poolMint:e.poolMint,poolFee:e.poolFeeAccount,destination:e.poolFeeAccount,tokenA:e.swapTokenA,tokenB:e.swapTokenB,swapPolicy:e.swapPolicy.pubkey,addLiquidityPolicy:e.addLiquidityPolicy.pubkey,curveType:se.ConstantProduct,curveParameters:[],fees:{tradeFeeNumerator:e.tradeFeeNumerator,tradeFeeDenominator:e.tradeFeeDenominator,ownerTradeFeeNumerator:e.ownerTradeFeeNumerator,ownerTradeFeeDenominator:e.ownerTradeFeeDenominator,ownerWithdrawFeeNumerator:e.ownerWithdrawFeeNumerator,ownerWithdrawFeeDenominator:e.ownerWithdrawFeeDenominator,hostFeeNumerator:e.hostFeeNumerator,hostFeeDenominator:e.hostFeeDenominator}});c({type:"positive",message:`Swap Pool created successfully. ${e.tokenSwap?.publicKey.toBase58()}`}),u.init(),console.log("[create swap] tokenSwap result = ",f)}catch(f){console.error(f),console.error(f.logs),c({type:"negative",message:`${f}`})}finally{e.creating=!1}}}function B(){e.hostFeeNumerator=0,e.hostFeeDenominator=1e3,e.tradeFeeNumerator=0,e.tradeFeeDenominator=1e3,e.ownerTradeFeeNumerator=0,e.ownerTradeFeeDenominator=1e3,e.ownerWithdrawFeeNumerator=0,e.ownerWithdrawFeeDenominator=1e3,e.swapPolicy=void 0,e.addLiquidityPolicy=void 0,e.tokenA=void 0,e.tokenB=void 0,k.name="",k.symbol="",k.metadataUrl=""}return{state:e,metadataState:k,reset:B,generateSwapKeypair:d,createPoolMint:b,createPoolAccounts:F,createTokenSwap:D}}const lt={class:"row"},it={class:"row q-mt-md"},rt={class:"q-mt-md"},ct=l("div",null,"Swap policy:",-1),ut={class:"q-mt-md"},dt=l("div",null,"Liqudity policy:",-1),pt={class:"row q-mt-md"},mt={class:"row q-mt-md"},yt={class:"row q-mt-md"},wt={class:"row q-mt-md"},kt={class:"q-mt-lg row"},_t={class:"q-mt-mt"},ft=l("div",{class:"text-subtitle2"}," Token Swap ",-1),vt={style:{"word-break":"break-all"}},gt={key:0},bt={class:"q-mt-sm row"},St={class:"q-mt-xl column"},Tt=l("div",null,"LP token metadata",-1),ht={class:"q-mt-xs row"},Ft={key:0},At={class:"q-mt-sm row"},Pt={class:"q-mt-xl row"},Bt=l("div",{class:"text-warning"}," Top up pool tokenA and tokenB accounts before create pool ",-1),Vt={class:"q-mt-xl row"},Nt=W({__name:"CreateSwapCard",setup(u){const{state:o,createTokenSwap:i,createPoolAccounts:r,generateSwapKeypair:g,createPoolMint:c,metadataState:e}=st(),{handleSearchToken:k,tokens:d}=Be(),b=O(),F=V(()=>b.servicePolicy),D=V(()=>o.tokenA?b.tokenBalance(o.tokenA.mint):0),B=V(()=>o.tokenB?b.tokenBalance(o.tokenB.mint):0);function f($,n){o[$]=n}const m=C(!1),y=C(!1),v=C("");function w(){v.value&&(o.tokenSwap=ue.fromSecretKey(Uint8Array.from(JSON.parse(`[${v.value}]`))))}const A=C("");function E(){A.value&&(o.poolMint=new x(A.value))}return($,n)=>{const X=Ee,Y=nt,U=tt,Z=Ne;return _(),M(G,{class:"swap-cardswap-widget full-width"},{default:p(()=>[s(K,{class:"swap-card__header"},{default:p(()=>[T(" Create Pool ")]),_:1}),s(K,{class:"swap-card__body"},{default:p(()=>[l("div",lt,[s(X,{options:t(d),token:t(o).tokenA,"swap-token":String(t(o).tokenA?.symbol),onHandleSearchToken:t(k),onSetToken:n[0]||(n[0]=a=>f("tokenA",a))},null,8,["options","token","swap-token","onHandleSearchToken"]),s(Y,{class:"q-ml-lg q-mt-xs",balance:t(D),mint:t(o).tokenA?.mint},null,8,["balance","mint"])]),l("div",it,[s(X,{options:t(d),token:t(o).tokenB,"swap-token":String(t(o).tokenB?.symbol),onHandleSearchToken:t(k),onSetToken:n[1]||(n[1]=a=>f("tokenB",a))},null,8,["options","token","swap-token","onHandleSearchToken"]),s(Y,{class:"q-ml-lg q-mt-xs",balance:t(B),mint:t(o).tokenB?.mint},null,8,["balance","mint"])]),l("div",rt,[ct,s(ee,{modelValue:t(o).swapPolicy,"onUpdate:modelValue":n[2]||(n[2]=a=>t(o).swapPolicy=a),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:t(F),dense:"","options-dense":!1,"option-value":"mint","option-label":"name"},{selected:p(()=>[t(o).swapPolicy?(_(),M(U,{key:t(o).swapPolicy.pubkey?.toBase58(),policy:t(o).swapPolicy.pubkey,"policy-data":t(o).swapPolicy.data},null,8,["policy","policy-data"])):q("",!0)]),option:p(a=>[s(te,oe(a.itemProps,{class:"token-select__token"}),{default:p(()=>[(_(),M(U,{key:a.opt.pubkey,policy:a.opt.pubkey,"policy-data":a.opt.data},null,8,["policy","policy-data"]))]),_:2},1040)]),_:1},8,["modelValue","options"])]),l("div",ut,[dt,s(ee,{modelValue:t(o).addLiquidityPolicy,"onUpdate:modelValue":n[3]||(n[3]=a=>t(o).addLiquidityPolicy=a),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:t(F),dense:"","options-dense":!1,"option-value":"mint","option-label":"name"},{selected:p(()=>[t(o).addLiquidityPolicy?(_(),M(U,{key:t(o).addLiquidityPolicy.pubkey?.toBase58(),policy:t(o).addLiquidityPolicy.pubkey,"policy-data":t(o).addLiquidityPolicy.data},null,8,["policy","policy-data"])):q("",!0)]),option:p(a=>[s(te,oe(a.itemProps,{class:"token-select__token"}),{default:p(()=>[(_(),M(U,{key:a.opt.pubkey,policy:a.opt.pubkey,"policy-data":a.opt.data},null,8,["policy","policy-data"]))]),_:2},1040)]),_:1},8,["modelValue","options"])]),l("div",pt,[s(S,{modelValue:t(o).hostFeeNumerator,"onUpdate:modelValue":n[4]||(n[4]=a=>t(o).hostFeeNumerator=a),class:"q-mr-md",label:"Host fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).hostFeeDenominator,"onUpdate:modelValue":n[5]||(n[5]=a=>t(o).hostFeeDenominator=a),label:"Host fee Denominator"},null,8,["modelValue"])]),l("div",mt,[s(S,{modelValue:t(o).tradeFeeNumerator,"onUpdate:modelValue":n[6]||(n[6]=a=>t(o).tradeFeeNumerator=a),class:"q-mr-md",label:"Trade fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).tradeFeeDenominator,"onUpdate:modelValue":n[7]||(n[7]=a=>t(o).tradeFeeDenominator=a),label:"Trade fee Denominator"},null,8,["modelValue"])]),l("div",yt,[s(S,{modelValue:t(o).ownerTradeFeeNumerator,"onUpdate:modelValue":n[8]||(n[8]=a=>t(o).ownerTradeFeeNumerator=a),class:"q-mr-md",label:"Owner trade fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).ownerTradeFeeDenominator,"onUpdate:modelValue":n[9]||(n[9]=a=>t(o).ownerTradeFeeDenominator=a),label:"Owner trade fee Denominator"},null,8,["modelValue"])]),l("div",wt,[s(S,{modelValue:t(o).ownerWithdrawFeeNumerator,"onUpdate:modelValue":n[10]||(n[10]=a=>t(o).ownerWithdrawFeeNumerator=a),class:"q-mr-md",label:"Owner withdraw fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).ownerWithdrawFeeDenominator,"onUpdate:modelValue":n[11]||(n[11]=a=>t(o).ownerWithdrawFeeDenominator=a),label:"Owner withdraw fee Denominator"},null,8,["modelValue"])]),l("div",kt,[s(N,{class:"q-ml-auto",onClick:t(g)},{default:p(()=>[T(" Generate Swap Keypair ")]),_:1},8,["onClick"])]),l("div",_t,[ft,l("div",null,"Public key: "+h(t(o).tokenSwap?.publicKey.toBase58()),1),l("div",vt," Secret key: "+h(t(o).tokenSwap?.secretKey.toString()),1),t(o).tokenSwap?(_(),P("div",gt,[s(Z,{text:t(o).tokenSwap.secretKey.toString()},null,8,["text"]),T(" Copy Token Swap secret key ")])):q("",!0)]),s(ae,{modelValue:t(m),"onUpdate:modelValue":n[13]||(n[13]=a=>L(m)?m.value=a:null),label:"Set token swap from secret key"},{default:p(()=>[s(S,{modelValue:t(v),"onUpdate:modelValue":n[12]||(n[12]=a=>L(v)?v.value=a:null),class:"q-mr-md",label:"Token Swap Secret"},null,8,["modelValue"]),l("div",bt,[s(N,{class:"q-ml-auto",disable:!t(v),onClick:w},{default:p(()=>[T(" Set Swap Keypair ")]),_:1},8,["disable"])])]),_:1},8,["modelValue"]),l("div",St,[Tt,s(S,{modelValue:t(e).name,"onUpdate:modelValue":n[14]||(n[14]=a=>t(e).name=a),class:"q-mr-md",label:"name"},null,8,["modelValue"]),s(S,{modelValue:t(e).symbol,"onUpdate:modelValue":n[15]||(n[15]=a=>t(e).symbol=a),class:"q-mr-md",label:"symbol"},null,8,["modelValue"]),s(S,{modelValue:t(e).metadataUrl,"onUpdate:modelValue":n[16]||(n[16]=a=>t(e).metadataUrl=a),class:"q-mr-md",label:"url"},null,8,["modelValue"]),s(Ve,{modelValue:t(e).isMutable,"onUpdate:modelValue":n[17]||(n[17]=a=>t(e).isMutable=a),class:"q-mr-md q-mt-sm",size:"lg",label:"is Mutable"},null,8,["modelValue"])]),l("div",ht,[s(N,{class:"q-ml-auto",disable:!!t(o).poolMint,loading:t(o).creating,onClick:t(c)},{default:p(()=>[T(" Create Pool Mint ")]),_:1},8,["disable","loading","onClick"])]),l("div",null,"Pool mint: "+h(t(o).poolMint?.toBase58()),1),t(o).poolMint?(_(),P("div",Ft,[s(Z,{text:t(o).poolMint?.toBase58()},null,8,["text"]),T(" Copy Pool Mint public key ")])):q("",!0),s(ae,{modelValue:t(y),"onUpdate:modelValue":n[19]||(n[19]=a=>L(y)?y.value=a:null),label:"Set pool mint manually"},{default:p(()=>[s(S,{modelValue:t(A),"onUpdate:modelValue":n[18]||(n[18]=a=>L(A)?A.value=a:null),class:"q-mr-md",label:"Pool Mint"},null,8,["modelValue"]),l("div",At,[s(N,{class:"q-ml-auto",disable:!t(A),onClick:E},{default:p(()=>[T(" Set Pool Mint ")]),_:1},8,["disable"])])]),_:1},8,["modelValue"]),l("div",Pt,[s(N,{class:"q-ml-auto",loading:t(o).creating,onClick:t(r)},{default:p(()=>[T(" Create Pool token accounts ")]),_:1},8,["loading","onClick"])]),l("div",null,"Pool fee account: "+h(t(o).poolFeeAccount?.toBase58()),1),l("div",null,"Pool token A account: "+h(t(o).swapTokenA?.toBase58()),1),l("div",null,"Pool token B account: "+h(t(o).swapTokenB?.toBase58()),1),Bt,l("div",Vt,[s(N,{class:"q-ml-auto",loading:t(o).creating,onClick:t(i)},{default:p(()=>[T(" Create Pool ")]),_:1},8,["loading","onClick"])])]),_:1})]),_:1})}}});function Mt(){const u=re(),{publicKey:o}=ce(),i=z(),{monitorTransaction:r}=de(),{notify:g}=J(),c=O(),e=Q({amount:0,processing:!1});async function k(){if(!e.amount)return g({type:"negative",message:"Enter SOL amount"});if(!o.value)return g({type:"negative",message:"Connect a wallet"});if(!c.tokenBalance(Me))return g({type:"negative",message:"Insufficient funds"});try{e.processing=!0;const d=new H,b=await qe(ne,o.value);try{await De(i.connection,b)}catch(F){if(F instanceof Ce||F instanceof $e)d.add(Ue(o.value,b,o.value,ne));else throw F}d.add(Ie.transfer({fromPubkey:o.value,toPubkey:b,lamports:Le(e.amount)}),je(b)),await r(j(i.connection,u.value,d.instructions),{onSuccess:()=>{e.processing=!1,e.amount=0,c.getUserTokens(),g({type:"positive",message:"SOL wrapped successfully."})}})}catch(d){g({type:"negative",message:`${d}`})}finally{e.processing=!1}}return{state:e,wrapSol:k}}const qt={class:"swap-form"},Dt={class:"swap-field"},Ct={class:"swap-field__info"},$t={class:"row"},Ut=l("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),It={class:"col row justify-end swap-field__balance q-pr-sm"},Lt={key:0,class:"insufficient-error"},xt={class:"row justify-between",style:{gap:"10px"}},Kt={class:"swap-submit q-mt-md"},Wt=W({__name:"WrapSolCard",setup(u){const{state:o,tokenBalance:i}=O(),{state:r,wrapSol:g}=Mt(),c=V(()=>i(xe)),e=V(()=>c.value===0),k=V(()=>Number(r.amount)>c.value);return(d,b)=>(_(),M(G,{class:"swap-card transfer-card"},{default:p(()=>[s(K,{class:"swap-card__header"},{default:p(()=>[T(" Wrap SOL ")]),_:1}),s(K,{class:"swap-card__body"},{default:p(()=>[l("div",qt,[l("div",Dt,[l("div",Ct,[l("div",$t,[Ut,l("div",It,[t(k)?(_(),P("div",Lt," Insufficient funds ")):q("",!0),T(" Balance: "+h(t(Ke)(t(c))),1)])])]),l("div",xt,[s(S,{modelValue:t(r).amount,"onUpdate:modelValue":b[0]||(b[0]=F=>t(r).amount=F),disable:t(e),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:t(Re)},null,8,["modelValue","disable","onKeypress"])])])]),l("div",Kt,[s(N,{loading:t(r)?.processing,rounded:"",ripple:!1,onClick:t(g)},{default:p(()=>[T(" Wrap ")]),_:1},8,["loading","onClick"])])]),_:1}),s(We,{showing:t(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1}))}}),Ot={},Et={class:"main-block row justify-center"};function Rt(u,o){const i=Wt,r=Nt;return _(),P("div",Et,[s(i,{class:"q-mt-md"}),s(r,{class:"q-mt-lg"})])}const Xt=Oe(Ot,[["render",Rt]]);export{Xt as default}; +import{aN as pe,aO as me,a as ie,aP as ye,aQ as we,aR as ke,V as W,w as O,v as V,o as _,Y as M,Z as p,a3 as t,i as P,a2 as l,a5 as h,ad as _e,au as fe,aS as ve,a4 as q,$ as G,a0 as T,aK as ge,j as s,aT as be,u as z,z as J,aU as Se,G as C,aV as Te,aW as he,aX as Fe,x as re,y as ce,B as Q,ae as ue,aY as H,aZ as Ae,aC as Pe,P as x,a_ as I,a$ as j,b0 as R,W as Be,a1 as K,aA as ee,ax as te,ay as oe,a7 as S,a8 as N,b1 as ae,as as L,at as Ve,aM as Ne,H as Me,I as qe,b2 as ne,J as De,b3 as Ce,b4 as $e,b5 as Ue,b6 as Ie,aB as Le,X as xe,a6 as Ke,a9 as We,_ as Oe}from"./index-3e319056.js";import{_ as Ee,o as Re}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import{u as Qe,k as se}from"./swap-6005a05e.js";import{c as He}from"./setAuthority-d61ee5de.js";import"./associatedTokenAccount-56e3fa33.js";import"./internal-446163cd.js";const le=pe([me("instruction")]);function je(u,o=ke){const i=[{pubkey:u,isSigner:!1,isWritable:!0}],r=ie.Buffer.alloc(le.span);return le.encode({instruction:ye.SyncNative},r),new we({keys:i,programId:o,data:r})}const Ge={key:0,class:"policy-card__policy q-pa-md"},ze={class:"policy-card__policy__info"},Je={class:"policy-card__policy__subtitle"},Xe={class:"policy-card__policy__subtitle"},Ye=l("div",{class:"policy-card__policy__subtitle"}," Rules: ",-1),Ze={class:"q-ml-xs"},et={key:0},tt=W({__name:"SelectPolicyItem",props:{policyData:Object,policy:Object},setup(u){const o=O(),i=V(()=>o.serviceData),r=V(()=>o.serviceLoading);return(g,c)=>(_(),M(G,{class:""},{default:p(()=>[t(r)?q("",!0):(_(),P("div",Ge,[l("div",ze,[l("div",Je," Address: "+h(u.policy?.toBase58()),1),l("div",Xe," Name: "+h(t(i)?.name)+" "+h(u.policyData?.name),1),Ye,l("div",Ze,[(_(!0),P(_e,null,fe(u.policyData?.rules,(e,k)=>(_(),P("div",{key:k},[e.key!=="maxAge"&&e.key!=="expectedDateTo"||e.label!=="0"?(_(),P("span",et,h(t(ve)(e.key,e.label,e.value)),1)):q("",!0)]))),128))])])]))]),_:1}))}}),ot={key:0},at={key:1},nt=W({__name:"CreatePoolTokenData",props:{balance:[String,Number],mint:String},setup(u){return(o,i)=>(_(),P("div",null,[u.mint?(_(),P("div",ot,[l("div",null," balance: "+h(u.balance),1),l("div",null,[T(" mint: "+h(t(ge)(u.mint))+" ",1),s(be,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:p(()=>[T(h(u.mint),1)]),_:1})])])):(_(),P("div",at," Select token "))]))}});function de(){const u=z(),{notify:o}=J(),i=Se(u,"cluster"),r=C(!1);async function g(c,{onSuccess:e,onError:k,idx:d,commitment:b=Te,sendTimeout:F=he,confirmTimeout:D=Fe}={}){d=d??"";let B=o({progress:!0,type:"ongoing",message:d?`Sending transaction "${d}" ...`:"Sending transaction...",timeout:F});const f={label:"Close",color:"white"};r.value=!0;let m="";try{const w=await c;m=String(typeof w=="object"?await w.signature:await c)}catch(w){r.value=!1,B(),String(w?.message).startsWith("User rejected")||o({message:d?`Transaction "${d}" error`:"Transaction error",caption:w?.message,type:"negative",timeout:0,actions:[f]});return}const v={label:"Explore",color:"white",target:"_blank",href:`https://solscan.io/tx/${m}?cluster=${i.value}`,onClick:()=>!1};try{B(),B=o({progress:!0,type:"ongoing",message:d?`Confirming transaction "${d}" ...`:"Confirming transaction...",actions:[v],timeout:D});const w=await u.connection.getLatestBlockhash(),A=await u.connection.confirmTransaction({blockhash:w.blockhash,lastValidBlockHeight:w.lastValidBlockHeight,signature:m},b);if(B(),A.value.err)throw new Error(JSON.stringify(A.value.err));B=o({message:d?`Transaction "${d}" confirmed`:"Transaction confirmed",type:"positive",actions:[v]}),e&&e(m)}catch(w){B(),o({message:d?`Transaction "${d}" error`:"Transaction error",caption:w.message,type:"negative",timeout:0,actions:[v,f]}),k&&k(w),console.error(w)}finally{r.value=!1}}return{monitorTransaction:g,sending:r}}function st(){const u=Qe(),o=re(),{publicKey:i}=ce(),r=z(),{monitorTransaction:g}=de(),{notify:c}=J(),e=Q({tokenA:void 0,tokenB:void 0,swapPolicy:void 0,addLiquidityPolicy:void 0,hostFeeNumerator:0,hostFeeDenominator:1e3,tradeFeeNumerator:0,tradeFeeDenominator:1e3,ownerTradeFeeNumerator:0,ownerTradeFeeDenominator:1e3,ownerWithdrawFeeNumerator:0,ownerWithdrawFeeDenominator:1e3,creating:!1,tokenSwap:void 0,poolMint:void 0,poolFeeAccount:void 0,swapTokenA:void 0,swapTokenB:void 0}),k=Q({name:"",symbol:"",metadataUrl:"",isMutable:!0});async function d(){!i.value||!o.value||(e.tokenSwap=ue.generate(),console.log("[create swap] token swap pk = ",e.tokenSwap.publicKey.toBase58()),console.log("[create swap] token swap sk = ",e.tokenSwap.secretKey.toString()))}async function b(){if(!i.value||!o.value||!e.tokenSwap)return;const f=u.swapClient.swapAuthority(e.tokenSwap.publicKey),m=new H;e.creating=!0;try{const y=await Ae(r.connection,m,i.value,i.value,Pe),v=x.findProgramAddressSync([ie.Buffer.from("metadata"),I.PROGRAM_ID.toBuffer(),y.publicKey.toBuffer()],I.PROGRAM_ID)[0],w={name:k.name,symbol:k.symbol,uri:k.metadataUrl,sellerFeeBasisPoints:0,creators:null,collection:null,uses:null},A=I.createCreateMetadataAccountV3Instruction({metadata:v,mint:y.publicKey,mintAuthority:i.value,payer:i.value,updateAuthority:i.value},{createMetadataAccountArgsV3:{data:w,isMutable:k.isMutable,collectionDetails:null}});m.add(A);const E=He(y.publicKey,i.value,0,f);m.add(E);const $=I.createUpdateMetadataAccountV2Instruction({metadata:v,updateAuthority:i.value},{updateMetadataAccountArgsV2:{data:w,updateAuthority:f,primarySaleHappened:!0,isMutable:!0}});m.add($),console.log("[create swap] poolMint = ",y.publicKey.toBase58()),m.instructions.length>0&&await g(j(r.connection,o.value,m.instructions,[y]),{onSuccess:()=>{e.poolMint=y.publicKey,c({type:"positive",message:"Pool mint created successfully."})}})}catch(y){console.error(y),c({type:"negative",message:`${y}`})}finally{e.creating=!1}}async function F(){if(!i.value||!o.value)return c({type:"negative",message:"Connect wallet"});if(!e.tokenSwap)return c({type:"negative",message:"Define tokenSwap"});if(!e.poolMint)return c({type:"negative",message:"Define pool mint"});if(!e.tokenA||!e.tokenB)return c({type:"negative",message:"Select tokens"});const f=u.swapClient.swapAuthority(e.tokenSwap.publicKey),m=new H;e.creating=!0;try{const y=await R(r.connection,m,e.poolMint,i.value),v=await R(r.connection,m,new x(e.tokenA.mint),f,i.value,!0),w=await R(r.connection,m,new x(e.tokenB.mint),f,i.value,!0);console.log("[create swap] poolFeeAccount = ",y.toBase58()),console.log("[create swap] swapTokenA = ",v.toBase58()),console.log("[create swap] swapTokenB = ",w.toBase58()),m.instructions.length>0?await g(j(r.connection,o.value,m.instructions),{commitment:"finalized",onSuccess:()=>{e.poolFeeAccount=y,e.swapTokenA=v,e.swapTokenB=w,c({type:"positive",message:"Pool accounts created successfully."})}}):(e.poolFeeAccount=y,e.swapTokenA=v,e.swapTokenB=w)}catch(y){console.error(y),c({type:"negative",message:`${y}`})}finally{e.creating=!1}}async function D(){if(!(!i.value||!o.value||!e.tokenSwap||!e.poolMint||!e.poolFeeAccount||!e.swapTokenA||!e.swapTokenB)){if(!e.tokenA||!e.tokenB)return c({type:"negative",message:"Select tokens"});if(!e.swapPolicy)return c({type:"negative",message:"Select swap policy"});if(!e.addLiquidityPolicy)return c({type:"negative",message:"Select liquidity policy"});console.log("createTokenSwap: ",{tokenSwap:e.tokenSwap.publicKey.toBase58(),poolMint:e.poolMint.toBase58(),poolFee:e.poolFeeAccount.toBase58(),destination:e.poolFeeAccount.toBase58(),tokenA:e.swapTokenA.toBase58(),tokenB:e.swapTokenB.toBase58(),swapPolicy:e.swapPolicy.pubkey.toBase58(),addLiquidityPolicy:e.addLiquidityPolicy.pubkey.toBase58(),curveType:se.ConstantProduct,curveParameters:[],fees:{tradeFeeNumerator:e.tradeFeeNumerator,tradeFeeDenominator:e.tradeFeeDenominator,ownerTradeFeeNumerator:e.ownerTradeFeeNumerator,ownerTradeFeeDenominator:e.ownerTradeFeeDenominator,ownerWithdrawFeeNumerator:e.ownerWithdrawFeeNumerator,ownerWithdrawFeeDenominator:e.ownerWithdrawFeeDenominator,hostFeeNumerator:e.hostFeeNumerator,hostFeeDenominator:e.hostFeeDenominator}}),e.creating=!0;try{const f=await u.swapClient.createTokenSwap({tokenSwap:e.tokenSwap,poolMint:e.poolMint,poolFee:e.poolFeeAccount,destination:e.poolFeeAccount,tokenA:e.swapTokenA,tokenB:e.swapTokenB,swapPolicy:e.swapPolicy.pubkey,addLiquidityPolicy:e.addLiquidityPolicy.pubkey,curveType:se.ConstantProduct,curveParameters:[],fees:{tradeFeeNumerator:e.tradeFeeNumerator,tradeFeeDenominator:e.tradeFeeDenominator,ownerTradeFeeNumerator:e.ownerTradeFeeNumerator,ownerTradeFeeDenominator:e.ownerTradeFeeDenominator,ownerWithdrawFeeNumerator:e.ownerWithdrawFeeNumerator,ownerWithdrawFeeDenominator:e.ownerWithdrawFeeDenominator,hostFeeNumerator:e.hostFeeNumerator,hostFeeDenominator:e.hostFeeDenominator}});c({type:"positive",message:`Swap Pool created successfully. ${e.tokenSwap?.publicKey.toBase58()}`}),u.init(),console.log("[create swap] tokenSwap result = ",f)}catch(f){console.error(f),console.error(f.logs),c({type:"negative",message:`${f}`})}finally{e.creating=!1}}}function B(){e.hostFeeNumerator=0,e.hostFeeDenominator=1e3,e.tradeFeeNumerator=0,e.tradeFeeDenominator=1e3,e.ownerTradeFeeNumerator=0,e.ownerTradeFeeDenominator=1e3,e.ownerWithdrawFeeNumerator=0,e.ownerWithdrawFeeDenominator=1e3,e.swapPolicy=void 0,e.addLiquidityPolicy=void 0,e.tokenA=void 0,e.tokenB=void 0,k.name="",k.symbol="",k.metadataUrl=""}return{state:e,metadataState:k,reset:B,generateSwapKeypair:d,createPoolMint:b,createPoolAccounts:F,createTokenSwap:D}}const lt={class:"row"},it={class:"row q-mt-md"},rt={class:"q-mt-md"},ct=l("div",null,"Swap policy:",-1),ut={class:"q-mt-md"},dt=l("div",null,"Liqudity policy:",-1),pt={class:"row q-mt-md"},mt={class:"row q-mt-md"},yt={class:"row q-mt-md"},wt={class:"row q-mt-md"},kt={class:"q-mt-lg row"},_t={class:"q-mt-mt"},ft=l("div",{class:"text-subtitle2"}," Token Swap ",-1),vt={style:{"word-break":"break-all"}},gt={key:0},bt={class:"q-mt-sm row"},St={class:"q-mt-xl column"},Tt=l("div",null,"LP token metadata",-1),ht={class:"q-mt-xs row"},Ft={key:0},At={class:"q-mt-sm row"},Pt={class:"q-mt-xl row"},Bt=l("div",{class:"text-warning"}," Top up pool tokenA and tokenB accounts before create pool ",-1),Vt={class:"q-mt-xl row"},Nt=W({__name:"CreateSwapCard",setup(u){const{state:o,createTokenSwap:i,createPoolAccounts:r,generateSwapKeypair:g,createPoolMint:c,metadataState:e}=st(),{handleSearchToken:k,tokens:d}=Be(),b=O(),F=V(()=>b.servicePolicy),D=V(()=>o.tokenA?b.tokenBalance(o.tokenA.mint):0),B=V(()=>o.tokenB?b.tokenBalance(o.tokenB.mint):0);function f($,n){o[$]=n}const m=C(!1),y=C(!1),v=C("");function w(){v.value&&(o.tokenSwap=ue.fromSecretKey(Uint8Array.from(JSON.parse(`[${v.value}]`))))}const A=C("");function E(){A.value&&(o.poolMint=new x(A.value))}return($,n)=>{const X=Ee,Y=nt,U=tt,Z=Ne;return _(),M(G,{class:"swap-cardswap-widget full-width"},{default:p(()=>[s(K,{class:"swap-card__header"},{default:p(()=>[T(" Create Pool ")]),_:1}),s(K,{class:"swap-card__body"},{default:p(()=>[l("div",lt,[s(X,{options:t(d),token:t(o).tokenA,"swap-token":String(t(o).tokenA?.symbol),onHandleSearchToken:t(k),onSetToken:n[0]||(n[0]=a=>f("tokenA",a))},null,8,["options","token","swap-token","onHandleSearchToken"]),s(Y,{class:"q-ml-lg q-mt-xs",balance:t(D),mint:t(o).tokenA?.mint},null,8,["balance","mint"])]),l("div",it,[s(X,{options:t(d),token:t(o).tokenB,"swap-token":String(t(o).tokenB?.symbol),onHandleSearchToken:t(k),onSetToken:n[1]||(n[1]=a=>f("tokenB",a))},null,8,["options","token","swap-token","onHandleSearchToken"]),s(Y,{class:"q-ml-lg q-mt-xs",balance:t(B),mint:t(o).tokenB?.mint},null,8,["balance","mint"])]),l("div",rt,[ct,s(ee,{modelValue:t(o).swapPolicy,"onUpdate:modelValue":n[2]||(n[2]=a=>t(o).swapPolicy=a),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:t(F),dense:"","options-dense":!1,"option-value":"mint","option-label":"name"},{selected:p(()=>[t(o).swapPolicy?(_(),M(U,{key:t(o).swapPolicy.pubkey?.toBase58(),policy:t(o).swapPolicy.pubkey,"policy-data":t(o).swapPolicy.data},null,8,["policy","policy-data"])):q("",!0)]),option:p(a=>[s(te,oe(a.itemProps,{class:"token-select__token"}),{default:p(()=>[(_(),M(U,{key:a.opt.pubkey,policy:a.opt.pubkey,"policy-data":a.opt.data},null,8,["policy","policy-data"]))]),_:2},1040)]),_:1},8,["modelValue","options"])]),l("div",ut,[dt,s(ee,{modelValue:t(o).addLiquidityPolicy,"onUpdate:modelValue":n[3]||(n[3]=a=>t(o).addLiquidityPolicy=a),"option-disable":"inactive","popup-content-class":"transition-duration",outlined:"",options:t(F),dense:"","options-dense":!1,"option-value":"mint","option-label":"name"},{selected:p(()=>[t(o).addLiquidityPolicy?(_(),M(U,{key:t(o).addLiquidityPolicy.pubkey?.toBase58(),policy:t(o).addLiquidityPolicy.pubkey,"policy-data":t(o).addLiquidityPolicy.data},null,8,["policy","policy-data"])):q("",!0)]),option:p(a=>[s(te,oe(a.itemProps,{class:"token-select__token"}),{default:p(()=>[(_(),M(U,{key:a.opt.pubkey,policy:a.opt.pubkey,"policy-data":a.opt.data},null,8,["policy","policy-data"]))]),_:2},1040)]),_:1},8,["modelValue","options"])]),l("div",pt,[s(S,{modelValue:t(o).hostFeeNumerator,"onUpdate:modelValue":n[4]||(n[4]=a=>t(o).hostFeeNumerator=a),class:"q-mr-md",label:"Host fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).hostFeeDenominator,"onUpdate:modelValue":n[5]||(n[5]=a=>t(o).hostFeeDenominator=a),label:"Host fee Denominator"},null,8,["modelValue"])]),l("div",mt,[s(S,{modelValue:t(o).tradeFeeNumerator,"onUpdate:modelValue":n[6]||(n[6]=a=>t(o).tradeFeeNumerator=a),class:"q-mr-md",label:"Trade fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).tradeFeeDenominator,"onUpdate:modelValue":n[7]||(n[7]=a=>t(o).tradeFeeDenominator=a),label:"Trade fee Denominator"},null,8,["modelValue"])]),l("div",yt,[s(S,{modelValue:t(o).ownerTradeFeeNumerator,"onUpdate:modelValue":n[8]||(n[8]=a=>t(o).ownerTradeFeeNumerator=a),class:"q-mr-md",label:"Owner trade fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).ownerTradeFeeDenominator,"onUpdate:modelValue":n[9]||(n[9]=a=>t(o).ownerTradeFeeDenominator=a),label:"Owner trade fee Denominator"},null,8,["modelValue"])]),l("div",wt,[s(S,{modelValue:t(o).ownerWithdrawFeeNumerator,"onUpdate:modelValue":n[10]||(n[10]=a=>t(o).ownerWithdrawFeeNumerator=a),class:"q-mr-md",label:"Owner withdraw fee Numerator"},null,8,["modelValue"]),s(S,{modelValue:t(o).ownerWithdrawFeeDenominator,"onUpdate:modelValue":n[11]||(n[11]=a=>t(o).ownerWithdrawFeeDenominator=a),label:"Owner withdraw fee Denominator"},null,8,["modelValue"])]),l("div",kt,[s(N,{class:"q-ml-auto",onClick:t(g)},{default:p(()=>[T(" Generate Swap Keypair ")]),_:1},8,["onClick"])]),l("div",_t,[ft,l("div",null,"Public key: "+h(t(o).tokenSwap?.publicKey.toBase58()),1),l("div",vt," Secret key: "+h(t(o).tokenSwap?.secretKey.toString()),1),t(o).tokenSwap?(_(),P("div",gt,[s(Z,{text:t(o).tokenSwap.secretKey.toString()},null,8,["text"]),T(" Copy Token Swap secret key ")])):q("",!0)]),s(ae,{modelValue:t(m),"onUpdate:modelValue":n[13]||(n[13]=a=>L(m)?m.value=a:null),label:"Set token swap from secret key"},{default:p(()=>[s(S,{modelValue:t(v),"onUpdate:modelValue":n[12]||(n[12]=a=>L(v)?v.value=a:null),class:"q-mr-md",label:"Token Swap Secret"},null,8,["modelValue"]),l("div",bt,[s(N,{class:"q-ml-auto",disable:!t(v),onClick:w},{default:p(()=>[T(" Set Swap Keypair ")]),_:1},8,["disable"])])]),_:1},8,["modelValue"]),l("div",St,[Tt,s(S,{modelValue:t(e).name,"onUpdate:modelValue":n[14]||(n[14]=a=>t(e).name=a),class:"q-mr-md",label:"name"},null,8,["modelValue"]),s(S,{modelValue:t(e).symbol,"onUpdate:modelValue":n[15]||(n[15]=a=>t(e).symbol=a),class:"q-mr-md",label:"symbol"},null,8,["modelValue"]),s(S,{modelValue:t(e).metadataUrl,"onUpdate:modelValue":n[16]||(n[16]=a=>t(e).metadataUrl=a),class:"q-mr-md",label:"url"},null,8,["modelValue"]),s(Ve,{modelValue:t(e).isMutable,"onUpdate:modelValue":n[17]||(n[17]=a=>t(e).isMutable=a),class:"q-mr-md q-mt-sm",size:"lg",label:"is Mutable"},null,8,["modelValue"])]),l("div",ht,[s(N,{class:"q-ml-auto",disable:!!t(o).poolMint,loading:t(o).creating,onClick:t(c)},{default:p(()=>[T(" Create Pool Mint ")]),_:1},8,["disable","loading","onClick"])]),l("div",null,"Pool mint: "+h(t(o).poolMint?.toBase58()),1),t(o).poolMint?(_(),P("div",Ft,[s(Z,{text:t(o).poolMint?.toBase58()},null,8,["text"]),T(" Copy Pool Mint public key ")])):q("",!0),s(ae,{modelValue:t(y),"onUpdate:modelValue":n[19]||(n[19]=a=>L(y)?y.value=a:null),label:"Set pool mint manually"},{default:p(()=>[s(S,{modelValue:t(A),"onUpdate:modelValue":n[18]||(n[18]=a=>L(A)?A.value=a:null),class:"q-mr-md",label:"Pool Mint"},null,8,["modelValue"]),l("div",At,[s(N,{class:"q-ml-auto",disable:!t(A),onClick:E},{default:p(()=>[T(" Set Pool Mint ")]),_:1},8,["disable"])])]),_:1},8,["modelValue"]),l("div",Pt,[s(N,{class:"q-ml-auto",loading:t(o).creating,onClick:t(r)},{default:p(()=>[T(" Create Pool token accounts ")]),_:1},8,["loading","onClick"])]),l("div",null,"Pool fee account: "+h(t(o).poolFeeAccount?.toBase58()),1),l("div",null,"Pool token A account: "+h(t(o).swapTokenA?.toBase58()),1),l("div",null,"Pool token B account: "+h(t(o).swapTokenB?.toBase58()),1),Bt,l("div",Vt,[s(N,{class:"q-ml-auto",loading:t(o).creating,onClick:t(i)},{default:p(()=>[T(" Create Pool ")]),_:1},8,["loading","onClick"])])]),_:1})]),_:1})}}});function Mt(){const u=re(),{publicKey:o}=ce(),i=z(),{monitorTransaction:r}=de(),{notify:g}=J(),c=O(),e=Q({amount:0,processing:!1});async function k(){if(!e.amount)return g({type:"negative",message:"Enter SOL amount"});if(!o.value)return g({type:"negative",message:"Connect a wallet"});if(!c.tokenBalance(Me))return g({type:"negative",message:"Insufficient funds"});try{e.processing=!0;const d=new H,b=await qe(ne,o.value);try{await De(i.connection,b)}catch(F){if(F instanceof Ce||F instanceof $e)d.add(Ue(o.value,b,o.value,ne));else throw F}d.add(Ie.transfer({fromPubkey:o.value,toPubkey:b,lamports:Le(e.amount)}),je(b)),await r(j(i.connection,u.value,d.instructions),{onSuccess:()=>{e.processing=!1,e.amount=0,c.getUserTokens(),g({type:"positive",message:"SOL wrapped successfully."})}})}catch(d){g({type:"negative",message:`${d}`})}finally{e.processing=!1}}return{state:e,wrapSol:k}}const qt={class:"swap-form"},Dt={class:"swap-field"},Ct={class:"swap-field__info"},$t={class:"row"},Ut=l("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),It={class:"col row justify-end swap-field__balance q-pr-sm"},Lt={key:0,class:"insufficient-error"},xt={class:"row justify-between",style:{gap:"10px"}},Kt={class:"swap-submit q-mt-md"},Wt=W({__name:"WrapSolCard",setup(u){const{state:o,tokenBalance:i}=O(),{state:r,wrapSol:g}=Mt(),c=V(()=>i(xe)),e=V(()=>c.value===0),k=V(()=>Number(r.amount)>c.value);return(d,b)=>(_(),M(G,{class:"swap-card transfer-card"},{default:p(()=>[s(K,{class:"swap-card__header"},{default:p(()=>[T(" Wrap SOL ")]),_:1}),s(K,{class:"swap-card__body"},{default:p(()=>[l("div",qt,[l("div",Dt,[l("div",Ct,[l("div",$t,[Ut,l("div",It,[t(k)?(_(),P("div",Lt," Insufficient funds ")):q("",!0),T(" Balance: "+h(t(Ke)(t(c))),1)])])]),l("div",xt,[s(S,{modelValue:t(r).amount,"onUpdate:modelValue":b[0]||(b[0]=F=>t(r).amount=F),disable:t(e),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:t(Re)},null,8,["modelValue","disable","onKeypress"])])])]),l("div",Kt,[s(N,{loading:t(r)?.processing,rounded:"",ripple:!1,onClick:t(g)},{default:p(()=>[T(" Wrap ")]),_:1},8,["loading","onClick"])])]),_:1}),s(We,{showing:t(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1}))}}),Ot={},Et={class:"main-block row justify-center"};function Rt(u,o){const i=Wt,r=Nt;return _(),P("div",Et,[s(i,{class:"q-mt-md"}),s(r,{class:"q-mt-lg"})])}const Xt=Oe(Ot,[["render",Rt]]);export{Xt as default}; diff --git a/assets/home-31eeb8c2.js b/assets/home-bd7c8724.js similarity index 71% rename from assets/home-31eeb8c2.js rename to assets/home-bd7c8724.js index 649ffdf..a7a09c8 100644 --- a/assets/home-31eeb8c2.js +++ b/assets/home-bd7c8724.js @@ -1 +1 @@ -import{_ as o,r as t,o as n,i as r,j as c}from"./index-d1afe763.js";const s={},a={class:"container"};function _(i,m){const e=t("router-view");return n(),r("main",a,[c(e)])}const l=o(s,[["render",_]]);export{l as default}; +import{_ as o,r as t,o as n,i as r,j as c}from"./index-3e319056.js";const s={},a={class:"container"};function _(i,m){const e=t("router-view");return n(),r("main",a,[c(e)])}const l=o(s,[["render",_]]);export{l as default}; diff --git a/assets/index-d1afe763.js b/assets/index-3e319056.js similarity index 99% rename from assets/index-d1afe763.js rename to assets/index-3e319056.js index 623f75d..f8c21eb 100644 --- a/assets/index-d1afe763.js +++ b/assets/index-3e319056.js @@ -136,7 +136,7 @@ `,y=b+g.join(b);console.error(h.error.message,y)}throw new Pg("failed to simulate transaction: "+h.error.message,g)}return h.result}async sendTransaction(t,n,r){if("version"in t){if(n&&Array.isArray(n))throw new Error("Invalid arguments");const a=t.serialize();return await this.sendRawTransaction(a,n)}if(n===void 0||!Array.isArray(n))throw new Error("Invalid arguments");const i=n;if(t.nonceInfo)t.sign(...i);else{let a=this._disableBlockhashCaching;for(;;){const s=await this._blockhashWithExpiryBlockHeight(a);if(t.lastValidBlockHeight=s.lastValidBlockHeight,t.recentBlockhash=s.blockhash,t.sign(...i),!t.signature)throw new Error("!signature");const u=t.signature.toString("base64");if(this._blockhashInfo.transactionSignatures.includes(u))a=!0;else{this._blockhashInfo.transactionSignatures.push(u);break}}}const o=t.serialize();return await this.sendRawTransaction(o,r)}async sendRawTransaction(t,n){const r=In(t).toString("base64");return await this.sendEncodedTransaction(r,n)}async sendEncodedTransaction(t,n){const r={encoding:"base64"},i=n&&n.skipPreflight,o=n&&n.preflightCommitment||this.commitment;n&&n.maxRetries!=null&&(r.maxRetries=n.maxRetries),n&&n.minContextSlot!=null&&(r.minContextSlot=n.minContextSlot),i&&(r.skipPreflight=i),o&&(r.preflightCommitment=o);const a=[t,r],s=await this._rpcRequest("sendTransaction",a),u=Ze(s,$Ee);if("error"in u){let l;throw"data"in u.error&&(l=u.error.data.logs),new Pg("failed to send transaction: "+u.error.message,l)}return u.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch{}})()},5e3),this._updateSubscriptions()}_wsOnError(t){this._rpcWebSocketConnected=!1,console.error("ws error:",t.message)}_wsOnClose(t){if(this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),t===1e3){this._updateSubscriptions();return}this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(([n,r])=>{this._setSubscription(n,{...r,state:"pending"})})}_setSubscription(t,n){const r=this._subscriptionsByHash[t]?.state;if(this._subscriptionsByHash[t]=n,r!==n.state){const i=this._subscriptionStateChangeCallbacksByHash[t];i&&i.forEach(o=>{try{o(n.state)}catch{}})}}_onSubscriptionStateChange(t,n){var o;const r=this._subscriptionHashByClientSubscriptionId[t];if(r==null)return()=>{};const i=(o=this._subscriptionStateChangeCallbacksByHash)[r]||(o[r]=new Set);return i.add(n),()=>{i.delete(n),i.size===0&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(Object.keys(this._subscriptionsByHash).length===0){this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(r){r instanceof Error&&console.log(`Error when closing socket connection: ${r.message}`)}},500));return}if(this._rpcWebSocketIdleTimeout!==null&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected){this._rpcWebSocket.connect();return}const t=this._rpcWebSocketGeneration,n=()=>t===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async r=>{const i=this._subscriptionsByHash[r];if(i!==void 0)switch(i.state){case"pending":case"unsubscribed":if(i.callbacks.size===0){delete this._subscriptionsByHash[r],i.state==="unsubscribed"&&delete this._subscriptionCallbacksByServerSubscriptionId[i.serverSubscriptionId],await this._updateSubscriptions();return}await(async()=>{const{args:o,method:a}=i;try{this._setSubscription(r,{...i,state:"subscribing"});const s=await this._rpcWebSocket.call(a,o);this._setSubscription(r,{...i,serverSubscriptionId:s,state:"subscribed"}),this._subscriptionCallbacksByServerSubscriptionId[s]=i.callbacks,await this._updateSubscriptions()}catch(s){if(s instanceof Error&&console.error(`${a} error for argument`,o,s.message),!n())return;this._setSubscription(r,{...i,state:"pending"}),await this._updateSubscriptions()}})();break;case"subscribed":i.callbacks.size===0&&await(async()=>{const{serverSubscriptionId:o,unsubscribeMethod:a}=i;if(this._subscriptionsAutoDisposedByRpc.has(o))this._subscriptionsAutoDisposedByRpc.delete(o);else{this._setSubscription(r,{...i,state:"unsubscribing"}),this._setSubscription(r,{...i,state:"unsubscribing"});try{await this._rpcWebSocket.call(a,[o])}catch(s){if(s instanceof Error&&console.error(`${a} error:`,s.message),!n())return;this._setSubscription(r,{...i,state:"subscribed"}),await this._updateSubscriptions();return}}this._setSubscription(r,{...i,state:"unsubscribed"}),await this._updateSubscriptions()})();break}}))}_handleServerNotification(t,n){const r=this._subscriptionCallbacksByServerSubscriptionId[t];r!==void 0&&r.forEach(i=>{try{i(...n)}catch(o){console.error(o)}})}_wsOnAccountNotification(t){const{result:n,subscription:r}=Ze(t,IEe);this._handleServerNotification(r,[n.value,n.context])}_makeSubscription(t,n){const r=this._nextClientSubscriptionId++,i=A9([t.method,n],!0),o=this._subscriptionsByHash[i];return o===void 0?this._subscriptionsByHash[i]={...t,args:n,callbacks:new Set([t.callback]),state:"pending"}:o.callbacks.add(t.callback),this._subscriptionHashByClientSubscriptionId[r]=i,this._subscriptionDisposeFunctionsByClientSubscriptionId[r]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[r],delete this._subscriptionHashByClientSubscriptionId[r];const a=this._subscriptionsByHash[i];Xn(a!==void 0,`Could not find a \`Subscription\` when tearing down client subscription #${r}`),a.callbacks.delete(t.callback),await this._updateSubscriptions()},this._updateSubscriptions(),r}onAccountChange(t,n,r){const i=this._buildArgs([t.toBase58()],r||this._commitment||"finalized","base64");return this._makeSubscription({callback:n,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},i)}async removeAccountChangeListener(t){await this._unsubscribeClientSubscription(t,"account change")}_wsOnProgramAccountNotification(t){const{result:n,subscription:r}=Ze(t,MEe);this._handleServerNotification(r,[{accountId:n.value.pubkey,accountInfo:n.value.account},n.context])}onProgramAccountChange(t,n,r,i){const o=this._buildArgs([t.toBase58()],r||this._commitment||"finalized","base64",i?{filters:i}:void 0);return this._makeSubscription({callback:n,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},o)}async removeProgramAccountChangeListener(t){await this._unsubscribeClientSubscription(t,"program account change")}onLogs(t,n,r){const i=this._buildArgs([typeof t=="object"?{mentions:[t.toString()]}:t],r||this._commitment||"finalized");return this._makeSubscription({callback:n,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},i)}async removeOnLogsListener(t){await this._unsubscribeClientSubscription(t,"logs")}_wsOnLogsNotification(t){const{result:n,subscription:r}=Ze(t,tMe);this._handleServerNotification(r,[n.value,n.context])}_wsOnSlotNotification(t){const{result:n,subscription:r}=Ze(t,DEe);this._handleServerNotification(r,[n])}onSlotChange(t){return this._makeSubscription({callback:t,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(t){await this._unsubscribeClientSubscription(t,"slot change")}_wsOnSlotUpdatesNotification(t){const{result:n,subscription:r}=Ze(t,LEe);this._handleServerNotification(r,[n])}onSlotUpdate(t){return this._makeSubscription({callback:t,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(t){await this._unsubscribeClientSubscription(t,"slot update")}async _unsubscribeClientSubscription(t,n){const r=this._subscriptionDisposeFunctionsByClientSubscriptionId[t];r?await r():console.warn(`Ignored unsubscribe request because an active subscription with id \`${t}\` for '${n}' events could not be found.`)}_buildArgs(t,n,r,i){const o=n||this._commitment;if(o||r||i){let a={};r&&(a.encoding=r),o&&(a.commitment=o),i&&(a=Object.assign(a,i)),t.push(a)}return t}_buildArgsAtLeastConfirmed(t,n,r,i){const o=n||this._commitment;if(o&&!["confirmed","finalized"].includes(o))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(t,n,r,i)}_wsOnSignatureNotification(t){const{result:n,subscription:r}=Ze(t,kEe);n.value!=="receivedSignature"&&this._subscriptionsAutoDisposedByRpc.add(r),this._handleServerNotification(r,n.value==="receivedSignature"?[{type:"received"},n.context]:[{type:"status",result:n.value},n.context])}onSignature(t,n,r){const i=this._buildArgs([t],r||this._commitment||"finalized"),o=this._makeSubscription({callback:(a,s)=>{if(a.type==="status"){n(a.result,s);try{this.removeSignatureListener(o)}catch{}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},i);return o}onSignatureWithOptions(t,n,r){const{commitment:i,...o}={...r,commitment:r&&r.commitment||this._commitment||"finalized"},a=this._buildArgs([t],i,void 0,o),s=this._makeSubscription({callback:(u,l)=>{n(u,l);try{this.removeSignatureListener(s)}catch{}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},a);return s}async removeSignatureListener(t){await this._unsubscribeClientSubscription(t,"signature result")}_wsOnRootNotification(t){const{result:n,subscription:r}=Ze(t,BEe);this._handleServerNotification(r,[n])}onRootChange(t){return this._makeSubscription({callback:t,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(t){await this._unsubscribeClientSubscription(t,"root change")}}class Wf{constructor(t){this._keypair=void 0,this._keypair=t??m9()}static generate(){return new Wf(m9())}static fromSecretKey(t,n){if(t.byteLength!==64)throw new Error("bad secret key size");const r=t.slice(32,64);if(!n||!n.skipValidation){const i=t.slice(0,32),o=WM(i);for(let a=0;a<32;a++)if(r[a]!==o[a])throw new Error("provided secretKey is invalid")}return new Wf({publicKey:r,secretKey:t})}static fromSeed(t){const n=WM(t),r=new Uint8Array(64);return r.set(t),r.set(n,32),new Wf({publicKey:n,secretKey:r})}get publicKey(){return new _e(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Uu=Object.freeze({CreateLookupTable:{index:0,layout:ot([st("instruction"),Rg("recentSlot"),Et("bumpSeed")])},FreezeLookupTable:{index:1,layout:ot([st("instruction")])},ExtendLookupTable:{index:2,layout:ot([st("instruction"),Rg(),Vn(Tn(),jo(st(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:ot([st("instruction")])},CloseLookupTable:{index:4,layout:ot([st("instruction")])}});class rMe{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const r=st("instruction").decode(t.data);let i;for(const[o,a]of Object.entries(Uu))if(a.index==r){i=o;break}if(!i)throw new Error("Invalid Instruction. Should be a LookupTable Instruction");return i}static decodeCreateLookupTable(t){this.checkProgramId(t.programId),this.checkKeysLength(t.keys,4);const{recentSlot:n}=ir(Uu.CreateLookupTable,t.data);return{authority:t.keys[1].pubkey,payer:t.keys[2].pubkey,recentSlot:Number(n)}}static decodeExtendLookupTable(t){if(this.checkProgramId(t.programId),t.keys.length<2)throw new Error(`invalid instruction; found ${t.keys.length} keys, expected at least 2`);const{addresses:n}=ir(Uu.ExtendLookupTable,t.data);return{lookupTable:t.keys[0].pubkey,authority:t.keys[1].pubkey,payer:t.keys.length>2?t.keys[2].pubkey:void 0,addresses:n.map(r=>new _e(r))}}static decodeCloseLookupTable(t){return this.checkProgramId(t.programId),this.checkKeysLength(t.keys,3),{lookupTable:t.keys[0].pubkey,authority:t.keys[1].pubkey,recipient:t.keys[2].pubkey}}static decodeFreezeLookupTable(t){return this.checkProgramId(t.programId),this.checkKeysLength(t.keys,2),{lookupTable:t.keys[0].pubkey,authority:t.keys[1].pubkey}}static decodeDeactivateLookupTable(t){return this.checkProgramId(t.programId),this.checkKeysLength(t.keys,2),{lookupTable:t.keys[0].pubkey,authority:t.keys[1].pubkey}}static checkProgramId(t){if(!t.equals(mF.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(t,n){if(t.lengtho.toBytes())}),i=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1}];return t.payer&&i.push({pubkey:t.payer,isSigner:!0,isWritable:!0},{pubkey:ai.programId,isSigner:!1,isWritable:!1}),new nr({programId:this.programId,keys:i,data:r})}static deactivateLookupTable(t){const n=Uu.DeactivateLookupTable,r=Jn(n),i=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1}];return new nr({programId:this.programId,keys:i,data:r})}static closeLookupTable(t){const n=Uu.CloseLookupTable,r=Jn(n),i=[{pubkey:t.lookupTable,isSigner:!1,isWritable:!0},{pubkey:t.authority,isSigner:!0,isWritable:!1},{pubkey:t.recipient,isSigner:!1,isWritable:!0}];return new nr({programId:this.programId,keys:i,data:r})}}mF.programId=new _e("AddressLookupTab1e1111111111111111111111111");class iMe{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const r=Et("instruction").decode(t.data);let i;for(const[o,a]of Object.entries(kc))if(a.index==r){i=o;break}if(!i)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return i}static decodeRequestUnits(t){this.checkProgramId(t.programId);const{units:n,additionalFee:r}=ir(kc.RequestUnits,t.data);return{units:n,additionalFee:r}}static decodeRequestHeapFrame(t){this.checkProgramId(t.programId);const{bytes:n}=ir(kc.RequestHeapFrame,t.data);return{bytes:n}}static decodeSetComputeUnitLimit(t){this.checkProgramId(t.programId);const{units:n}=ir(kc.SetComputeUnitLimit,t.data);return{units:n}}static decodeSetComputeUnitPrice(t){this.checkProgramId(t.programId);const{microLamports:n}=ir(kc.SetComputeUnitPrice,t.data);return{microLamports:n}}static checkProgramId(t){if(!t.equals(vF.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const kc=Object.freeze({RequestUnits:{index:0,layout:ot([Et("instruction"),st("units"),st("additionalFee")])},RequestHeapFrame:{index:1,layout:ot([Et("instruction"),st("bytes")])},SetComputeUnitLimit:{index:2,layout:ot([Et("instruction"),st("units")])},SetComputeUnitPrice:{index:3,layout:ot([Et("instruction"),Rg("microLamports")])}});class vF{constructor(){}static requestUnits(t){const n=kc.RequestUnits,r=Jn(n,t);return new nr({keys:[],programId:this.programId,data:r})}static requestHeapFrame(t){const n=kc.RequestHeapFrame,r=Jn(n,t);return new nr({keys:[],programId:this.programId,data:r})}static setComputeUnitLimit(t){const n=kc.SetComputeUnitLimit,r=Jn(n,t);return new nr({keys:[],programId:this.programId,data:r})}static setComputeUnitPrice(t){const n=kc.SetComputeUnitPrice,r=Jn(n,{microLamports:BigInt(t.microLamports)});return new nr({keys:[],programId:this.programId,data:r})}}vF.programId=new _e("ComputeBudget111111111111111111111111111111");const D9=64,C9=32,L9=64,k9=ot([Et("numSignatures"),Et("padding"),qr("signatureOffset"),qr("signatureInstructionIndex"),qr("publicKeyOffset"),qr("publicKeyInstructionIndex"),qr("messageDataOffset"),qr("messageDataSize"),qr("messageInstructionIndex")]);class V4{constructor(){}static createInstructionWithPublicKey(t){const{publicKey:n,message:r,signature:i,instructionIndex:o}=t;Xn(n.length===C9,`Public Key must be ${C9} bytes but received ${n.length} bytes`),Xn(i.length===L9,`Signature must be ${L9} bytes but received ${i.length} bytes`);const a=k9.span,s=a+n.length,u=s+i.length,l=1,c=Be.Buffer.alloc(u+r.length),d=o??65535;return k9.encode({numSignatures:l,padding:0,signatureOffset:s,signatureInstructionIndex:d,publicKeyOffset:a,publicKeyInstructionIndex:d,messageDataOffset:u,messageDataSize:r.length,messageInstructionIndex:d},c),c.fill(n,a),c.fill(i,s),c.fill(r,u),new nr({keys:[],programId:V4.programId,data:c})}static createInstructionWithPrivateKey(t){const{privateKey:n,message:r,instructionIndex:i}=t;Xn(n.length===D9,`Private key must be ${D9} bytes but received ${n.length} bytes`);try{const o=Wf.fromSecretKey(n),a=o.publicKey.toBytes(),s=lF(r,o.secretKey);return this.createInstructionWithPublicKey({publicKey:a,message:r,signature:s,instructionIndex:i})}catch(o){throw new Error(`Error creating instruction; ${o}`)}}}V4.programId=new _e("Ed25519SigVerify111111111111111111111111111");const oMe=(e,t)=>{const n=Hh.sign(e,t);return[n.toCompactRawBytes(),n.recovery]};Hh.utils.isValidPrivateKey;const aMe=Hh.getPublicKey,B9=32,j8=20,T9=64,sMe=11,G8=ot([Et("numSignatures"),qr("signatureOffset"),Et("signatureInstructionIndex"),qr("ethAddressOffset"),Et("ethAddressInstructionIndex"),qr("messageDataOffset"),qr("messageDataSize"),Et("messageInstructionIndex"),Ht(20,"ethAddress"),Ht(64,"signature"),Et("recoveryId")]);class fg{constructor(){}static publicKeyToEthAddress(t){Xn(t.length===T9,`Public key must be ${T9} bytes but received ${t.length} bytes`);try{return Be.Buffer.from(qM(In(t))).slice(-j8)}catch(n){throw new Error(`Error constructing Ethereum address: ${n}`)}}static createInstructionWithPublicKey(t){const{publicKey:n,message:r,signature:i,recoveryId:o,instructionIndex:a}=t;return fg.createInstructionWithEthAddress({ethAddress:fg.publicKeyToEthAddress(n),message:r,signature:i,recoveryId:o,instructionIndex:a})}static createInstructionWithEthAddress(t){const{ethAddress:n,message:r,signature:i,recoveryId:o,instructionIndex:a=0}=t;let s;typeof n=="string"?n.startsWith("0x")?s=Be.Buffer.from(n.substr(2),"hex"):s=Be.Buffer.from(n,"hex"):s=n,Xn(s.length===j8,`Address must be ${j8} bytes but received ${s.length} bytes`);const u=1+sMe,l=u,c=u+s.length,d=c+i.length+1,f=1,h=Be.Buffer.alloc(G8.span+r.length);return G8.encode({numSignatures:f,signatureOffset:c,signatureInstructionIndex:a,ethAddressOffset:l,ethAddressInstructionIndex:a,messageDataOffset:d,messageDataSize:r.length,messageInstructionIndex:a,signature:In(i),ethAddress:In(s),recoveryId:o},h),h.fill(In(r),G8.span),new nr({keys:[],programId:fg.programId,data:h})}static createInstructionWithPrivateKey(t){const{privateKey:n,message:r,instructionIndex:i}=t;Xn(n.length===B9,`Private key must be ${B9} bytes but received ${n.length} bytes`);try{const o=In(n),a=aMe(o,!1).slice(1),s=Be.Buffer.from(qM(In(r))),[u,l]=oMe(s,o);return this.createInstructionWithPublicKey({publicKey:a,message:r,signature:u,recoveryId:l,instructionIndex:i})}catch(o){throw new Error(`Error creating instruction; ${o}`)}}}fg.programId=new _e("KeccakSecp256k11111111111111111111111111111");var I$;const E$=new _e("StakeConfig11111111111111111111111111111111");class M${constructor(t,n){this.staker=void 0,this.withdrawer=void 0,this.staker=t,this.withdrawer=n}}class Xb{constructor(t,n,r){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=n,this.custodian=r}}I$=Xb;Xb.default=new I$(0,0,_e.default);class cMe{constructor(){}static decodeInstructionType(t){this.checkProgramId(t.programId);const r=st("instruction").decode(t.data);let i;for(const[o,a]of Object.entries(Hi))if(a.index==r){i=o;break}if(!i)throw new Error("Instruction type incorrect; not a StakeInstruction");return i}static decodeInitialize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{authorized:n,lockup:r}=ir(Hi.Initialize,t.data);return{stakePubkey:t.keys[0].pubkey,authorized:new M$(new _e(n.staker),new _e(n.withdrawer)),lockup:new Xb(r.unixTimestamp,r.epoch,new _e(r.custodian))}}static decodeDelegate(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,6),ir(Hi.Delegate,t.data),{stakePubkey:t.keys[0].pubkey,votePubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[5].pubkey}}static decodeAuthorize(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{newAuthorized:n,stakeAuthorizationType:r}=ir(Hi.Authorize,t.data),i={stakePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey,newAuthorizedPubkey:new _e(n),stakeAuthorizationType:{index:r}};return t.keys.length>3&&(i.custodianPubkey=t.keys[3].pubkey),i}static decodeAuthorizeWithSeed(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,2);const{newAuthorized:n,stakeAuthorizationType:r,authoritySeed:i,authorityOwner:o}=ir(Hi.AuthorizeWithSeed,t.data),a={stakePubkey:t.keys[0].pubkey,authorityBase:t.keys[1].pubkey,authoritySeed:i,authorityOwner:new _e(o),newAuthorizedPubkey:new _e(n),stakeAuthorizationType:{index:r}};return t.keys.length>3&&(a.custodianPubkey=t.keys[3].pubkey),a}static decodeSplit(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3);const{lamports:n}=ir(Hi.Split,t.data);return{stakePubkey:t.keys[0].pubkey,splitStakePubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[2].pubkey,lamports:n}}static decodeMerge(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3),ir(Hi.Merge,t.data),{stakePubkey:t.keys[0].pubkey,sourceStakePubKey:t.keys[1].pubkey,authorizedPubkey:t.keys[4].pubkey}}static decodeWithdraw(t){this.checkProgramId(t.programId),this.checkKeyLength(t.keys,5);const{lamports:n}=ir(Hi.Withdraw,t.data),r={stakePubkey:t.keys[0].pubkey,toPubkey:t.keys[1].pubkey,authorizedPubkey:t.keys[4].pubkey,lamports:n};return t.keys.length>5&&(r.custodianPubkey=t.keys[5].pubkey),r}static decodeDeactivate(t){return this.checkProgramId(t.programId),this.checkKeyLength(t.keys,3),ir(Hi.Deactivate,t.data),{stakePubkey:t.keys[0].pubkey,authorizedPubkey:t.keys[2].pubkey}}static checkProgramId(t){if(!t.equals(W4.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(t,n){if(t.lengthn-r)throw new Error("Withdraw will leave vote account with insuffcient funds.");return kp.withdraw(t)}}kp.programId=new _e("Vote111111111111111111111111111111111111111");kp.space=3731;const D$=new _e("Va1idator1nfo111111111111111111111111111111"),fMe=Re({name:We(),website:gt(We()),details:gt(We()),keybaseUsername:gt(We())});class wF{constructor(t,n){this.key=void 0,this.info=void 0,this.key=t,this.info=n}static fromConfigData(t){let n=[...t];if(_o(n)!==2)return null;const i=[];for(let o=0;o<2;o++){const a=new _e(n.slice(0,Oa));n=n.slice(Oa);const s=n.slice(0,1)[0]===1;n=n.slice(1),i.push({publicKey:a,isSigner:s})}if(i[0].publicKey.equals(D$)&&i[1].isSigner){const o=xf().decode(Be.Buffer.from(n)),a=JSON.parse(o);return _O(a,fMe),new wF(i[1].publicKey,a)}return null}}const hMe=new _e("Vote111111111111111111111111111111111111111"),gMe=ot([Tn("nodePubkey"),Tn("authorizedWithdrawer"),Et("commission"),Kn(),Vn(ot([Kn("slot"),st("confirmationCount")]),jo(st(),-8),"votes"),Et("rootSlotValid"),Kn("rootSlot"),Kn(),Vn(ot([Kn("epoch"),Tn("authorizedVoter")]),jo(st(),-8),"authorizedVoters"),ot([Vn(ot([Tn("authorizedPubkey"),Kn("epochOfLastAuthorizedSwitch"),Kn("targetEpoch")]),32,"buf"),Kn("idx"),Et("isEmpty")],"priorVoters"),Kn(),Vn(ot([Kn("epoch"),Kn("credits"),Kn("prevCredits")]),jo(st(),-8),"epochCredits"),ot([Kn("slot"),Kn("timestamp")],"lastTimestamp")]);class AF{constructor(t){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=t.nodePubkey,this.authorizedWithdrawer=t.authorizedWithdrawer,this.commission=t.commission,this.rootSlot=t.rootSlot,this.votes=t.votes,this.authorizedVoters=t.authorizedVoters,this.priorVoters=t.priorVoters,this.epochCredits=t.epochCredits,this.lastTimestamp=t.lastTimestamp}static fromAccountData(t){const r=gMe.decode(In(t),4);let i=r.rootSlot;return r.rootSlotValid||(i=null),new AF({nodePubkey:new _e(r.nodePubkey),authorizedWithdrawer:new _e(r.authorizedWithdrawer),commission:r.commission,votes:r.votes,rootSlot:i,authorizedVoters:r.authorizedVoters.map(pMe),priorVoters:yMe(r.priorVoters),epochCredits:r.epochCredits,lastTimestamp:r.lastTimestamp})}}function pMe({authorizedVoter:e,epoch:t}){return{epoch:t,authorizedVoter:new _e(e)}}function x9({authorizedPubkey:e,epochOfLastAuthorizedSwitch:t,targetEpoch:n}){return{authorizedPubkey:new _e(e),epochOfLastAuthorizedSwitch:t,targetEpoch:n}}function yMe({buf:e,idx:t,isEmpty:n}){return n?[]:[...e.slice(t+1).map(x9),...e.slice(0,t).map(x9)]}const N9={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function bMe(e,t){const n=t===!1?"http":"https";if(!e)return N9[n].devnet;const r=N9[n][e];if(!r)throw new Error(`Unknown ${n} cluster: ${e}`);return r}async function mMe(e,t,n,r){let i,o;n&&Object.prototype.hasOwnProperty.call(n,"lastValidBlockHeight")||n&&Object.prototype.hasOwnProperty.call(n,"nonceValue")?(i=n,o=r):o=n;const a=o&&{skipPreflight:o.skipPreflight,preflightCommitment:o.preflightCommitment||o.commitment,minContextSlot:o.minContextSlot},s=await e.sendRawTransaction(t,a),u=o&&o.commitment,c=(await(i?e.confirmTransaction(i,u):e.confirmTransaction(s,u))).value;if(c.err)throw new Error(`Raw transaction ${s} failed (${JSON.stringify(c)})`);return s}const Z4=1e9,vMe=Object.freeze(Object.defineProperty({__proto__:null,Account:cIe,AddressLookupTableAccount:BT,AddressLookupTableInstruction:rMe,AddressLookupTableProgram:mF,Authorized:M$,BLOCKHASH_CACHE_TIMEOUT_MS:d$,BPF_LOADER_DEPRECATED_PROGRAM_ID:uIe,BPF_LOADER_PROGRAM_ID:LIe,BpfLoader:kIe,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:kc,ComputeBudgetInstruction:iMe,ComputeBudgetProgram:vF,Connection:A$,Ed25519Program:V4,Enum:aIe,EpochSchedule:u$,FeeCalculatorLayout:s$,Keypair:Wf,LAMPORTS_PER_SOL:Z4,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:Uu,Loader:uh,Lockup:Xb,MAX_SEED_LENGTH:i$,Message:uc,MessageAccountKeys:V1,MessageV0:sh,NONCE_ACCOUNT_LENGTH:kT,NonceAccount:q4,PACKET_DATA_SIZE:ud,PUBLIC_KEY_LENGTH:Oa,PublicKey:_e,SIGNATURE_LENGTH_IN_BYTES:ah,SOLANA_SCHEMA:b1,STAKE_CONFIG_ID:E$,STAKE_INSTRUCTION_LAYOUTS:Hi,SYSTEM_INSTRUCTION_LAYOUTS:Lr,SYSVAR_CLOCK_PUBKEY:Us,SYSVAR_EPOCH_SCHEDULE_PUBKEY:vIe,SYSVAR_INSTRUCTIONS_PUBKEY:wIe,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:CE,SYSVAR_RENT_PUBKEY:ch,SYSVAR_REWARDS_PUBKEY:AIe,SYSVAR_SLOT_HASHES_PUBKEY:IIe,SYSVAR_SLOT_HISTORY_PUBKEY:EIe,SYSVAR_STAKE_HISTORY_PUBKEY:LE,Secp256k1Program:fg,SendTransactionError:Pg,SolanaJSONRPCError:Ft,SolanaJSONRPCErrorCode:FIe,StakeAuthorizationLayout:uMe,StakeInstruction:cMe,StakeProgram:W4,Struct:dF,SystemInstruction:DIe,SystemProgram:ai,Transaction:xn,TransactionExpiredBlockheightExceededError:fF,TransactionExpiredNonceInvalidError:G0,TransactionExpiredTimeoutError:hF,TransactionInstruction:nr,TransactionMessage:gF,TransactionStatus:Cu,VALIDATOR_INFO_KEY:D$,VERSION_PREFIX_MASK:H4,VOTE_PROGRAM_ID:hMe,ValidatorInfo:wF,VersionedMessage:Q4,VersionedTransaction:Ug,VoteAccount:AF,VoteAuthorizationLayout:dMe,VoteInit:S$,VoteInstruction:lMe,VoteProgram:kp,clusterApiUrl:bMe,sendAndConfirmRawTransaction:mMe,sendAndConfirmTransaction:LT},Symbol.toStringTag,{value:"Module"}));var IF={exports:{}};const wMe=/[\p{Lu}]/u,AMe=/[\p{Ll}]/u,O9=/^[\p{Lu}](?![\p{Lu}])/gu,C$=/([\p{Alpha}\p{N}_]|$)/u,L$=/[_.\- ]+/,IMe=new RegExp("^"+L$.source),F9=new RegExp(L$.source+C$.source,"gu"),U9=new RegExp("\\d+"+C$.source,"gu"),EMe=(e,t,n)=>{let r=!1,i=!1,o=!1;for(let a=0;a(O9.lastIndex=0,e.replace(O9,n=>t(n))),SMe=(e,t)=>(F9.lastIndex=0,U9.lastIndex=0,e.replace(F9,(n,r)=>t(r)).replace(U9,n=>t(n))),k$=(e,t)=>{if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(o=>o.trim()).filter(o=>o.length).join("-"):e=e.trim(),e.length===0)return"";const n=t.locale===!1?o=>o.toLowerCase():o=>o.toLocaleLowerCase(t.locale),r=t.locale===!1?o=>o.toUpperCase():o=>o.toLocaleUpperCase(t.locale);return e.length===1?t.pascalCase?r(e):n(e):(e!==n(e)&&(e=EMe(e,n,r)),e=e.replace(IMe,""),t.preserveConsecutiveUppercase?e=MMe(e,n):e=n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),SMe(e,r))};IF.exports=k$;IF.exports.default=k$;var DMe=IF.exports;const Hr=Pa(DMe);var un={},St={};let gr=class{constructor(t,n){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=n}makeDestinationObject(){return{}}decode(t,n){throw new Error("Layout is abstract")}encode(t,n,r){throw new Error("Layout is abstract")}getSpan(t,n){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){const n=Object.create(this.constructor.prototype);return Object.assign(n,this),n.property=t,n}fromArray(t){}};St.Layout=gr;function EF(e,t){return t.property?e+"["+t.property+"]":e}St.nameWithProperty=EF;function CMe(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(e.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof gr))throw new TypeError("layout must be a Layout");if(t.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value:function(n,r){return t.encode(this,n,r)},writable:!0}),Object.defineProperty(e,"decode",{value:function(n,r){return t.decode(n,r)},writable:!0})}St.bindConstructorLayout=CMe;let ta=class extends gr{isCount(){throw new Error("ExternalLayout is abstract")}};class B$ extends ta{constructor(t,n){if(t===void 0&&(t=1),!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,n),this.elementSpan=t}isCount(){return!0}decode(t,n){n===void 0&&(n=0);const r=t.length-n;return Math.floor(r/this.elementSpan)}encode(t,n,r){return 0}}let MF=class extends ta{constructor(t,n,r){if(!(t instanceof gr))throw new TypeError("layout must be a Layout");if(n===void 0)n=0;else if(!Number.isInteger(n))throw new TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=n}isCount(){return this.layout instanceof su||this.layout instanceof ml}decode(t,n){return n===void 0&&(n=0),this.layout.decode(t,n+this.offset)}encode(t,n,r){return r===void 0&&(r=0),this.layout.encode(t,n,r+this.offset)}},su=class extends gr{constructor(t,n){if(super(t,n),6a+i.encode(s,n,r+a),0);return this.count instanceof ta&&this.count.encode(t.length,n,r),o}}let U$=class extends gr{constructor(t,n,r){if(!(Array.isArray(t)&&t.reduce((o,a)=>o&&a instanceof gr,!0)))throw new TypeError("fields must be array of Layout instances");typeof n=="boolean"&&r===void 0&&(r=n,n=void 0);for(const o of t)if(0>o.span&&o.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let i=-1;try{i=t.reduce((o,a)=>o+a.getSpan(),0)}catch{}super(i,n),this.fields=t,this.decodePrefixes=!!r}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);let r=0;try{r=this.fields.reduce((i,o)=>{const a=o.getSpan(t,n);return n+=a,i+a},0)}catch{throw new RangeError("indeterminate span")}return r}decode(t,n){n===void 0&&(n=0);const r=this.makeDestinationObject();for(const i of this.fields)if(i.property!==void 0&&(r[i.property]=i.decode(t,n)),n+=i.getSpan(t,n),this.decodePrefixes&&t.length===n)break;return r}encode(t,n,r){r===void 0&&(r=0);const i=r;let o=0,a=0;for(const s of this.fields){let u=s.span;if(a=0u&&(u=s.getSpan(n,r)))}o=r,r+=u}return o+a-i}fromArray(t){const n=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0r.span?n=-1:0<=n&&(n+=r.span)}}},SF=class{constructor(t){this.property=t}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}},XM=class extends SF{constructor(t,n){if(!(t instanceof ta&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(n||t.property||"variant"),this.layout=t}decode(t,n){return this.layout.decode(t,n)}encode(t,n,r){return this.layout.encode(t,n,r)}},DF=class extends gr{constructor(t,n,r){const i=t instanceof su||t instanceof ml;if(i)t=new XM(new MF(t));else if(t instanceof ta&&t.isCount())t=new XM(t);else if(!(t instanceof SF))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(n===void 0&&(n=null),!(n===null||n instanceof gr))throw new TypeError("defaultLayout must be null or a Layout");if(n!==null){if(0>n.span)throw new Error("defaultLayout must have constant span");n.property===void 0&&(n=n.replicate("content"))}let o=-1;n&&(o=n.span,0<=o&&i&&(o+=t.layout.span)),super(o,r),this.discriminator=t,this.usesPrefixDiscriminator=i,this.defaultLayout=n,this.registry={};let a=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(s){return a(s)},this.configGetSourceVariant=function(s){a=s.bind(this)}}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);const r=this.getVariant(t,n);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(t,n)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const n=this.registry[t[this.discriminator.property]];if(n&&(!n.layout||t.hasOwnProperty(n.property)))return n}else for(const n in this.registry){const r=this.registry[n];if(t.hasOwnProperty(r.property))return r}throw new Error("unable to infer src variant")}decode(t,n){n===void 0&&(n=0);let r;const i=this.discriminator,o=i.decode(t,n);let a=this.registry[o];if(a===void 0){let s=0;a=this.defaultLayout,this.usesPrefixDiscriminator&&(s=i.layout.span),r=this.makeDestinationObject(),r[i.property]=o,r[a.property]=this.defaultLayout.decode(t,n+s)}else r=a.decode(t,n);return r}encode(t,n,r){r===void 0&&(r=0);const i=this.getSourceVariant(t);if(i===void 0){const o=this.discriminator,a=this.defaultLayout;let s=0;return this.usesPrefixDiscriminator&&(s=o.layout.span),o.encode(t[o.property],n,r),s+a.encode(t[a.property],n,r+s)}return i.encode(t,n,r)}addVariant(t,n,r){const i=new R$(this,t,n,r);return this.registry[t]=i,i}getVariant(t,n){let r=t;return Be.Buffer.isBuffer(t)&&(n===void 0&&(n=0),r=this.discriminator.decode(t,n)),this.registry[r]}},R$=class extends gr{constructor(t,n,r,i){if(!(t instanceof DF))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&i===void 0&&(i=r,r=null),r){if(!(r instanceof gr))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=r.span&&r.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof i!="string")throw new TypeError("variant must have a String property")}let o=t.span;0>t.span&&(o=r?r.span:0,0<=o&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span)),super(o,i),this.union=t,this.variant=n,this.layout=r||null}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(t,n+r)}decode(t,n){const r=this.makeDestinationObject();if(n===void 0&&(n=0),this!==this.union.getVariant(t,n))throw new Error("variant mismatch");let i=0;return this.union.usesPrefixDiscriminator&&(i=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,n+i):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,n,r){r===void 0&&(r=0);let i=0;if(this.union.usesPrefixDiscriminator&&(i=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,n,r);let o=i;if(this.layout&&(this.layout.encode(t[this.property],n,r+i),o+=this.layout.getSpan(n,r+i),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};function O0(e){return 0>e&&(e+=4294967296),e}class CF extends gr{constructor(t,n,r){if(!(t instanceof su||t instanceof ml))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof n=="string"&&r===void 0&&(r=n,n=void 0),4=n)throw new TypeError("bits must be positive integer");const i=8*t.span,o=t.fields.reduce((a,s)=>a+s.bits,0);if(n+o>i)throw new Error("bits too long for span remainder ("+(i-o)+" of "+i+" remain)");this.container=t,this.bits=n,this.valueMask=(1<>>this.start}encode(t){if(!Number.isInteger(t)||t!==O0(t&this.valueMask))throw new TypeError(EF("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const n=this.container._packedGetValue(),r=O0(t<r&&(r=this.length.decode(t,n)),r}decode(t,n){n===void 0&&(n=0);let r=this.span;return 0>r&&(r=this.length.decode(t,n)),t.slice(n,n+r)}encode(t,n,r){let i=this.length;if(this.length instanceof ta&&(i=t.length),!(Be.Buffer.isBuffer(t)&&i===t.length))throw new TypeError(EF("Blob.encode",this)+" requires (length "+i+") Buffer as src");if(r+i>n.length)throw new RangeError("encoding overruns Buffer");return n.write(t.toString("hex"),r,i,"hex"),this.length instanceof ta&&this.length.encode(i,n,r),i}};class j$ extends gr{constructor(t){super(-1,t)}getSpan(t,n){if(!Be.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");n===void 0&&(n=0);let r=n;for(;rn.length)throw new RangeError("encoding overruns Buffer");return i.copy(n,r),n[r+o]=0,o+1}}class G$ extends gr{constructor(t,n){if(typeof t=="string"&&n===void 0&&(n=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,n),this.maxSpan=t}getSpan(t,n){if(!Be.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");return n===void 0&&(n=0),t.length-n}decode(t,n,r){n===void 0&&(n=0);let i=this.getSpan(t,n);if(0<=this.maxSpan&&this.maxSpann.length)throw new RangeError("encoding overruns Buffer");return i.copy(n,r),o}}class H$ extends gr{constructor(t,n){super(0,n),this.value=t}decode(t,n,r){return this.value}encode(t,n,r){return 0}}St.ExternalLayout=ta;St.GreedyCount=B$;St.OffsetLayout=MF;St.UInt=su;St.UIntBE=ml;St.Int=Jh;St.IntBE=Bp;St.Float=T$;St.FloatBE=x$;St.Double=N$;St.DoubleBE=O$;St.Sequence=F$;St.Structure=U$;St.UnionDiscriminator=SF;St.UnionLayoutDiscriminator=XM;St.Union=DF;St.VariantLayout=R$;St.BitStructure=CF;St.BitField=m1;St.Boolean=P$;St.Blob=z$;St.CString=j$;St.UTF8=G$;St.Constant=H$;St.greedy=(e,t)=>new B$(e,t);St.offset=(e,t,n)=>new MF(e,t,n);St.u8=e=>new su(1,e);St.u16=e=>new su(2,e);St.u24=e=>new su(3,e);St.u32=e=>new su(4,e);St.u40=e=>new su(5,e);St.u48=e=>new su(6,e);St.nu64=e=>new LMe(e);St.u16be=e=>new ml(2,e);St.u24be=e=>new ml(3,e);St.u32be=e=>new ml(4,e);St.u40be=e=>new ml(5,e);St.u48be=e=>new ml(6,e);St.nu64be=e=>new kMe(e);St.s8=e=>new Jh(1,e);St.s16=e=>new Jh(2,e);St.s24=e=>new Jh(3,e);St.s32=e=>new Jh(4,e);St.s40=e=>new Jh(5,e);St.s48=e=>new Jh(6,e);St.ns64=e=>new BMe(e);St.s16be=e=>new Bp(2,e);St.s24be=e=>new Bp(3,e);St.s32be=e=>new Bp(4,e);St.s40be=e=>new Bp(5,e);St.s48be=e=>new Bp(6,e);St.ns64be=e=>new TMe(e);St.f32=e=>new T$(e);St.f32be=e=>new x$(e);St.f64=e=>new N$(e);St.f64be=e=>new O$(e);St.struct=(e,t,n)=>new U$(e,t,n);St.bits=(e,t,n)=>new CF(e,t,n);St.seq=(e,t,n)=>new F$(e,t,n);St.union=(e,t,n)=>new DF(e,t,n);St.unionLayoutDiscriminator=(e,t)=>new XM(e,t);St.blob=(e,t)=>new z$(e,t);St.cstr=e=>new j$(e);St.utf8=(e,t)=>new G$(e,t);St.const=(e,t)=>new H$(e,t);const it=Ob(vMe);(function(e){var t=V&&V.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.map=e.array=e.rustEnum=e.str=e.vecU8=e.tagged=e.vec=e.bool=e.option=e.publicKey=e.i256=e.u256=e.i128=e.u128=e.i64=e.u64=e.struct=e.f64=e.f32=e.i32=e.u32=e.i16=e.u16=e.i8=e.u8=void 0;const n=St,r=it,i=t(Pd);var o=St;Object.defineProperty(e,"u8",{enumerable:!0,get:function(){return o.u8}}),Object.defineProperty(e,"i8",{enumerable:!0,get:function(){return o.s8}}),Object.defineProperty(e,"u16",{enumerable:!0,get:function(){return o.u16}}),Object.defineProperty(e,"i16",{enumerable:!0,get:function(){return o.s16}}),Object.defineProperty(e,"u32",{enumerable:!0,get:function(){return o.u32}}),Object.defineProperty(e,"i32",{enumerable:!0,get:function(){return o.s32}}),Object.defineProperty(e,"f32",{enumerable:!0,get:function(){return o.f32}}),Object.defineProperty(e,"f64",{enumerable:!0,get:function(){return o.f64}}),Object.defineProperty(e,"struct",{enumerable:!0,get:function(){return o.struct}});class a extends n.Layout{constructor(v,p,A){super(v,A),this.blob=(0,n.blob)(v),this.signed=p}decode(v,p=0){const A=new i.default(this.blob.decode(v,p),10,"le");return this.signed?A.fromTwos(this.span*8).clone():A}encode(v,p,A=0){return this.signed&&(v=v.toTwos(this.span*8)),this.blob.encode(v.toArrayLike(Be.Buffer,"le",this.span),p,A)}}function s(D){return new a(8,!1,D)}e.u64=s;function u(D){return new a(8,!0,D)}e.i64=u;function l(D){return new a(16,!1,D)}e.u128=l;function c(D){return new a(16,!0,D)}e.i128=c;function d(D){return new a(32,!1,D)}e.u256=d;function f(D){return new a(32,!0,D)}e.i256=f;class h extends n.Layout{constructor(v,p,A,B){super(v.span,B),this.layout=v,this.decoder=p,this.encoder=A}decode(v,p){return this.decoder(this.layout.decode(v,p))}encode(v,p,A){return this.layout.encode(this.encoder(v),p,A)}getSpan(v,p){return this.layout.getSpan(v,p)}}function g(D){return new h((0,n.blob)(32),v=>new r.PublicKey(v),v=>v.toBuffer(),D)}e.publicKey=g;class b extends n.Layout{constructor(v,p){super(-1,p),this.layout=v,this.discriminator=(0,n.u8)()}encode(v,p,A=0){return v==null?this.discriminator.encode(0,p,A):(this.discriminator.encode(1,p,A),this.layout.encode(v,p,A+1)+1)}decode(v,p=0){const A=this.discriminator.decode(v,p);if(A===0)return null;if(A===1)return this.layout.decode(v,p+1);throw new Error("Invalid option "+this.property)}getSpan(v,p=0){const A=this.discriminator.decode(v,p);if(A===0)return 1;if(A===1)return this.layout.getSpan(v,p+1)+1;throw new Error("Invalid option "+this.property)}}function y(D,v){return new b(D,v)}e.option=y;function M(D){return new h((0,n.u8)(),E,k,D)}e.bool=M;function E(D){if(D===0)return!1;if(D===1)return!0;throw new Error("Invalid bool: "+D)}function k(D){return D?1:0}function C(D,v){const p=(0,n.u32)("length"),A=(0,n.struct)([p,(0,n.seq)(D,(0,n.offset)(p,-p.span),"values")]);return new h(A,({values:B})=>B,B=>({values:B}),v)}e.vec=C;function H(D,v,p){const A=(0,n.struct)([s("tag"),v.replicate("data")]);function B({tag:O,data:j}){if(!O.eq(D))throw new Error("Invalid tag, expected: "+D.toString("hex")+", got: "+O.toString("hex"));return j}return new h(A,B,O=>({tag:D,data:O}),p)}e.tagged=H;function R(D){const v=(0,n.u32)("length"),p=(0,n.struct)([v,(0,n.blob)((0,n.offset)(v,-v.span),"data")]);return new h(p,({data:A})=>A,A=>({data:A}),D)}e.vecU8=R;function m(D){return new h(R(),v=>v.toString("utf-8"),v=>Be.Buffer.from(v,"utf-8"),D)}e.str=m;function w(D,v,p){const A=(0,n.union)(p??(0,n.u8)(),v);return D.forEach((B,O)=>A.addVariant(O,B,B.property)),A}e.rustEnum=w;function G(D,v,p){const A=(0,n.struct)([(0,n.seq)(D,v,"values")]);return new h(A,({values:B})=>B,B=>({values:B}),p)}e.array=G;class Y extends n.Layout{constructor(v,p,A){super(v.span+p.span,A),this.keyLayout=v,this.valueLayout=p}decode(v,p){p=p||0;const A=this.keyLayout.decode(v,p),B=this.valueLayout.decode(v,p+this.keyLayout.getSpan(v,p));return[A,B]}encode(v,p,A){A=A||0;const B=this.keyLayout.encode(v[0],p,A),O=this.valueLayout.encode(v[1],p,A+B);return B+O}getSpan(v,p){return this.keyLayout.getSpan(v,p)+this.valueLayout.getSpan(v,p)}}function K(D,v,p){const A=(0,n.u32)("length"),B=(0,n.struct)([A,(0,n.seq)(new Y(D,v),(0,n.offset)(A,-A.span),"values")]);return new h(B,({values:O})=>new Map(O),O=>({values:Array.from(O.entries())}),p)}e.map=K})(un);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const xMe=4,R9=0,P9=1,NMe=2;function Tp(e){let t=e.length;for(;--t>=0;)e[t]=0}const OMe=0,K$=1,FMe=2,UMe=3,RMe=258,LF=29,_b=256,Z1=_b+1+LF,hg=30,kF=19,Q$=2*Z1+1,Nf=15,H8=16,PMe=7,BF=256,q$=16,Y$=17,J$=18,FT=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),kE=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),zMe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),V$=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jMe=512,ku=new Array((Z1+2)*2);Tp(ku);const v1=new Array(hg*2);Tp(v1);const X1=new Array(jMe);Tp(X1);const _1=new Array(RMe-UMe+1);Tp(_1);const TF=new Array(LF);Tp(TF);const _M=new Array(hg);Tp(_M);function K8(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let W$,Z$,X$;function Q8(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const _$=e=>e<256?X1[e]:X1[256+(e>>>7)],$1=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},ra=(e,t,n)=>{e.bi_valid>H8-n?(e.bi_buf|=t<>H8-e.bi_valid,e.bi_valid+=n-H8):(e.bi_buf|=t<{ra(e,n[t*2],n[t*2+1])},$$=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},GMe=e=>{e.bi_valid===16?($1(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},HMe=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,d,f,h,g,b=0;for(f=0;f<=Nf;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lu&&(f=u,b++),n[c*2+1]=f,!(c>r)&&(e.bl_count[f]++,h=0,c>=s&&(h=a[c-s]),g=n[c*2],e.opt_len+=g*(f+h),o&&(e.static_len+=g*(i[c*2+1]+h)));if(b!==0){do{for(f=u-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[u]--,b-=2}while(b>0);for(f=u;f!==0;f--)for(c=e.bl_count[f];c!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),c--)}},eee=(e,t,n)=>{const r=new Array(Nf+1);let i=0,o,a;for(o=1;o<=Nf;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=$$(r[s]++,s))}},KMe=()=>{let e,t,n,r,i;const o=new Array(Nf+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?$1(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},z9=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Bc(e,i,t):(a=_1[i],Bc(e,a+_b+1,t),s=FT[a],s!==0&&(i-=TF[a],ra(e,i,s)),r--,a=_$(r),Bc(e,a,n),s=kE[a],s!==0&&(r-=_M[a],ra(e,r,s)));while(o{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,u=-1,l;for(e.heap_len=0,e.heap_max=Q$,a=0;a>1;a>=1;a--)q8(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q8(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,q8(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],HMe(e,t),eee(n,u,e.bl_count)},G9=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s{let r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s{let t;for(G9(e,e.dyn_ltree,e.l_desc.max_code),G9(e,e.dyn_dtree,e.d_desc.max_code),UT(e,e.bl_desc),t=kF-1;t>=3&&e.bl_tree[V$[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},qMe=(e,t,n,r)=>{let i;for(ra(e,t-257,5),ra(e,n-1,5),ra(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return R9;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return P9;for(n=32;n<_b;n++)if(e.dyn_ltree[n*2]!==0)return P9;return R9};let K9=!1;const JMe=e=>{K9||(KMe(),K9=!0),e.l_desc=new Q8(e.dyn_ltree,W$),e.d_desc=new Q8(e.dyn_dtree,Z$),e.bl_desc=new Q8(e.bl_tree,X$),e.bi_buf=0,e.bi_valid=0,tee(e)},ree=(e,t,n,r)=>{ra(e,(OMe<<1)+(r?1:0),3),nee(e),$1(e,n),$1(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},VMe=e=>{ra(e,K$<<1,3),Bc(e,BF,ku),GMe(e)},WMe=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===NMe&&(e.strm.data_type=YMe(e)),UT(e,e.l_desc),UT(e,e.d_desc),a=QMe(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?ree(e,t,n,r):e.strategy===xMe||o===i?(ra(e,(K$<<1)+(r?1:0),3),j9(e,ku,v1)):(ra(e,(FMe<<1)+(r?1:0),3),qMe(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),j9(e,e.dyn_ltree,e.dyn_dtree)),tee(e),r&&nee(e)},ZMe=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(_1[n]+_b+1)*2]++,e.dyn_dtree[_$(t)*2]++),e.sym_next===e.sym_end);var XMe=JMe,_Me=ree,$Me=WMe,e3e=ZMe,t3e=VMe,n3e={_tr_init:XMe,_tr_stored_block:_Me,_tr_flush_block:$Me,_tr_tally:e3e,_tr_align:t3e};const r3e=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};var eb=r3e;const i3e=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},o3e=new Uint32Array(i3e()),a3e=(e,t,n,r)=>{const i=o3e,o=r+n;e^=-1;for(let a=r;a>>8^i[(e^t[a])&255];return e^-1};var ji=a3e,zg={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},$b={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:s3e,_tr_stored_block:RT,_tr_flush_block:c3e,_tr_tally:ld,_tr_align:u3e}=n3e,{Z_NO_FLUSH:dd,Z_PARTIAL_FLUSH:l3e,Z_FULL_FLUSH:d3e,Z_FINISH:is,Z_BLOCK:Q9,Z_OK:oo,Z_STREAM_END:q9,Z_STREAM_ERROR:Pc,Z_DATA_ERROR:f3e,Z_BUF_ERROR:Y8,Z_DEFAULT_COMPRESSION:h3e,Z_FILTERED:g3e,Z_HUFFMAN_ONLY:fI,Z_RLE:p3e,Z_FIXED:y3e,Z_DEFAULT_STRATEGY:b3e,Z_UNKNOWN:m3e,Z_DEFLATED:$4}=$b,v3e=9,w3e=15,A3e=8,I3e=29,E3e=256,PT=E3e+1+I3e,M3e=30,S3e=19,D3e=2*PT+1,C3e=15,zn=3,td=258,zc=td+zn+1,L3e=32,jg=42,xF=57,zT=69,jT=73,GT=91,HT=103,Of=113,Zy=666,zo=1,xp=2,lh=3,Np=4,k3e=3,Ff=(e,t)=>(e.msg=zg[t],t),Y9=e=>e*2-(e>4?9:0),Xl=e=>{let t=e.length;for(;--t>=0;)e[t]=0},B3e=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let T3e=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Fa=(e,t)=>{c3e(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ba(e.strm)},er=(e,t)=>{e.pending_buf[e.pending++]=t},hy=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},KT=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=eb(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ji(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},iee=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const u=e.strstart>e.w_size-zc?e.strstart-(e.w_size-zc):0,l=e.window,c=e.w_mask,d=e.prev,f=e.strstart+td;let h=l[r+a-1],g=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==g||l[i+a-1]!==h||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&ra){if(e.match_start=t,a=o,o>=s)break;h=l[r+a-1],g=l[r+a]}}while((t=d[t&c])>u&&--n!==0);return a<=e.lookahead?a:e.lookahead},Gg=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-zc)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),B3e(e),r+=t),e.strm.avail_in===0)break;if(n=KT(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=zn)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=fd(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=fd(e,e.ins_h,e.window[i+zn-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,ba(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(KT(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(a===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(KT(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===is)&&t!==dd&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===is&&e.strm.avail_in===0&&r===i?1:0,RT(e,e.block_start,r,a),e.block_start+=r,ba(e.strm)),a?lh:zo)},J8=(e,t)=>{let n,r;for(;;){if(e.lookahead=zn&&(e.ins_h=fd(e,e.ins_h,e.window[e.strstart+zn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-zc&&(e.match_length=iee(e,n)),e.match_length>=zn)if(r=ld(e,e.strstart-e.match_start,e.match_length-zn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=zn){e.match_length--;do e.strstart++,e.ins_h=fd(e,e.ins_h,e.window[e.strstart+zn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=fd(e,e.ins_h,e.window[e.strstart+1]);else r=ld(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Fa(e,!1),e.strm.avail_out===0))return zo}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=zn&&(e.ins_h=fd(e,e.ins_h,e.window[e.strstart+zn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=zn-1,n!==0&&e.prev_length4096)&&(e.match_length=zn-1)),e.prev_length>=zn&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-zn,r=ld(e,e.strstart-1-e.prev_match,e.prev_length-zn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=fd(e,e.ins_h,e.window[e.strstart+zn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=zn-1,e.strstart++,r&&(Fa(e,!1),e.strm.avail_out===0))return zo}else if(e.match_available){if(r=ld(e,0,e.window[e.strstart-1]),r&&Fa(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return zo}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ld(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=td){if(Gg(e),e.lookahead<=td&&t===dd)return zo;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=zn&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+td;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=zn?(n=ld(e,1,e.match_length-zn),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ld(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Fa(e,!1),e.strm.avail_out===0))return zo}return e.insert=0,t===is?(Fa(e,!0),e.strm.avail_out===0?lh:Np):e.sym_next&&(Fa(e,!1),e.strm.avail_out===0)?zo:xp},N3e=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Gg(e),e.lookahead===0)){if(t===dd)return zo;break}if(e.match_length=0,n=ld(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Fa(e,!1),e.strm.avail_out===0))return zo}return e.insert=0,t===is?(Fa(e,!0),e.strm.avail_out===0?lh:Np):e.sym_next&&(Fa(e,!1),e.strm.avail_out===0)?zo:xp};function mc(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Xy=[new mc(0,0,0,0,oee),new mc(4,4,8,4,J8),new mc(4,5,16,8,J8),new mc(4,6,32,32,J8),new mc(4,4,16,16,b0),new mc(8,16,32,32,b0),new mc(8,16,128,128,b0),new mc(8,32,128,256,b0),new mc(32,128,258,1024,b0),new mc(32,258,258,4096,b0)],O3e=e=>{e.window_size=2*e.w_size,Xl(e.head),e.max_lazy_match=Xy[e.level].max_lazy,e.good_match=Xy[e.level].good_length,e.nice_match=Xy[e.level].nice_length,e.max_chain_length=Xy[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=zn-1,e.match_available=0,e.ins_h=0};function F3e(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$4,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(D3e*2),this.dyn_dtree=new Uint16Array((2*M3e+1)*2),this.bl_tree=new Uint16Array((2*S3e+1)*2),Xl(this.dyn_ltree),Xl(this.dyn_dtree),Xl(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(C3e+1),this.heap=new Uint16Array(2*PT+1),Xl(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*PT+1),Xl(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const em=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==jg&&t.status!==xF&&t.status!==zT&&t.status!==jT&&t.status!==GT&&t.status!==HT&&t.status!==Of&&t.status!==Zy?1:0},aee=e=>{if(em(e))return Ff(e,Pc);e.total_in=e.total_out=0,e.data_type=m3e;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?xF:t.wrap?jg:Of,e.adler=t.wrap===2?0:1,t.last_flush=-2,s3e(t),oo},see=e=>{const t=aee(e);return t===oo&&O3e(e.state),t},U3e=(e,t)=>em(e)||e.state.wrap!==2?Pc:(e.state.gzhead=t,oo),cee=(e,t,n,r,i,o)=>{if(!e)return Pc;let a=1;if(t===h3e&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>v3e||n!==$4||r<8||r>15||t<0||t>9||o<0||o>y3e||r===8&&a!==1)return Ff(e,Pc);r===8&&(r=9);const s=new F3e;return e.state=s,s.strm=e,s.status=jg,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<cee(e,t,$4,w3e,A3e,b3e),P3e=(e,t)=>{if(em(e)||t>Q9||t<0)return e?Ff(e,Pc):Pc;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Zy&&t!==is)return Ff(e,e.avail_out===0?Y8:Pc);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(ba(e),e.avail_out===0)return n.last_flush=-1,oo}else if(e.avail_in===0&&Y9(t)<=Y9(r)&&t!==is)return Ff(e,Y8);if(n.status===Zy&&e.avail_in!==0)return Ff(e,Y8);if(n.status===jg&&n.wrap===0&&(n.status=Of),n.status===jg){let i=$4+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=fI||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=L3e),i+=31-i%31,hy(n,i),n.strstart!==0&&(hy(n,e.adler>>>16),hy(n,e.adler&65535)),e.adler=1,n.status=Of,ba(e),n.pending!==0)return n.last_flush=-1,oo}if(n.status===xF){if(e.adler=0,er(n,31),er(n,139),er(n,8),n.gzhead)er(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),er(n,n.gzhead.time&255),er(n,n.gzhead.time>>8&255),er(n,n.gzhead.time>>16&255),er(n,n.gzhead.time>>24&255),er(n,n.level===9?2:n.strategy>=fI||n.level<2?4:0),er(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(er(n,n.gzhead.extra.length&255),er(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ji(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=zT;else if(er(n,0),er(n,0),er(n,0),er(n,0),er(n,0),er(n,n.level===9?2:n.strategy>=fI||n.level<2?4:0),er(n,k3e),n.status=Of,ba(e),n.pending!==0)return n.last_flush=-1,oo}if(n.status===zT){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,ba(e),n.pending!==0)return n.last_flush=-1,oo;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=jT}if(n.status===jT){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i)),ba(e),n.pending!==0)return n.last_flush=-1,oo;i=0}n.gzindexi&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=GT}if(n.status===GT){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i)),ba(e),n.pending!==0)return n.last_flush=-1,oo;i=0}n.gzindexi&&(e.adler=ji(e.adler,n.pending_buf,n.pending-i,i))}n.status=HT}if(n.status===HT){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(ba(e),n.pending!==0))return n.last_flush=-1,oo;er(n,e.adler&255),er(n,e.adler>>8&255),e.adler=0}if(n.status=Of,ba(e),n.pending!==0)return n.last_flush=-1,oo}if(e.avail_in!==0||n.lookahead!==0||t!==dd&&n.status!==Zy){let i=n.level===0?oee(n,t):n.strategy===fI?N3e(n,t):n.strategy===p3e?x3e(n,t):Xy[n.level].func(n,t);if((i===lh||i===Np)&&(n.status=Zy),i===zo||i===lh)return e.avail_out===0&&(n.last_flush=-1),oo;if(i===xp&&(t===l3e?u3e(n):t!==Q9&&(RT(n,0,0,!1),t===d3e&&(Xl(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),ba(e),e.avail_out===0))return n.last_flush=-1,oo}return t!==is?oo:n.wrap<=0?q9:(n.wrap===2?(er(n,e.adler&255),er(n,e.adler>>8&255),er(n,e.adler>>16&255),er(n,e.adler>>24&255),er(n,e.total_in&255),er(n,e.total_in>>8&255),er(n,e.total_in>>16&255),er(n,e.total_in>>24&255)):(hy(n,e.adler>>>16),hy(n,e.adler&65535)),ba(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?oo:q9)},z3e=e=>{if(em(e))return Pc;const t=e.state.status;return e.state=null,t===Of?Ff(e,f3e):oo},j3e=(e,t)=>{let n=t.length;if(em(e))return Pc;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==jg||r.lookahead)return Pc;if(i===1&&(e.adler=eb(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Xl(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Gg(r);r.lookahead>=zn;){let u=r.strstart,l=r.lookahead-(zn-1);do r.ins_h=fd(r,r.ins_h,r.window[u+zn-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=zn-1,Gg(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=zn-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,oo};var G3e=R3e,H3e=cee,K3e=see,Q3e=aee,q3e=U3e,Y3e=P3e,J3e=z3e,V3e=j3e,W3e="pako deflate (from Nodeca project)",w1={deflateInit:G3e,deflateInit2:H3e,deflateReset:K3e,deflateResetKeep:Q3e,deflateSetHeader:q3e,deflate:Y3e,deflateEnd:J3e,deflateSetDictionary:V3e,deflateInfo:W3e};const Z3e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var X3e=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)Z3e(n,r)&&(e[r]=n[r])}}return e},_3e=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;tb[254]=tb[254]=1;var $3e=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const e4e=(e,t)=>{if(t<65534&&e.subarray&&uee)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return e4e(o,i)},n4e=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+tb[e[n]]>t?n:t},nb={string2buf:$3e,buf2string:t4e,utf8border:n4e};function r4e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var lee=r4e;const dee=Object.prototype.toString,{Z_NO_FLUSH:i4e,Z_SYNC_FLUSH:o4e,Z_FULL_FLUSH:a4e,Z_FINISH:s4e,Z_OK:$M,Z_STREAM_END:c4e,Z_DEFAULT_COMPRESSION:u4e,Z_DEFAULT_STRATEGY:l4e,Z_DEFLATED:d4e}=$b;function NF(e){this.options=eS.assign({level:u4e,method:d4e,chunkSize:16384,windowBits:15,memLevel:8,strategy:l4e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lee,this.strm.avail_out=0;let n=w1.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==$M)throw new Error(zg[n]);if(t.header&&w1.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=nb.string2buf(t.dictionary):dee.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=w1.deflateSetDictionary(this.strm,r),n!==$M)throw new Error(zg[n]);this._dict_set=!0}}NF.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?s4e:i4e,typeof e=="string"?n.input=nb.string2buf(e):dee.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===o4e||o===a4e)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=w1.deflate(n,o),i===c4e)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=w1.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===$M;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};NF.prototype.onData=function(e){this.chunks.push(e)};NF.prototype.onEnd=function(e){e===$M&&(this.result=eS.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const hI=16209,f4e=16191;var h4e=function(t,n){let r,i,o,a,s,u,l,c,d,f,h,g,b,y,M,E,k,C,H,R,m,w,G,Y;const K=t.state;r=t.next_in,G=t.input,i=r+(t.avail_in-5),o=t.next_out,Y=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),u=K.dmax,l=K.wsize,c=K.whave,d=K.wnext,f=K.window,h=K.hold,g=K.bits,b=K.lencode,y=K.distcode,M=(1<>>24,h>>>=C,g-=C,C=k>>>16&255,C===0)Y[o++]=k&65535;else if(C&16){H=k&65535,C&=15,C&&(g>>=C,g-=C),g<15&&(h+=G[r++]<>>24,h>>>=C,g-=C,C=k>>>16&255,C&16){if(R=k&65535,C&=15,gu){t.msg="invalid distance too far back",K.mode=hI;break e}if(h>>>=C,g-=C,C=o-a,R>C){if(C=R-C,C>c&&K.sane){t.msg="invalid distance too far back",K.mode=hI;break e}if(m=0,w=f,d===0){if(m+=l-C,C2;)Y[o++]=w[m++],Y[o++]=w[m++],Y[o++]=w[m++],H-=3;H&&(Y[o++]=w[m++],H>1&&(Y[o++]=w[m++]))}else{m=o-R;do Y[o++]=Y[m++],Y[o++]=Y[m++],Y[o++]=Y[m++],H-=3;while(H>2);H&&(Y[o++]=Y[m++],H>1&&(Y[o++]=Y[m++]))}}else if(C&64){t.msg="invalid distance code",K.mode=hI;break e}else{k=y[(k&65535)+(h&(1<>3,r-=H,g-=H<<3,h&=(1<{const u=s.bits;let l=0,c=0,d=0,f=0,h=0,g=0,b=0,y=0,M=0,E=0,k,C,H,R,m,w=null,G;const Y=new Uint16Array(m0+1),K=new Uint16Array(m0+1);let D=null,v,p,A;for(l=0;l<=m0;l++)Y[l]=0;for(c=0;c=1&&Y[f]===0;f--);if(h>f&&(h=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d0&&(e===W9||f!==1))return-1;for(K[1]=0,l=1;lJ9||e===Z9&&M>V9)return 1;for(;;){v=l-b,a[c]+1=G?(p=D[a[c]-G],A=w[a[c]-G]):(p=32+64,A=0),k=1<>b)+C]=v<<24|p<<16|A|0;while(C!==0);for(k=1<>=1;if(k!==0?(E&=k-1,E+=k):E=0,c++,--Y[l]===0){if(l===f)break;l=t[n+a[c]]}if(l>h&&(E&R)!==H){for(b===0&&(b=h),m+=d,g=l-b,y=1<J9||e===Z9&&M>V9)return 1;H=E&R,i[H]=h<<24|g<<16|m-o|0}}return E!==0&&(i[m+E]=l-b<<24|64<<16|0),s.bits=h,0};var A1=m4e;const v4e=0,fee=1,hee=2,{Z_FINISH:X9,Z_BLOCK:w4e,Z_TREES:gI,Z_OK:dh,Z_STREAM_END:A4e,Z_NEED_DICT:I4e,Z_STREAM_ERROR:ws,Z_DATA_ERROR:gee,Z_MEM_ERROR:pee,Z_BUF_ERROR:E4e,Z_DEFLATED:_9}=$b,tS=16180,$9=16181,e7=16182,t7=16183,n7=16184,r7=16185,i7=16186,o7=16187,a7=16188,s7=16189,e3=16190,pu=16191,W8=16192,c7=16193,Z8=16194,u7=16195,l7=16196,d7=16197,f7=16198,pI=16199,yI=16200,h7=16201,g7=16202,p7=16203,y7=16204,b7=16205,X8=16206,m7=16207,v7=16208,Gr=16209,yee=16210,bee=16211,M4e=852,S4e=592,D4e=15,C4e=D4e,w7=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function L4e(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Vh=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.modebee?1:0},mee=e=>{if(Vh(e))return ws;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=tS,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(M4e),t.distcode=t.distdyn=new Int32Array(S4e),t.sane=1,t.back=-1,dh},vee=e=>{if(Vh(e))return ws;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,mee(e)},wee=(e,t)=>{let n;if(Vh(e))return ws;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?ws:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,vee(e))},Aee=(e,t)=>{if(!e)return ws;const n=new L4e;e.state=n,n.strm=e,n.window=null,n.mode=tS;const r=wee(e,t);return r!==dh&&(e.state=null),r},k4e=e=>Aee(e,C4e);let A7=!0,_8,$8;const B4e=e=>{if(A7){_8=new Int32Array(512),$8=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(A1(fee,e.lens,0,288,_8,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;A1(hee,e.lens,0,32,$8,0,e.work,{bits:5}),A7=!1}e.lencode=_8,e.lenbits=9,e.distcode=$8,e.distbits=5},Iee=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,a,s,u,l,c,d,f,h,g,b,y=0,M,E,k,C,H,R,m,w;const G=new Uint8Array(4);let Y,K;const D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vh(e)||!e.output||!e.input&&e.avail_in!==0)return ws;n=e.state,n.mode===pu&&(n.mode=W8),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,d=s,f=u,w=dh;e:for(;;)switch(n.mode){case tS:if(n.wrap===0){n.mode=W8;break}for(;c<16;){if(s===0)break e;s--,l+=r[o++]<>>8&255,n.check=ji(n.check,G,2,0),l=0,c=0,n.mode=$9;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Gr;break}if((l&15)!==_9){e.msg="unknown compression method",n.mode=Gr;break}if(l>>>=4,c-=4,m=(l&15)+8,n.wbits===0&&(n.wbits=m),m>15||m>n.wbits){e.msg="invalid window size",n.mode=Gr;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(G[0]=l&255,G[1]=l>>>8&255,n.check=ji(n.check,G,2,0)),l=0,c=0,n.mode=e7;case e7:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<>>8&255,G[2]=l>>>16&255,G[3]=l>>>24&255,n.check=ji(n.check,G,4,0)),l=0,c=0,n.mode=t7;case t7:for(;c<16;){if(s===0)break e;s--,l+=r[o++]<>8),n.flags&512&&n.wrap&4&&(G[0]=l&255,G[1]=l>>>8&255,n.check=ji(n.check,G,2,0)),l=0,c=0,n.mode=n7;case n7:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[o++]<>>8&255,n.check=ji(n.check,G,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=r7;case r7:if(n.flags&1024&&(h=n.length,h>s&&(h=s),h&&(n.head&&(m=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),m)),n.flags&512&&n.wrap&4&&(n.check=ji(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=i7;case i7:if(n.flags&2048){if(s===0)break e;h=0;do m=r[o+h++],n.head&&m&&n.length<65536&&(n.head.name+=String.fromCharCode(m));while(m&&h>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=pu;break;case s7:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<>>=c&7,c-=c&7,n.mode=X8;break}for(;c<3;){if(s===0)break e;s--,l+=r[o++]<>>=1,c-=1,l&3){case 0:n.mode=c7;break;case 1:if(B4e(n),n.mode=pI,t===gI){l>>>=2,c-=2;break e}break;case 2:n.mode=l7;break;case 3:e.msg="invalid block type",n.mode=Gr}l>>>=2,c-=2;break;case c7:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=Gr;break}if(n.length=l&65535,l=0,c=0,n.mode=Z8,t===gI)break e;case Z8:n.mode=u7;case u7:if(h=n.length,h){if(h>s&&(h=s),h>u&&(h=u),h===0)break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h;break}n.mode=pu;break;case l7:for(;c<14;){if(s===0)break e;s--,l+=r[o++]<>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Gr;break}n.have=0,n.mode=d7;case d7:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Y={bits:n.lenbits},w=A1(v4e,n.lens,0,19,n.lencode,0,n.work,Y),n.lenbits=Y.bits,w){e.msg="invalid code lengths set",n.mode=Gr;break}n.have=0,n.mode=f7;case f7:for(;n.have>>24,E=y>>>16&255,k=y&65535,!(M<=c);){if(s===0)break e;s--,l+=r[o++]<>>=M,c-=M,n.lens[n.have++]=k;else{if(k===16){for(K=M+2;c>>=M,c-=M,n.have===0){e.msg="invalid bit length repeat",n.mode=Gr;break}m=n.lens[n.have-1],h=3+(l&3),l>>>=2,c-=2}else if(k===17){for(K=M+3;c>>=M,c-=M,m=0,h=3+(l&7),l>>>=3,c-=3}else{for(K=M+7;c>>=M,c-=M,m=0,h=11+(l&127),l>>>=7,c-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Gr;break}for(;h--;)n.lens[n.have++]=m}}if(n.mode===Gr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Gr;break}if(n.lenbits=9,Y={bits:n.lenbits},w=A1(fee,n.lens,0,n.nlen,n.lencode,0,n.work,Y),n.lenbits=Y.bits,w){e.msg="invalid literal/lengths set",n.mode=Gr;break}if(n.distbits=6,n.distcode=n.distdyn,Y={bits:n.distbits},w=A1(hee,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Y),n.distbits=Y.bits,w){e.msg="invalid distances set",n.mode=Gr;break}if(n.mode=pI,t===gI)break e;case pI:n.mode=yI;case yI:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,h4e(e,f),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===pu&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<>>24,E=y>>>16&255,k=y&65535,!(M<=c);){if(s===0)break e;s--,l+=r[o++]<>C)],M=y>>>24,E=y>>>16&255,k=y&65535,!(C+M<=c);){if(s===0)break e;s--,l+=r[o++]<>>=C,c-=C,n.back+=C}if(l>>>=M,c-=M,n.back+=M,n.length=k,E===0){n.mode=b7;break}if(E&32){n.back=-1,n.mode=pu;break}if(E&64){e.msg="invalid literal/length code",n.mode=Gr;break}n.extra=E&15,n.mode=h7;case h7:if(n.extra){for(K=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=g7;case g7:for(;y=n.distcode[l&(1<>>24,E=y>>>16&255,k=y&65535,!(M<=c);){if(s===0)break e;s--,l+=r[o++]<>C)],M=y>>>24,E=y>>>16&255,k=y&65535,!(C+M<=c);){if(s===0)break e;s--,l+=r[o++]<>>=C,c-=C,n.back+=C}if(l>>>=M,c-=M,n.back+=M,E&64){e.msg="invalid distance code",n.mode=Gr;break}n.offset=k,n.extra=E&15,n.mode=p7;case p7:if(n.extra){for(K=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Gr;break}n.mode=y7;case y7:if(u===0)break e;if(h=f-u,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Gr;break}h>n.wnext?(h-=n.wnext,g=n.wsize-h):g=n.wnext-h,h>n.length&&(h=n.length),b=n.window}else b=i,g=a-n.offset,h=n.length;h>u&&(h=u),u-=h,n.length-=h;do i[a++]=b[g++];while(--h);n.length===0&&(n.mode=yI);break;case b7:if(u===0)break e;i[a++]=n.length,u--,n.mode=yI;break;case X8:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[o++]<{if(Vh(e))return ws;let t=e.state;return t.window&&(t.window=null),e.state=null,dh},N4e=(e,t)=>{if(Vh(e))return ws;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,dh):ws},O4e=(e,t)=>{const n=t.length;let r,i,o;return Vh(e)||(r=e.state,r.wrap!==0&&r.mode!==e3)?ws:r.mode===e3&&(i=1,i=eb(i,t,n,0),i!==r.check)?gee:(o=Iee(e,t,n,n),o?(r.mode=yee,pee):(r.havedict=1,dh))};var F4e=vee,U4e=wee,R4e=mee,P4e=k4e,z4e=Aee,j4e=T4e,G4e=x4e,H4e=N4e,K4e=O4e,Q4e="pako inflate (from Nodeca project)",Bu={inflateReset:F4e,inflateReset2:U4e,inflateResetKeep:R4e,inflateInit:P4e,inflateInit2:z4e,inflate:j4e,inflateEnd:G4e,inflateGetHeader:H4e,inflateSetDictionary:K4e,inflateInfo:Q4e};function q4e(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Y4e=q4e;const Eee=Object.prototype.toString,{Z_NO_FLUSH:J4e,Z_FINISH:V4e,Z_OK:rb,Z_STREAM_END:eL,Z_NEED_DICT:tL,Z_STREAM_ERROR:W4e,Z_DATA_ERROR:I7,Z_MEM_ERROR:Z4e}=$b;function tm(e){this.options=eS.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new lee,this.strm.avail_out=0;let n=Bu.inflateInit2(this.strm,t.windowBits);if(n!==rb)throw new Error(zg[n]);if(this.header=new Y4e,Bu.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=nb.string2buf(t.dictionary):Eee.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Bu.inflateSetDictionary(this.strm,t.dictionary),n!==rb)))throw new Error(zg[n])}tm.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?V4e:J4e,Eee.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Bu.inflate(n,a),o===tL&&i&&(o=Bu.inflateSetDictionary(n,i),o===rb?o=Bu.inflate(n,a):o===I7&&(o=tL));n.avail_in>0&&o===eL&&n.state.wrap>0&&e[n.next_in]!==0;)Bu.inflateReset(n),o=Bu.inflate(n,a);switch(o){case W4e:case I7:case tL:case Z4e:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===eL))if(this.options.to==="string"){let u=nb.utf8border(n.output,n.next_out),l=n.next_out-u,c=nb.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===rb&&s===0)){if(o===eL)return o=Bu.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};tm.prototype.onData=function(e){this.chunks.push(e)};tm.prototype.onEnd=function(e){e===rb&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=eS.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function OF(e,t){const n=new tm(t);if(n.push(e),n.err)throw n.msg||zg[n.err];return n.result}function X4e(e,t){return t=t||{},t.raw=!0,OF(e,t)}var _4e=tm,$4e=OF,eSe=X4e,tSe=OF,nSe=$b,rSe={Inflate:_4e,inflate:$4e,inflateRaw:eSe,ungzip:tSe,constants:nSe};const{Inflate:fft,inflate:iSe,inflateRaw:hft,ungzip:gft}=rSe;var oSe=iSe,aSe=$O();const Mee=Pa(aSe);function sSe(e,t){return Array.apply(0,new Array(Math.ceil(e.length/t))).map((n,r)=>e.slice(r*t,(r+1)*t))}const gy=e=>"version"in e;function cSe(e){return e.reduce((t,n)=>t+n.toString(16).padStart(2,"0"),"0x")}function uSe(e){e.indexOf("0x")===0&&(e=e.substr(2)),e.length%2===1&&(e="0"+e);let t=e.match(/.{2}/g);return t===null?Be.Buffer.from([]):Be.Buffer.from(t.map(n=>parseInt(n,16)))}var lSe=Object.freeze({__proto__:null,encode:cSe,decode:uSe});function See(e){return new TextDecoder("utf-8").decode(e)}function Dee(e){return new TextEncoder().encode(e)}var dSe=Object.freeze({__proto__:null,decode:See,encode:Dee});function QT(e){return ln.encode(e)}function fSe(e){return ln.decode(e)}var hSe=Object.freeze({__proto__:null,encode:QT,decode:fSe});function qT(e){return e.toString("base64")}function FF(e){return Be.Buffer.from(e,"base64")}var gSe=Object.freeze({__proto__:null,encode:qT,decode:FF}),pSe=Object.freeze({__proto__:null,hex:lSe,utf8:dSe,bs58:hSe,base64:gSe});function ySe(e){const t=new Map;return e.errors&&e.errors.forEach(n=>{var r;let i=(r=n.msg)!==null&&r!==void 0?r:n.name;t.set(n.code,i)}),t}function bSe(e,...t){if(e.args.length!=t.length)throw new Error("Invalid argument length");const n={};let r=0;return e.args.forEach(i=>{n[i.name]=t[r],r+=1}),n}function Cee(e,t={}){e.forEach(n=>{if("accounts"in n)Cee(n.accounts,t[n.name]);else if(t[n.name]===void 0)throw new Error(`Invalid arguments: ${n.name} not provided.`)})}function Ua(e){return e instanceof _e?e:new _e(e)}class mSe extends TypeError{constructor(t,n){let r;const{message:i,...o}=t,{path:a}=t,s=a.length===0?i:"At path: "+a.join(".")+" -- "+i;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var u;return(u=r)!=null?u:r=[t,...n()]}}}function vSe(e){return gg(e)&&typeof e[Symbol.iterator]=="function"}function gg(e){return typeof e=="object"&&e!=null}function vd(e){return typeof e=="string"?JSON.stringify(e):""+e}function wSe(e){const{done:t,value:n}=e.next();return t?void 0:n}function ASe(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:o}=t,{type:a}=n,{refinement:s,message:u="Expected a value of type `"+a+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+vd(r)+"`"}=e;return{value:r,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:u}}function*E7(e,t,n,r){vSe(e)||(e=[e]);for(const i of e){const o=ASe(i,t,n,r);o&&(yield o)}}function*UF(e,t,n){n===void 0&&(n={});const{path:r=[],branch:i=[e],coerce:o=!1,mask:a=!1}=n,s={path:r,branch:i};if(o&&(e=t.coercer(e,s),a&&t.type!=="type"&&gg(t.schema)&&gg(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let u=!0;for(const l of t.validator(e,s))u=!1,yield[l,void 0];for(let[l,c,d]of t.entries(e,s)){const f=UF(c,d,{path:l===void 0?r:[...r,l],branch:l===void 0?i:[...i,c],coerce:o,mask:a});for(const h of f)h[0]?(u=!1,yield[h[0],void 0]):o&&(c=h[1],l===void 0?e=c:e instanceof Map?e.set(l,c):e instanceof Set?e.add(c):gg(e)&&(e[l]=c))}if(u)for(const l of t.refiner(e,s))u=!1,yield[l,void 0];u&&(yield[void 0,e])}class zd{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:i,refiner:o,coercer:a=u=>u,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=a,i?this.validator=(u,l)=>{const c=i(u,l);return E7(c,l,this,u)}:this.validator=()=>[],o?this.refiner=(u,l)=>{const c=o(u,l);return E7(c,l,this,u)}:this.refiner=()=>[]}assert(t){return ISe(t,this)}create(t){return RF(t,this)}is(t){return Lee(t,this)}mask(t){return ESe(t,this)}validate(t,n){return n===void 0&&(n={}),nm(t,this,n)}}function ISe(e,t){const n=nm(e,t);if(n[0])throw n[0]}function RF(e,t){const n=nm(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function ESe(e,t){const n=nm(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function Lee(e,t){return!nm(e,t)[0]}function nm(e,t,n){n===void 0&&(n={});const r=UF(e,t,n),i=wSe(r);return i[0]?[new mSe(i[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function rm(e,t){return new zd({type:e,schema:null,validator:t})}function MSe(){return rm("any",()=>!0)}function nL(e){return new zd({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+vd(t)}})}function SSe(){return rm("boolean",e=>typeof e=="boolean")}function M7(e){const t=vd(e),n=typeof e;return new zd({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+vd(r)}})}function bI(e){return new zd({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function BE(){return rm("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+vd(e))}function TE(e){return new zd({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function Uf(){return rm("string",e=>typeof e=="string"||"Expected a string, but received: "+vd(e))}function hd(e){const t=Object.keys(e);return new zd({type:"type",schema:e,*entries(n){if(gg(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return gg(n)||"Expected an object, but received: "+vd(n)}})}function kee(e){const t=e.map(n=>n.type).join(" | ");return new zd({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||PF()).coercer(n,r)},validator(n,r){const i=[];for(const o of e){const[...a]=UF(n,o,r),[s]=a;if(s[0])for(const[u]of a)u&&i.push(u);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+vd(n),...i]}})}function PF(){return rm("unknown",()=>!0)}function DSe(e,t,n){return new zd({...e,coercer:(r,i)=>Lee(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}async function CSe(e,t,n,r){e=Ua(e),r||(r=t3());const i=new xn;if(i.add(new nr({programId:e,keys:t??[],data:n})),r.sendAndConfirm===void 0)throw new Error("This function requires 'Provider.sendAndConfirm' to be implemented.");return await r.sendAndConfirm(i,[])}const S7=99;async function LSe(e,t,n){return(await zF(e,t,n)).map(i=>i?{publicKey:i.publicKey,account:i.account}:null)}async function zF(e,t,n){if(t.length<=S7)return await D7(e,t,n);{const r=sSe(t,S7);return(await Promise.all(r.map(o=>D7(e,o,n)))).flat()}}async function D7(e,t,n){const r=n??e.commitment,{value:i,context:o}=await e.getMultipleAccountsInfoAndContext(t,r);return i.map((s,u)=>s===null?null:{publicKey:t[u],account:s,context:o})}async function Bee(e,t,n,r,i){var o;n&&n.length>0&&t.sign(...n);const a=t._compile(),s=a.serialize(),l=t._serialize(s).toString("base64"),c={encoding:"base64",commitment:r??e.commitment};if(i){const g=(Array.isArray(i)?i:a.nonProgramIds()).map(b=>b.toBase58());c.accounts={encoding:"base64",addresses:g}}n&&(c.sigVerify=!0);const d=[l,c],f=await e._rpcRequest("simulateTransaction",d),h=RF(f,xSe);if("error"in h){let g;if("data"in h.error&&(g=(o=h.error.data)===null||o===void 0?void 0:o.logs,g&&Array.isArray(g))){const b=` `,y=b+g.join(b);console.error(h.error.message,y)}throw new Pg("failed to simulate transaction: "+h.error.message,g)}return h.result}function kSe(e){return DSe(Tee(e),BSe,t=>"error"in t?t:{...t,result:RF(t.result,e)})}const BSe=Tee(PF());function Tee(e){return kee([hd({jsonrpc:M7("2.0"),id:Uf(),result:e}),hd({jsonrpc:M7("2.0"),id:Uf(),error:hd({code:PF(),message:Uf(),data:TE(MSe())})})])}function TSe(e){return kSe(hd({context:hd({slot:BE()}),value:e}))}const xSe=TSe(hd({err:bI(kee([hd({}),Uf()])),logs:bI(nL(Uf())),accounts:TE(bI(nL(bI(hd({executable:SSe(),owner:Uf(),lamports:BE(),data:nL(Uf()),rentEpoch:TE(BE())}))))),unitsConsumed:TE(BE())}));var NSe=Object.freeze({__proto__:null,invoke:CSe,getMultipleAccounts:LSe,getMultipleAccountsAndContext:zF,simulateTransaction:Bee});class YT{constructor(t,n,r){this.connection=t,this.wallet=n,this.opts=r,this.publicKey=n?.publicKey}static defaultOptions(){return{preflightCommitment:"processed",commitment:"processed"}}static local(t,n){throw new Error("Provider local is not available on browser.")}static env(){throw new Error("Provider env is not available on browser.")}async sendAndConfirm(t,n,r){var i,o,a,s;if(r===void 0&&(r=this.opts),gy(t))n&&t.sign(n);else if(t.feePayer=(i=t.feePayer)!==null&&i!==void 0?i:this.wallet.publicKey,t.recentBlockhash=(await this.connection.getLatestBlockhash(r.preflightCommitment)).blockhash,n)for(const l of n)t.partialSign(l);t=await this.wallet.signTransaction(t);const u=t.serialize();try{return await C7(this.connection,u,r)}catch(l){if(l instanceof JT){const c=QT(gy(t)?((o=t.signatures)===null||o===void 0?void 0:o[0])||new Uint8Array:(a=t.signature)!==null&&a!==void 0?a:new Uint8Array),d=await this.connection.getTransaction(c,{commitment:"confirmed"});if(d){const f=(s=d.meta)===null||s===void 0?void 0:s.logMessages;throw f?new Pg(l.message,f):l}else throw l}else throw l}}async sendAll(t,n){var r,i,o;n===void 0&&(n=this.opts);const a=(await this.connection.getLatestBlockhash(n.preflightCommitment)).blockhash;let s=t.map(c=>{var d,f;if(gy(c.tx)){let h=c.tx;return c.signers&&h.sign(c.signers),h}else{let h=c.tx,g=(d=c.signers)!==null&&d!==void 0?d:[];return h.feePayer=(f=h.feePayer)!==null&&f!==void 0?f:this.wallet.publicKey,h.recentBlockhash=a,g.forEach(b=>{h.partialSign(b)}),h}});const u=await this.wallet.signAllTransactions(s),l=[];for(let c=0;cf.startsWith("Program log: AnchorError"));if(n===-1)return null;const r=t[n],i=[r];let o;if(n+11)return null;i=s[0].match(/([0-9]+)/g)[0]}let o;try{o=parseInt(i)}catch{return null}let a=n.get(o);return a!==void 0?new r3(o,a,t.logs):(a=zSe.get(o),a!==void 0?new r3(o,a,t.logs):null)}get program(){var t;return(t=this._programErrorStack)===null||t===void 0?void 0:t.stack[this._programErrorStack.stack.length-1]}get programErrorStack(){var t;return(t=this._programErrorStack)===null||t===void 0?void 0:t.stack}toString(){return this.msg}}function Nee(e,t){jF("debug-logs")&&console.log("Translating error:",e);const n=PSe.parse(e.logs);if(n)return n;const r=r3.parse(e,t);if(r)return r;if(e.logs){const i={get:function(o,a){return a==="programErrorStack"?o.programErrorStack.stack:a==="program"?o.programErrorStack.stack[e.programErrorStack.stack.length-1]:Reflect.get(...arguments)}};return e.programErrorStack=im.parse(e.logs),new Proxy(e,i)}return e}const zt={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,ConstraintAccountIsNone:2020,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,DeclaredProgramIdMismatch:4100,Deprecated:5e3},zSe=new Map([[zt.InstructionMissing,"8 byte instruction identifier not provided"],[zt.InstructionFallbackNotFound,"Fallback functions are not supported"],[zt.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[zt.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[zt.IdlInstructionStub,"The program was compiled without idl instructions"],[zt.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[zt.ConstraintMut,"A mut constraint was violated"],[zt.ConstraintHasOne,"A has one constraint was violated"],[zt.ConstraintSigner,"A signer constraint was violated"],[zt.ConstraintRaw,"A raw constraint was violated"],[zt.ConstraintOwner,"An owner constraint was violated"],[zt.ConstraintRentExempt,"A rent exemption constraint was violated"],[zt.ConstraintSeeds,"A seeds constraint was violated"],[zt.ConstraintExecutable,"An executable constraint was violated"],[zt.ConstraintState,"Deprecated Error, feel free to replace with something else"],[zt.ConstraintAssociated,"An associated constraint was violated"],[zt.ConstraintAssociatedInit,"An associated init constraint was violated"],[zt.ConstraintClose,"A close constraint was violated"],[zt.ConstraintAddress,"An address constraint was violated"],[zt.ConstraintZero,"Expected zero account discriminant"],[zt.ConstraintTokenMint,"A token mint constraint was violated"],[zt.ConstraintTokenOwner,"A token owner constraint was violated"],[zt.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[zt.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[zt.ConstraintMintDecimals,"A mint decimals constraint was violated"],[zt.ConstraintSpace,"A space constraint was violated"],[zt.ConstraintAccountIsNone,"A required account for the constraint is None"],[zt.RequireViolated,"A require expression was violated"],[zt.RequireEqViolated,"A require_eq expression was violated"],[zt.RequireKeysEqViolated,"A require_keys_eq expression was violated"],[zt.RequireNeqViolated,"A require_neq expression was violated"],[zt.RequireKeysNeqViolated,"A require_keys_neq expression was violated"],[zt.RequireGtViolated,"A require_gt expression was violated"],[zt.RequireGteViolated,"A require_gte expression was violated"],[zt.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[zt.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[zt.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[zt.AccountDidNotDeserialize,"Failed to deserialize the account"],[zt.AccountDidNotSerialize,"Failed to serialize the account"],[zt.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[zt.AccountNotMutable,"The given account is not mutable"],[zt.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[zt.InvalidProgramId,"Program ID was not as expected"],[zt.InvalidProgramExecutable,"Program account is not executable"],[zt.AccountNotSigner,"The given account did not sign"],[zt.AccountNotSystemOwned,"The given account is not owned by the system program"],[zt.AccountNotInitialized,"The program expected this account to be already initialized"],[zt.AccountNotProgramData,"The given account is not a program data account"],[zt.AccountNotAssociatedTokenAccount,"The given account is not the associated token account"],[zt.AccountSysvarMismatch,"The given public key does not match the required sysvar"],[zt.AccountReallocExceedsLimit,"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit"],[zt.AccountDuplicateReallocs,"The account was duplicated for more than one reallocation"],[zt.DeclaredProgramIdMismatch,"The declared program id does not match the actual program id"],[zt.Deprecated,"The API being used is deprecated and should no longer be used"]]);var VT=function(){return VT=Object.assign||function(t){for(var n,r=1,i=arguments.length;ra.name===i);if(o.length!==1)throw new n3(`Type not found: ${JSON.stringify(t)}`);return Zo.typeDefLayout(o[0],n,r)}else if("array"in t.type){let i=t.type.array[0],o=t.type.array[1],a=Zo.fieldLayout({name:void 0,type:i},n);return un.array(a,o,r)}else throw new Error(`Not yet implemented: ${t}`)}}}static typeDefLayout(t,n=[],r){switch(t.type.kind){case"struct":{const i=t.type.fields.map(o=>Zo.fieldLayout(o,n));return un.struct(i,r)}case"enum":{let i=t.type.variants.map(o=>{const a=Hr(o.name);if(!o.fields)return un.struct([],a);const s=o.fields.map((u,l)=>u?.name?Zo.fieldLayout(u,n):Zo.fieldLayout({type:u,name:l.toString()},n));return un.struct(s,a)});return r!==void 0?un.rustEnum(i).replicate(r):un.rustEnum(i,r)}case"alias":return Zo.fieldLayout({type:t.type.value,name:t.name},n)}}}const k7="global";class GF{constructor(t){this.idl=t,this.ixLayout=GF.parseIxLayout(t);const n=new Map;t.instructions.forEach(r=>{const i=B7(k7,r.name);n.set(ln.encode(i),{layout:this.ixLayout.get(r.name),name:r.name})}),this.sighashLayouts=n}encode(t,n){return this._encode(k7,t,n)}_encode(t,n,r){const i=Be.Buffer.alloc(1e3),o=Hr(n),a=this.ixLayout.get(o);if(!a)throw new Error(`Unknown method: ${o}`);const s=a.encode(r,i),u=i.slice(0,s);return Be.Buffer.concat([B7(t,n),u])}static parseIxLayout(t){const n=t.instructions.map(r=>{let i=r.args.map(a=>{var s,u;return Zo.fieldLayout(a,Array.from([...(s=t.accounts)!==null&&s!==void 0?s:[],...(u=t.types)!==null&&u!==void 0?u:[]]))});const o=Hr(r.name);return[o,un.struct(i,o)]});return new Map(n)}decode(t,n="hex"){typeof t=="string"&&(t=n==="hex"?Be.Buffer.from(t,"hex"):ln.decode(t));let r=ln.encode(t.slice(0,8)),i=t.slice(8);const o=this.sighashLayouts.get(r);return o?{data:o.layout.decode(i),name:o.name}:null}format(t,n){return wc.format(t,n,this.idl)}}class wc{static format(t,n,r){const i=r.instructions.filter(u=>t.name===u.name)[0];if(i===void 0)return console.error("Invalid instruction given"),null;const o=i.args.map(u=>({name:u.name,type:wc.formatIdlType(u.type),data:wc.formatIdlData(u,t.data[u.name],r.types)})),a=wc.flattenIdlAccounts(i.accounts),s=n.map((u,l)=>l`;if("option"in t)return`Option<${this.formatIdlType(t.option)}>`;if("defined"in t)return t.defined;if("array"in t)return`Array<${t.array[0]}; ${t.array[1]}>`;throw new Error(`Unknown IDL type: ${t}`)}static formatIdlData(t,n,r){if(typeof t.type=="string")return n.toString();if(t.type.hasOwnProperty("vec"))return"["+n.map(i=>this.formatIdlData({name:"",type:t.type.vec},i)).join(", ")+"]";if(t.type.hasOwnProperty("option"))return n===null?"null":this.formatIdlData({name:"",type:t.type.option},n,r);if(t.type.hasOwnProperty("defined")){if(r===void 0)throw new Error("User defined types not provided");const i=r.filter(o=>o.name===t.type.defined);if(i.length!==1)throw new Error(`Type not found: ${t.type.defined}`);return wc.formatIdlDataDefined(i[0],n,r)}return"unknown"}static formatIdlDataDefined(t,n,r){switch(t.type.kind){case"struct":{const i=t.type;return"{ "+Object.keys(n).map(a=>{const s=i.fields.find(u=>u.name===a);if(!s)throw new Error("Unable to find type");return a+": "+wc.formatIdlData(s,n[a],r)}).join(", ")+" }"}case"enum":{if(t.type.variants.length===0)return"{}";if(t.type.variants[0].name){const i=t.type.variants,o=Object.keys(n)[0],a=n[o],s=Object.keys(a).map(l=>{var c;const d=a[l],f=(c=i[o])===null||c===void 0?void 0:c.find(h=>h.name===l);if(!f)throw new Error("Unable to find variant");return l+": "+wc.formatIdlData(f,d,r)}).join(", "),u=Hr(o,{pascalCase:!0});return s.length===0?u:`${u} { ${s} }`}else return"Tuple formatting not yet implemented"}case"alias":return wc.formatIdlType(t.type.value)}}static flattenIdlAccounts(t,n){return t.map(r=>{const i=YSe(r.name);if(r.hasOwnProperty("accounts")){const o=n?`${n} > ${i}`:i;return wc.flattenIdlAccounts(r.accounts,o)}else return{...r,name:n?`${n} > ${i}`:i}}).flat()}}function YSe(e){const t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)}function B7(e,t){let n=qSe(t),r=`${e}:${n}`;return Be.Buffer.from(al(r).slice(0,8))}function Oee(e,t){switch(t.type.kind){case"struct":return t.type.fields.map(n=>Rf(e,n.type)).reduce((n,r)=>n+r,0);case"enum":{const n=t.type.variants.map(r=>r.fields?r.fields.map(i=>typeof i=="object"&&"name"in i?Rf(e,i.type):Rf(e,i)).reduce((i,o)=>i+o,0):0);return Math.max(...n)+1}case"alias":return Rf(e,t.type.value)}}function Rf(e,t){var n,r;switch(t){case"bool":return 1;case"u8":return 1;case"i8":return 1;case"i16":return 2;case"u16":return 2;case"u32":return 4;case"i32":return 4;case"f32":return 4;case"u64":return 8;case"i64":return 8;case"f64":return 8;case"u128":return 16;case"i128":return 16;case"u256":return 32;case"i256":return 32;case"bytes":return 1;case"string":return 1;case"publicKey":return 32;default:if("vec"in t)return 1;if("option"in t)return 1+Rf(e,t.option);if("coption"in t)return 4+Rf(e,t.coption);if("defined"in t){const i=(r=(n=e.types)===null||n===void 0?void 0:n.filter(a=>a.name===t.defined))!==null&&r!==void 0?r:[];if(i.length!==1)throw new n3(`Type not found: ${JSON.stringify(t)}`);let o=i[0];return Oee(e,o)}if("array"in t){let i=t.array[0],o=t.array[1];return Rf(e,i)*o}throw new Error(`Invalid type ${JSON.stringify(t)}`)}}const ZT=8;function Fee(e){return Be.Buffer.from(al(e).slice(0,ZT))}class H0{constructor(t){if(t.accounts===void 0){this.accountLayouts=new Map;return}const n=t.accounts.map(r=>[r.name,Zo.typeDefLayout(r,t.types)]);this.accountLayouts=new Map(n),this.idl=t}async encode(t,n){const r=Be.Buffer.alloc(1e3),i=this.accountLayouts.get(t);if(!i)throw new Error(`Unknown account: ${t}`);const o=i.encode(n,r);let a=r.slice(0,o),s=H0.accountDiscriminator(t);return Be.Buffer.concat([s,a])}decode(t,n){if(H0.accountDiscriminator(t).compare(n.slice(0,8)))throw new Error("Invalid account discriminator");return this.decodeUnchecked(t,n)}decodeAny(t){const n=t.slice(0,8),r=Array.from(this.accountLayouts.keys()).find(i=>H0.accountDiscriminator(i).equals(n));if(!r)throw new Error("Account descriminator not found");return this.decodeUnchecked(r,t)}decodeUnchecked(t,n){const r=n.subarray(ZT),i=this.accountLayouts.get(t);if(!i)throw new Error(`Unknown account: ${t}`);return i.decode(r)}memcmp(t,n){const r=H0.accountDiscriminator(t);return{offset:0,bytes:ln.encode(n?Be.Buffer.concat([r,n]):r)}}size(t){var n;return ZT+((n=Oee(this.idl,t))!==null&&n!==void 0?n:0)}static accountDiscriminator(t){const n=`account:${Hr(t,{pascalCase:!0,preserveConsecutiveUppercase:!0})}`;return Fee(n)}}class JSe{constructor(t){if(t.events===void 0){this.layouts=new Map;return}const n=t.events.map(r=>{let i={name:r.name,type:{kind:"struct",fields:r.fields.map(o=>({name:o.name,type:o.type}))}};return[r.name,Zo.typeDefLayout(i,t.types)]});this.layouts=new Map(n),this.discriminators=new Map(t.events===void 0?[]:t.events.map(r=>[qT(VSe(r.name)),r.name]))}decode(t){let n;try{n=FF(t)}catch{return null}const r=qT(n.slice(0,8)),i=this.discriminators.get(r);if(i===void 0)return null;const o=this.layouts.get(i);if(!o)throw new Error(`Unknown event: ${i}`);return{data:o.decode(n.slice(8)),name:i}}}function VSe(e){return Fee(`event:${e}`)}class WSe{constructor(t){if(t.types===void 0){this.typeLayouts=new Map;return}const n=t.types.map(r=>[r.name,Zo.typeDefLayout(r,t.types)]);this.typeLayouts=new Map(n),this.idl=t}encode(t,n){const r=Be.Buffer.alloc(1e3),i=this.typeLayouts.get(t);if(!i)throw new Error(`Unknown type: ${t}`);const o=i.encode(n,r);return r.slice(0,o)}decode(t,n){const r=this.typeLayouts.get(t);if(!r)throw new Error(`Unknown type: ${t}`);return r.decode(n)}}class HF{constructor(t){this.instruction=new GF(t),this.accounts=new H0(t),this.events=new JSe(t),this.types=new WSe(t)}}var ZSe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Yi<"u"?Yi:typeof self<"u"?self:{};function XSe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}class aa{constructor(t,n){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=n}makeDestinationObject(){return{}}decode(t,n){throw new Error("Layout is abstract")}encode(t,n,r){throw new Error("Layout is abstract")}getSpan(t,n){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){const n=Object.create(this.constructor.prototype);return Object.assign(n,this),n.property=t,n}fromArray(t){}}var nS=aa;function _Se(e,t){return t.property?e+"["+t.property+"]":e}class Pf extends aa{isCount(){throw new Error("ExternalLayout is abstract")}}class Uee extends Pf{constructor(t,n,r){if(!(t instanceof aa))throw new TypeError("layout must be a Layout");if(n===void 0)n=0;else if(!Number.isInteger(n))throw new TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=n}isCount(){return this.layout instanceof rS||this.layout instanceof Ree}decode(t,n){return n===void 0&&(n=0),this.layout.decode(t,n+this.offset)}encode(t,n,r){return r===void 0&&(r=0),this.layout.encode(t,n,r+this.offset)}}class rS extends aa{constructor(t,n){if(super(t,n),6o&&a instanceof aa,!0)))throw new TypeError("fields must be array of Layout instances");typeof n=="boolean"&&r===void 0&&(r=n,n=void 0);for(const o of t)if(0>o.span&&o.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let i=-1;try{i=t.reduce((o,a)=>o+a.getSpan(),0)}catch{}super(i,n),this.fields=t,this.decodePrefixes=!!r}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);let r=0;try{r=this.fields.reduce((i,o)=>{const a=o.getSpan(t,n);return n+=a,i+a},0)}catch{throw new RangeError("indeterminate span")}return r}decode(t,n){n===void 0&&(n=0);const r=this.makeDestinationObject();for(const i of this.fields)if(i.property!==void 0&&(r[i.property]=i.decode(t,n)),n+=i.getSpan(t,n),this.decodePrefixes&&t.length===n)break;return r}encode(t,n,r){r===void 0&&(r=0);const i=r;let o=0,a=0;for(const s of this.fields){let u=s.span;if(a=0u&&(u=s.getSpan(n,r)))}o=r,r+=u}return o+a-i}fromArray(t){const n=this.makeDestinationObject();for(const r of this.fields)r.property!==void 0&&0r.span?n=-1:0<=n&&(n+=r.span)}}}class jee{constructor(t){this.property=t}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}}class T7 extends jee{constructor(t,n){if(!(t instanceof Pf&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(n||t.property||"variant"),this.layout=t}decode(t,n){return this.layout.decode(t,n)}encode(t,n,r){return this.layout.encode(t,n,r)}}class Gee extends aa{constructor(t,n,r){const i=t instanceof rS||t instanceof Ree;if(i)t=new T7(new Uee(t));else if(t instanceof Pf&&t.isCount())t=new T7(t);else if(!(t instanceof jee))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(n===void 0&&(n=null),!(n===null||n instanceof aa))throw new TypeError("defaultLayout must be null or a Layout");if(n!==null){if(0>n.span)throw new Error("defaultLayout must have constant span");n.property===void 0&&(n=n.replicate("content"))}let o=-1;n&&(o=n.span,0<=o&&i&&(o+=t.layout.span)),super(o,r),this.discriminator=t,this.usesPrefixDiscriminator=i,this.defaultLayout=n,this.registry={};let a=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(s){return a(s)},this.configGetSourceVariant=function(s){a=s.bind(this)}}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);const r=this.getVariant(t,n);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(t,n)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const n=this.registry[t[this.discriminator.property]];if(n&&(!n.layout||t.hasOwnProperty(n.property)))return n}else for(const n in this.registry){const r=this.registry[n];if(t.hasOwnProperty(r.property))return r}throw new Error("unable to infer src variant")}decode(t,n){n===void 0&&(n=0);let r;const i=this.discriminator,o=i.decode(t,n);let a=this.registry[o];if(a===void 0){let s=0;a=this.defaultLayout,this.usesPrefixDiscriminator&&(s=i.layout.span),r=this.makeDestinationObject(),r[i.property]=o,r[a.property]=this.defaultLayout.decode(t,n+s)}else r=a.decode(t,n);return r}encode(t,n,r){r===void 0&&(r=0);const i=this.getSourceVariant(t);if(i===void 0){const o=this.discriminator,a=this.defaultLayout;let s=0;return this.usesPrefixDiscriminator&&(s=o.layout.span),o.encode(t[o.property],n,r),s+a.encode(t[a.property],n,r+s)}return i.encode(t,n,r)}addVariant(t,n,r){const i=new nDe(this,t,n,r);return this.registry[t]=i,i}getVariant(t,n){let r=t;return Be.Buffer.isBuffer(t)&&(n===void 0&&(n=0),r=this.discriminator.decode(t,n)),this.registry[r]}}class nDe extends aa{constructor(t,n,r,i){if(!(t instanceof Gee))throw new TypeError("union must be a Union");if(!Number.isInteger(n)||0>n)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&i===void 0&&(i=r,r=null),r){if(!(r instanceof aa))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=r.span&&r.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof i!="string")throw new TypeError("variant must have a String property")}let o=t.span;0>t.span&&(o=r?r.span:0,0<=o&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span)),super(o,i),this.union=t,this.variant=n,this.layout=r||null}getSpan(t,n){if(0<=this.span)return this.span;n===void 0&&(n=0);let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(t,n+r)}decode(t,n){const r=this.makeDestinationObject();if(n===void 0&&(n=0),this!==this.union.getVariant(t,n))throw new Error("variant mismatch");let i=0;return this.union.usesPrefixDiscriminator&&(i=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,n+i):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,n,r){r===void 0&&(r=0);let i=0;if(this.union.usesPrefixDiscriminator&&(i=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,n,r);let o=i;if(this.layout&&(this.layout.encode(t[this.property],n,r+i),o+=this.layout.getSpan(n,r+i),0<=this.union.span&&o>this.union.span))throw new Error("encoded variant overruns containing union");return o}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}let rDe=class extends aa{constructor(t,n){if(!(t instanceof Pf&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof Pf||(r=t),super(r,n),this.length=t}getSpan(t,n){let r=this.span;return 0>r&&(r=this.length.decode(t,n)),r}decode(t,n){n===void 0&&(n=0);let r=this.span;return 0>r&&(r=this.length.decode(t,n)),t.slice(n,n+r)}encode(t,n,r){let i=this.length;if(this.length instanceof Pf&&(i=t.length),!(Be.Buffer.isBuffer(t)&&i===t.length))throw new TypeError(_Se("Blob.encode",this)+" requires (length "+i+") Buffer as src");if(r+i>n.length)throw new RangeError("encoding overruns Buffer");return n.write(t.toString("hex"),r,i,"hex"),this.length instanceof Pf&&this.length.encode(i,n,r),i}};var iDe=(e,t,n)=>new Uee(e,t,n),oDe=e=>new rS(1,e),Pu=e=>new rS(4,e),aDe=e=>new $Se(e),sl=e=>new eDe(e),Oi=(e,t,n)=>new tDe(e,t,n),Hee=(e,t,n)=>new Gee(e,t,n),om=(e,t)=>new rDe(e,t);class sDe extends nS{constructor(t){super(-1,t),this.property=t,this.layout=Oi([Pu("length"),Pu("lengthPadding"),om(iDe(Pu(),-8),"chars")],this.property)}encode(t,n,r=0){if(t==null)return this.layout.span;const i={chars:Be.Buffer.from(t,"utf8")};return this.layout.encode(i,n,r)}decode(t,n=0){return this.layout.decode(t,n).chars.toString()}getSpan(t,n=0){return Pu().span+Pu().span+new oh(new Uint8Array(t).slice(n,n+4),10,"le").toNumber()}}function iS(e){return new sDe(e)}function As(e){return om(32,e)}const ja=Hee(Pu("instruction"));ja.addVariant(0,Oi([sl("lamports"),sl("space"),As("owner")]),"createAccount");ja.addVariant(1,Oi([As("owner")]),"assign");ja.addVariant(2,Oi([sl("lamports")]),"transfer");ja.addVariant(3,Oi([As("base"),iS("seed"),sl("lamports"),sl("space"),As("owner")]),"createAccountWithSeed");ja.addVariant(4,Oi([As("authorized")]),"advanceNonceAccount");ja.addVariant(5,Oi([sl("lamports")]),"withdrawNonceAccount");ja.addVariant(6,Oi([As("authorized")]),"initializeNonceAccount");ja.addVariant(7,Oi([As("authorized")]),"authorizeNonceAccount");ja.addVariant(8,Oi([sl("space")]),"allocate");ja.addVariant(9,Oi([As("base"),iS("seed"),sl("space"),As("owner")]),"allocateWithSeed");ja.addVariant(10,Oi([As("base"),iS("seed"),As("owner")]),"assignWithSeed");ja.addVariant(11,Oi([sl("lamports"),iS("seed"),As("owner")]),"transferWithSeed");Math.max(...Object.values(ja.registry).map(e=>e.span));class cDe extends nS{constructor(t,n,r,i){super(t.span,i),this.layout=t,this.decoder=n,this.encoder=r}decode(t,n){return this.decoder(this.layout.decode(t,n))}encode(t,n,r){return this.layout.encode(this.encoder(t),n,r)}getSpan(t,n){return this.layout.getSpan(t,n)}}function x7(e){return new cDe(om(32),t=>new _e(t),t=>t.toBuffer(),e)}Oi([Pu("version"),Pu("state"),x7("authorizedPubkey"),x7("nonce"),Oi([aDe("lamportsPerSignature")],"feeCalculator")]);function uDe(e){return new TextDecoder().decode(al(e))}var lDe=Object.freeze({__proto__:null,hash:uDe});function dDe(e,t,n){const r=Be.Buffer.concat([e.toBuffer(),Be.Buffer.from(t),n.toBuffer()]);return new _e(al(r))}function Kee(e,...t){let n=[Be.Buffer.from([97,110,99,104,111,114])];t.forEach(i=>{n.push(i instanceof Be.Buffer?i:Ua(i).toBuffer())});const[r]=_e.findProgramAddressSync(n,Ua(e));return r}var fDe=Object.freeze({__proto__:null,createWithSeedSync:dDe,associated:Kee});const KF=new _e("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),QF=new _e("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");function hDe({mint:e,owner:t}){return _e.findProgramAddressSync([t.toBuffer(),KF.toBuffer(),e.toBuffer()],QF)[0]}var gDe=Object.freeze({__proto__:null,TOKEN_PROGRAM_ID:KF,ASSOCIATED_PROGRAM_ID:QF,associatedAddress:hDe}),_T={exports:{}};(function(e,t){var n=typeof self<"u"?self:ZSe,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function u(p){return p&&DataView.prototype.isPrototypeOf(p)}if(s.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(p){return p&&l.indexOf(Object.prototype.toString.call(p))>-1};function d(p){if(typeof p!="string"&&(p=String(p)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(p))throw new TypeError("Invalid character in header field name");return p.toLowerCase()}function f(p){return typeof p!="string"&&(p=String(p)),p}function h(p){var A={next:function(){var B=p.shift();return{done:B===void 0,value:B}}};return s.iterable&&(A[Symbol.iterator]=function(){return A}),A}function g(p){this.map={},p instanceof g?p.forEach(function(A,B){this.append(B,A)},this):Array.isArray(p)?p.forEach(function(A){this.append(A[0],A[1])},this):p&&Object.getOwnPropertyNames(p).forEach(function(A){this.append(A,p[A])},this)}g.prototype.append=function(p,A){p=d(p),A=f(A);var B=this.map[p];this.map[p]=B?B+", "+A:A},g.prototype.delete=function(p){delete this.map[d(p)]},g.prototype.get=function(p){return p=d(p),this.has(p)?this.map[p]:null},g.prototype.has=function(p){return this.map.hasOwnProperty(d(p))},g.prototype.set=function(p,A){this.map[d(p)]=f(A)},g.prototype.forEach=function(p,A){for(var B in this.map)this.map.hasOwnProperty(B)&&p.call(A,this.map[B],B,this)},g.prototype.keys=function(){var p=[];return this.forEach(function(A,B){p.push(B)}),h(p)},g.prototype.values=function(){var p=[];return this.forEach(function(A){p.push(A)}),h(p)},g.prototype.entries=function(){var p=[];return this.forEach(function(A,B){p.push([B,A])}),h(p)},s.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function b(p){if(p.bodyUsed)return Promise.reject(new TypeError("Already read"));p.bodyUsed=!0}function y(p){return new Promise(function(A,B){p.onload=function(){A(p.result)},p.onerror=function(){B(p.error)}})}function M(p){var A=new FileReader,B=y(A);return A.readAsArrayBuffer(p),B}function E(p){var A=new FileReader,B=y(A);return A.readAsText(p),B}function k(p){for(var A=new Uint8Array(p),B=new Array(A.length),O=0;O-1?A:p}function w(p,A){A=A||{};var B=A.body;if(p instanceof w){if(p.bodyUsed)throw new TypeError("Already read");this.url=p.url,this.credentials=p.credentials,A.headers||(this.headers=new g(p.headers)),this.method=p.method,this.mode=p.mode,this.signal=p.signal,!B&&p._bodyInit!=null&&(B=p._bodyInit,p.bodyUsed=!0)}else this.url=String(p);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new g(A.headers)),this.method=m(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.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)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})};function G(p){var A=new FormData;return p.trim().split("&").forEach(function(B){if(B){var O=B.split("="),j=O.shift().replace(/\+/g," "),U=O.join("=").replace(/\+/g," ");A.append(decodeURIComponent(j),decodeURIComponent(U))}}),A}function Y(p){var A=new g,B=p.replace(/\r?\n[\t ]+/g," ");return B.split(/\r?\n/).forEach(function(O){var j=O.split(":"),U=j.shift().trim();if(U){var N=j.join(":").trim();A.append(U,N)}}),A}H.call(w.prototype);function K(p,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new g(A.headers),this.url=A.url||"",this._initBody(p)}H.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},K.error=function(){var p=new K(null,{status:0,statusText:""});return p.type="error",p};var D=[301,302,303,307,308];K.redirect=function(p,A){if(D.indexOf(A)===-1)throw new RangeError("Invalid status code");return new K(null,{status:A,headers:{location:p}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(A,B){this.message=A,this.name=B;var O=Error(A);this.stack=O.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function v(p,A){return new Promise(function(B,O){var j=new w(p,A);if(j.signal&&j.signal.aborted)return O(new a.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function N(){U.abort()}U.onload=function(){var P={status:U.status,statusText:U.statusText,headers:Y(U.getAllResponseHeaders()||"")};P.url="responseURL"in U?U.responseURL:P.headers.get("X-Request-URL");var x="response"in U?U.response:U.responseText;B(new K(x,P))},U.onerror=function(){O(new TypeError("Network request failed"))},U.ontimeout=function(){O(new TypeError("Network request failed"))},U.onabort=function(){O(new a.DOMException("Aborted","AbortError"))},U.open(j.method,j.url,!0),j.credentials==="include"?U.withCredentials=!0:j.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&s.blob&&(U.responseType="blob"),j.headers.forEach(function(P,x){U.setRequestHeader(x,P)}),j.signal&&(j.signal.addEventListener("abort",N),U.onreadystatechange=function(){U.readyState===4&&j.signal.removeEventListener("abort",N)}),U.send(typeof j._bodyInit>"u"?null:j._bodyInit)})}return v.polyfill=!0,o.fetch||(o.fetch=v,o.Headers=g,o.Request=w,o.Response=K),a.Headers=g,a.Request=w,a.Response=K,a.fetch=v,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(_T,_T.exports);var pDe=XSe(_T.exports);async function yDe(e,t,n=5){const r=`https://api.apr.dev/api/v0/program/${t.toString()}/latest?limit=${n}`,[i,o]=await Promise.all([Qee(e,t),pDe(r)]),a=(await o.json()).filter(u=>!u.aborted&&u.state==="Built"&&u.verified==="Verified");if(a.length===0)return null;const s=a[0];return i.slot.toNumber()!==s.verified_slot?null:s}async function Qee(e,t){const n=await e.getAccountInfo(t);if(n===null)throw new Error("program account not found");const{program:r}=$T(n.data),i=await e.getAccountInfo(r.programdataAddress);if(i===null)throw new Error("program data account not found");const{programData:o}=$T(i.data);return o}const bDe=un.rustEnum([un.struct([],"uninitialized"),un.struct([un.option(un.publicKey(),"authorityAddress")],"buffer"),un.struct([un.publicKey("programdataAddress")],"program"),un.struct([un.u64("slot"),un.option(un.publicKey(),"upgradeAuthorityAddress")],"programData")],void 0,un.u32());function $T(e){return bDe.decode(e)}var mDe=Object.freeze({__proto__:null,verifiedBuild:yDe,fetchData:Qee,decodeUpgradeableLoaderState:$T}),e6=Object.freeze({__proto__:null,sha256:lDe,rpc:NSe,publicKey:fDe,bytes:pSe,token:gDe,features:RSe,registry:mDe});function vDe(e){return"accounts"in e}async function wDe(e){const t=(await _e.findProgramAddress([],e))[0];return await _e.createWithSeed(t,ADe(),e)}function ADe(){return"anchor:idl"}const IDe=un.struct([un.publicKey("authority"),un.vecU8("data")]);function EDe(e){return IDe.decode(e)}function oS(e,t){var n,r;let i={};const o=e.args?e.args.length:0;if(t.length>o){if(t.length!==o+1)throw new Error(`provided too many arguments ${t} to instruction ${e?.name} expecting: ${(r=(n=e.args)===null||n===void 0?void 0:n.map(a=>a.name))!==null&&r!==void 0?r:[]}`);i=t.pop()}return[t,i]}class i3{static build(t,n,r){if(t.name==="_inner")throw new n3("the _inner name is reserved");const i=(...o)=>{const[a,s]=oS(t,[...o]);Cee(t.accounts,s.accounts),MDe(t,...o);const u=i.accounts(s.accounts);return s.remainingAccounts!==void 0&&u.push(...s.remainingAccounts),jF("debug-logs")&&console.log("Outgoing account metas:",u),new nr({keys:u,programId:r,data:n(t.name,bSe(t,...a))})};return i.accounts=o=>i3.accountsArray(o,t.accounts,r,t.name),i}static accountsArray(t,n,r,i){return t?n.map(o=>{if(("accounts"in o?o.accounts:void 0)!==void 0){const s=t[o.name];return i3.accountsArray(s,o.accounts,r,i).flat()}else{const s=o;let u;try{u=Ua(t[o.name])}catch{throw new Error(`Wrong input type for account "${o.name}" in the instruction accounts object${i!==void 0?' for instruction "'+i+'"':""}. Expected PublicKey or string.`)}const l=s.isOptional&&u.equals(r),c=s.isMut&&!l,d=s.isSigner&&!l;return{pubkey:u,isWritable:c,isSigner:d}}}).flat():[]}}function MDe(e,...t){}class SDe{static build(t,n){return(...i)=>{var o,a,s;const[,u]=oS(t,[...i]),l=new xn;if(u.preInstructions&&u.instructions)throw new Error("instructions is deprecated, use preInstructions");return(o=u.preInstructions)===null||o===void 0||o.forEach(c=>l.add(c)),(a=u.instructions)===null||a===void 0||a.forEach(c=>l.add(c)),l.add(n(...i)),(s=u.postInstructions)===null||s===void 0||s.forEach(c=>l.add(c)),l}}}class DDe{static build(t,n,r,i){return async(...a)=>{var s;const u=n(...a),[,l]=oS(t,[...a]);if(i.sendAndConfirm===void 0)throw new Error("This function requires 'Provider.sendAndConfirm' to be implemented.");try{return await i.sendAndConfirm(u,(s=l.signers)!==null&&s!==void 0?s:[],l.options)}catch(c){throw Nee(c,r)}}}}class CDe{static build(t,n,r,i){var o;const a={};return(o=t.accounts)===null||o===void 0||o.forEach(s=>{const u=Hr(s.name);a[u]=new LDe(t,s,r,i,n)}),a}}class LDe{get size(){return this._size}get programId(){return this._programId}get provider(){return this._provider}get coder(){return this._coder}get idlAccount(){return this._idlAccount}constructor(t,n,r,i,o){this._idlAccount=n,this._programId=r,this._provider=i??t3(),this._coder=o??new HF(t),this._size=this._coder.accounts.size(n)}async fetchNullable(t,n){const{data:r}=await this.fetchNullableAndContext(t,n);return r}async fetchNullableAndContext(t,n){const r=await this.getAccountInfoAndContext(t,n),{value:i,context:o}=r;return{data:i&&i.data.length!==0?this._coder.accounts.decode(this._idlAccount.name,i.data):null,context:o}}async fetch(t,n){const{data:r}=await this.fetchNullableAndContext(t,n);if(r===null)throw new Error(`Account does not exist or has no data ${t.toString()}`);return r}async fetchAndContext(t,n){const{data:r,context:i}=await this.fetchNullableAndContext(t,n);if(r===null)throw new Error(`Account does not exist ${t.toString()}`);return{data:r,context:i}}async fetchMultiple(t,n){return(await this.fetchMultipleAndContext(t,n)).map(i=>i?i.data:null)}async fetchMultipleAndContext(t,n){return(await zF(this._provider.connection,t.map(i=>Ua(i)),n)).map(i=>{if(i==null)return null;const{account:o,context:a}=i;return{data:this._coder.accounts.decode(this._idlAccount.name,o.data),context:a}})}async all(t){const n=this.coder.accounts.memcmp(this._idlAccount.name,t instanceof Be.Buffer?t:void 0),r=[];return n?.offset!=null&&n?.bytes!=null&&r.push({memcmp:{offset:n.offset,bytes:n.bytes}}),n?.dataSize!=null&&r.push({dataSize:n.dataSize}),(await this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[...r,...Array.isArray(t)?t:[]]})).map(({pubkey:o,account:a})=>({publicKey:o,account:this._coder.accounts.decode(this._idlAccount.name,a.data)}))}subscribe(t,n){const r=py.get(t.toString());if(r)return r.ee;const i=new Mee;t=Ua(t);const o=this._provider.connection.onAccountChange(t,a=>{const s=this._coder.accounts.decode(this._idlAccount.name,a.data);i.emit("change",s)},n);return py.set(t.toString(),{ee:i,listener:o}),i}async unsubscribe(t){let n=py.get(t.toString());if(!n){console.warn("Address is not subscribed");return}py&&await this._provider.connection.removeAccountChangeListener(n.listener).then(()=>{py.delete(t.toString())}).catch(console.error)}async createInstruction(t,n){const r=this.size;if(this._provider.publicKey===void 0)throw new Error("This function requires the Provider interface implementor to have a 'publicKey' field.");return ai.createAccount({fromPubkey:this._provider.publicKey,newAccountPubkey:t.publicKey,space:n??r,lamports:await this._provider.connection.getMinimumBalanceForRentExemption(n??r),programId:this._programId})}async associated(...t){const n=await this.associatedAddress(...t);return await this.fetch(n)}async associatedAddress(...t){return await Kee(this._programId,...t)}async getAccountInfo(t,n){return await this._provider.connection.getAccountInfo(Ua(t),n)}async getAccountInfoAndContext(t,n){return await this._provider.connection.getAccountInfoAndContext(Ua(t),n)}}const py=new Map,t6="Program log: ",qee="Program data: ",kDe=t6.length,BDe=qee.length;class Yee{constructor(t,n,r){this._programId=t,this._provider=n,this._eventParser=new Jee(t,r),this._eventCallbacks=new Map,this._eventListeners=new Map,this._listenerIdCount=0}addEventListener(t,n){var r;let i=this._listenerIdCount;return this._listenerIdCount+=1,this._eventListeners.has(t)||this._eventListeners.set(t,[]),this._eventListeners.set(t,((r=this._eventListeners.get(t))!==null&&r!==void 0?r:[]).concat(i)),this._eventCallbacks.set(i,[t,n]),this._onLogsSubscriptionId!==void 0||(this._onLogsSubscriptionId=this._provider.connection.onLogs(this._programId,(o,a)=>{if(!o.err)for(const s of this._eventParser.parseLogs(o.logs)){const u=this._eventListeners.get(s.name);u&&u.forEach(l=>{const c=this._eventCallbacks.get(l);if(c){const[,d]=c;d(s.data,a.slot,o.signature)}})}})),i}async removeEventListener(t){const n=this._eventCallbacks.get(t);if(!n)throw new Error(`Event listener ${t} doesn't exist!`);const[r]=n;let i=this._eventListeners.get(r);if(!i)throw new Error(`Event listeners don't exist for ${r}!`);if(this._eventCallbacks.delete(t),i=i.filter(o=>o!==t),this._eventListeners.set(r,i),i.length===0&&this._eventListeners.delete(r),this._eventCallbacks.size===0){if(this._eventListeners.size!==0)throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);this._onLogsSubscriptionId!==void 0&&(await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId),this._onLogsSubscriptionId=void 0)}}}class Jee{constructor(t,n){this.coder=n,this.programId=t}*parseLogs(t,n=!1){const r=new xDe(t),i=new TDe;let o=r.next();for(;o!==null;){let[a,s,u]=this.handleLog(i,o,n);a&&(yield a),s&&i.push(s),u&&i.pop(),o=r.next()}}handleLog(t,n,r){return t.stack.length>0&&t.program()===this.programId.toString()?this.handleProgramLog(n,r):[null,...this.handleSystemLog(n)]}handleProgramLog(t,n){if(t.startsWith(t6)||t.startsWith(qee)){const r=t.startsWith(t6)?t.slice(kDe):t.slice(BDe),i=this.coder.events.decode(r);if(n&&i===null)throw new Error(`Unable to decode event ${r}`);return[i,null,!1]}else return[null,...this.handleSystemLog(t)]}handleSystemLog(t){const n=t.split(":")[0];return n.match(/^Program (.*) success/g)!==null?[null,!0]:n.startsWith(`Program ${this.programId.toString()} invoke`)?[this.programId.toString(),!1]:n.includes("invoke")?["cpi",!1]:[null,!1]}}class TDe{constructor(){this.stack=[]}program(){if(!this.stack.length)throw new Error("Expected the stack to have elements");return this.stack[this.stack.length-1]}push(t){this.stack.push(t)}pop(){if(!this.stack.length)throw new Error("Expected the stack to have elements");this.stack.pop()}}class xDe{constructor(t){this.logs=t}next(){if(this.logs.length===0)return null;let t=this.logs[0];return this.logs=this.logs.slice(1),t}}class NDe{static build(t,n,r,i,o,a,s){return async(...l)=>{var c;const d=n(...l),[,f]=oS(t,[...l]);let h;if(i.simulate===void 0)throw new Error("This function requires 'Provider.simulate' to be implemented.");try{h=await i.simulate(d,f.signers,(c=f.options)===null||c===void 0?void 0:c.commitment)}catch(y){throw Nee(y,r)}if(h===void 0)throw new Error("Unable to simulate transaction");const g=h.logs;if(!g)throw new Error("Simulated logs not found");const b=[];if(s.events){let y=new Jee(a,o);for(const M of y.parseLogs(g))b.push(M)}return{events:b,raw:g}}}}function rL(e){return new Vee(om(8),t=>FDe.fromBuffer(t),t=>t.toBuffer(),e)}function mI(e){return new Vee(om(32),t=>new _e(t),t=>t.toBuffer(),e)}function iL(e,t){return new ODe(e,t)}class Vee extends nS{constructor(t,n,r,i){super(t.span,i),this.layout=t,this.decoder=n,this.encoder=r}decode(t,n){return this.decoder(this.layout.decode(t,n))}encode(t,n,r){return this.layout.encode(this.encoder(t),n,r)}getSpan(t,n){return this.layout.getSpan(t,n)}}class ODe extends nS{constructor(t,n){super(-1,n),this.layout=t,this.discriminator=Pu()}encode(t,n,r=0){return t==null?this.layout.span+this.discriminator.encode(0,n,r):(this.discriminator.encode(1,n,r),this.layout.encode(t,n,r+4)+4)}decode(t,n=0){const r=this.discriminator.decode(t,n);if(r===0)return null;if(r===1)return this.layout.decode(t,n+4);throw new Error("Invalid coption "+this.layout.property)}getSpan(t,n=0){return this.layout.getSpan(t,n+4)+4}}let FDe=class Wee extends oh{toBuffer(){const t=super.toArray().reverse(),n=Be.Buffer.from(t);if(n.length===8)return n;if(n.length>=8)throw new Error("u64 too large");const r=Be.Buffer.alloc(8);return n.copy(r),r}static fromBuffer(t){if(t.length!==8)throw new Error(`Invalid buffer length: ${t.length}`);return new Wee([...t].reverse().map(n=>`00${n.toString(16)}`.slice(-2)).join(""),16)}};const UDe=Oi([mI("mint"),mI("owner"),rL("amount"),iL(mI(),"delegate"),(e=>{const t=Hee(oDe("discriminator"),null,e);return t.addVariant(0,Oi([]),"uninitialized"),t.addVariant(1,Oi([]),"initialized"),t.addVariant(2,Oi([]),"frozen"),t})("state"),iL(rL(),"isNative"),rL("delegatedAmount"),iL(mI(),"closeAuthority")]);function RDe(e){return UDe.decode(e)}class ib{constructor(t,n,r,i,o,a,s,u){this._accounts=n,this._provider=r,this._programId=i,this._idlIx=o,this._idlTypes=s,this._customResolver=u,this._args=t,this._accountStore=new PDe(r,a,this._programId)}args(t){this._args=t}async resolve(){for(await this.resolveConst(this._idlIx.accounts),this._resolveEventCpi(this._idlIx.accounts);await this.resolvePdas(this._idlIx.accounts)+await this.resolveRelations(this._idlIx.accounts)+await this.resolveCustom()>0;);}async resolveCustom(){if(this._customResolver){const{accounts:t,resolved:n}=await this._customResolver({args:this._args,accounts:this._accounts,provider:this._provider,programId:this._programId,idlIx:this._idlIx});return this._accounts=t,n}return 0}resolveOptionalsHelper(t,n){const r={};for(const i of n){const o=i.name,a=t[o];a!==void 0&&(Zee(a)?vDe(i)?r[o]=this.resolveOptionalsHelper(a,i.accounts):r[o]=Xee(a,!0):a!==null?r[o]=Ua(a):i.isOptional&&(r[o]=this._programId))}return r}resolveOptionals(t){Object.assign(this._accounts,this.resolveOptionalsHelper(t,this._idlIx.accounts))}get(t){const n=t.reduce((r,i)=>r&&r[i],this._accounts);if(n&&n.toBase58)return n}set(t,n){let r=this._accounts;t.forEach((i,o)=>{o==t.length-1&&(r[i]=n),r[i]=r[i]||{},r=r[i]})}async resolveConst(t,n=[]){for(let r=0;r0&&!this.get([...n,u])&&await this.autoPopulatePda(s,n)&&(r+=1)}return r}async resolveRelations(t,n=[]){let r=0;for(let i=0;i!this.get([...n,Hr(f)]));if(r+=d.length,d.length>0){const f=await this._accountStore.fetchAccount({publicKey:c});await Promise.all(d.map(async h=>{const g=Hr(h);return this.set([...n,g],f[g]),f[g]}))}}}return r}async autoPopulatePda(t,n=[]){if(!t.pda||!t.pda.seeds)throw new Error("Must have seeds");const r=await Promise.all(t.pda.seeds.map(a=>this.toBuffer(a,n)));if(r.some(a=>typeof a>"u"))return;const i=await this.parseProgramId(t,n);if(!i)return;const[o]=await _e.findProgramAddress(r,i);this.set([...n,Hr(t.name)],o)}async parseProgramId(t,n=[]){var r;if(!(!((r=t.pda)===null||r===void 0)&&r.programId))return this._programId;switch(t.pda.programId.kind){case"const":return new _e(this.toBufferConst(t.pda.programId.value));case"arg":return this.argValue(t.pda.programId);case"account":return await this.accountValue(t.pda.programId,n);default:throw new Error(`Unexpected program seed kind: ${t.pda.programId.kind}`)}}async toBuffer(t,n=[]){switch(t.kind){case"const":return this.toBufferConst(t);case"arg":return await this.toBufferArg(t);case"account":return await this.toBufferAccount(t,n);default:throw new Error(`Unexpected seed kind: ${t.kind}`)}}getType(t,n=[]){if(n.length>0&&t.defined){const r=this._idlTypes.find(a=>a.name===t.defined);if(!r)throw new Error(`Cannot find type ${t.defined}`);const o=r.type.fields.find(a=>a.name===n[0]);return this.getType(o.type,n.slice(1))}return t}toBufferConst(t){return this.toBufferValue(this.getType(t.type,(t.path||"").split(".").slice(1)),t.value)}async toBufferArg(t){const n=this.argValue(t);if(!(typeof n>"u"))return this.toBufferValue(this.getType(t.type,(t.path||"").split(".").slice(1)),n)}argValue(t){const n=t.path.split("."),r=Hr(n[0]),i=this._idlIx.args.findIndex(o=>o.name===r);if(i===-1)throw new Error(`Unable to find argument for seed: ${r}`);return n.slice(1).reduce((o,a)=>(o||{})[a],this._args[i])}async toBufferAccount(t,n=[]){const r=await this.accountValue(t,n);if(r)return this.toBufferValue(t.type,r)}async accountValue(t,n=[]){const r=t.path.split("."),i=r[0],o=this.get([...n,Hr(i)]);if(o===null)throw new Error("fieldPubkey is null");if(r.length===1)return o;const a=await this._accountStore.fetchAccount({publicKey:o,name:t.account});return this.parseAccountValue(a,r.slice(1))}parseAccountValue(t,n){let r;for(;n.length>0;)r=t[Hr(n[0])],n=n.slice(1);return r}toBufferValue(t,n){switch(t){case"u8":return Be.Buffer.from([n]);case"u16":let r=Be.Buffer.alloc(2);return r.writeUInt16LE(n),r;case"u32":let i=Be.Buffer.alloc(4);return i.writeUInt32LE(n),i;case"u64":let o=Be.Buffer.alloc(8);return o.writeBigUInt64LE(BigInt(n)),o;case"string":return Be.Buffer.from(Dee(n));case"publicKey":return n.toBuffer();default:if(t.array)return Be.Buffer.from(n);throw new Error(`Unexpected seed type: ${t}`)}}}ib.CONST_ACCOUNTS={associatedTokenProgram:QF,rent:ch,systemProgram:ai.programId,tokenProgram:KF,clock:Us};class PDe{constructor(t,n,r){this._provider=t,this._programId=r,this._cache=new Map,this._idls={},this._idls[r.toBase58()]=n}async ensureIdl(t){if(!this._idls[t.toBase58()]){const n=await ob.fetchIdl(t,this._provider);if(n){const r=new ob(n,t,this._provider);this._idls[t.toBase58()]=r.account}}return this._idls[t.toBase58()]}async fetchAccount({publicKey:t,name:n,programId:r=this._programId}){const i=t.toString();if(!this._cache.has(i))if(n==="TokenAccount"){const o=await this._provider.connection.getAccountInfo(t);if(o===null)throw new Error(`invalid account info for ${i}`);const a=RDe(o.data);this._cache.set(i,a)}else if(n){const o=await this.ensureIdl(r);if(o){const a=o[Hr(n)];if(a){const s=await a.fetch(t);this._cache.set(i,s)}}}else{const o=await this._provider.connection.getAccountInfo(t);if(o===null)throw new Error(`invalid account info for ${i}`);const a=o.data,s=await this.ensureIdl(o.owner);if(s){const u=Object.values(s)[0];if(!u)throw new Error("No accounts for this program");const l=u.coder.accounts.decodeAny(a);this._cache.set(i,l)}}return this._cache.get(i)}}class zDe{static build(t,n,r,i,o,a,s,u,l,c,d){return(...f)=>new jDe(f,i,o,a,s,u,t,n,r,l,c,d)}}function Zee(e){return typeof e=="object"&&e!==null&&!("_bn"in e)}function Xee(e,t){const n={};for(const r in e){const i=e[r];if(i===null){if(t)throw new Error("Failed to resolve optionals due to IDL type mismatch with input accounts!");continue}n[r]=Zee(i)?Xee(i,!0):Ua(i)}return n}class jDe{constructor(t,n,r,i,o,a,s,u,l,c,d,f){this._ixFn=n,this._txFn=r,this._rpcFn=i,this._simulateFn=o,this._viewFn=a,this._programId=u,this._accounts={},this._remainingAccounts=[],this._signers=[],this._preInstructions=[],this._postInstructions=[],this._autoResolveAccounts=!0,this._args=t,this._accountsResolver=new ib(t,this._accounts,s,u,l,c,d,f)}args(t){this._args=t,this._accountsResolver.args(t)}async pubkeys(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._accounts}accounts(t){return this._autoResolveAccounts=!0,this._accountsResolver.resolveOptionals(t),this}accountsStrict(t){return this._autoResolveAccounts=!1,this._accountsResolver.resolveOptionals(t),this}signers(t){return this._signers=this._signers.concat(t),this}remainingAccounts(t){return this._remainingAccounts=this._remainingAccounts.concat(t),this}preInstructions(t){return this._preInstructions=this._preInstructions.concat(t),this}postInstructions(t){return this._postInstructions=this._postInstructions.concat(t),this}async rpc(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._rpcFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async rpcAndKeys(t){return{pubkeys:await this.pubkeys(),signature:await this.rpc(t)}}async view(t){if(this._autoResolveAccounts&&await this._accountsResolver.resolve(),!this._viewFn)throw new Error("Method does not support views");return this._viewFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async simulate(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._simulateFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async instruction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._ixFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}async prepare(){return{instruction:await this.instruction(),pubkeys:await this.pubkeys(),signers:await this._signers}}async transaction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._txFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}}class GDe{static build(t,n,r,i){const o=n.accounts.find(u=>u.isMut),a=!!n.returns;return o||!a?void 0:async(...u)=>{var l,c;let d=await r(...u);const f=`Program return: ${t} `;let h=d.raw.find(M=>M.startsWith(f));if(!h)throw new Error("View expected return log");let g=FF(h.slice(f.length)),b=n.returns;if(!b)throw new Error("View expected return type");return Zo.fieldLayout({type:b},Array.from([...(l=i.accounts)!==null&&l!==void 0?l:[],...(c=i.types)!==null&&c!==void 0?c:[]])).decode(g)}}}class HDe{static build(t,n,r,i,o){const a={},s={},u={},l={},c={},d={},f=ySe(t),h=t.accounts?CDe.build(t,n,r,i):{};return t.instructions.forEach(g=>{const b=i3.build(g,(R,m)=>n.instruction.encode(R,m),r),y=SDe.build(g,b),M=DDe.build(g,y,f,i),E=NDe.build(g,y,f,i,n,r,t),k=GDe.build(r,g,E,t),C=zDe.build(i,r,g,b,y,M,E,k,h,t.types||[],o&&o(g)),H=Hr(g.name);s[H]=b,u[H]=y,a[H]=M,l[H]=E,c[H]=C,k&&(d[H]=k)}),[a,s,u,h,l,c,d]}}class ob{get programId(){return this._programId}get idl(){return this._idl}get coder(){return this._coder}get provider(){return this._provider}constructor(t,n,r,i,o){n=Ua(n),r||(r=t3()),this._idl=t,this._provider=r,this._programId=n,this._coder=i??new HF(t),this._events=new Yee(this._programId,r,this._coder);const[a,s,u,l,c,d,f]=HDe.build(t,this._coder,n,r,o??(()=>{}));this.rpc=a,this.instruction=s,this.transaction=u,this.account=l,this.simulate=c,this.methods=d,this.views=f}static async at(t,n){const r=Ua(t),i=await ob.fetchIdl(r,n);if(!i)throw new Error(`IDL not found for program: ${t.toString()}`);return new ob(i,r,n)}static async fetchIdl(t,n){n=n??t3();const r=Ua(t),i=await wDe(r),o=await n.connection.getAccountInfo(i);if(!o)return null;let a=EDe(o.data.slice(8));const s=oSe(a.data);return JSON.parse(See(s))}addEventListener(t,n){return this._events.addEventListener(t,n)}async removeEventListener(t){return await this._events.removeEventListener(t)}}new _e("11111111111111111111111111111111");function qF(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function _ee(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?qF(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function ab(e,t){t||(t=e.reduce((i,o)=>i+o.length,0));const n=_ee(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return qF(n)}function KDe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,C=new Uint8Array(k);M!==E;){for(var H=g[M],R=0,m=k-1;(H!==0||R>>0,C[m]=H%s>>>0,H=H/s>>>0;if(H!==0)throw new Error("Non-zero carry");y=R,M++}for(var w=k-y;w!==k&&C[w]===0;)w++;for(var G=u.repeat(b);w>>0,k=new Uint8Array(E);g[b];){var C=n[g.charCodeAt(b)];if(C===255)return;for(var H=0,R=E-1;(C!==0||H>>0,k[R]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");M=H,b++}if(g[b]!==" "){for(var m=E-M;m!==E&&k[m]===0;)m++;for(var w=new Uint8Array(y+(E-m)),G=y;m!==E;)w[G++]=k[m++];return w}}}function h(g){var b=f(g);if(b)return b;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:f,decode:h}}var QDe=KDe,qDe=QDe;const YDe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},JDe=e=>new TextEncoder().encode(e),VDe=e=>new TextDecoder().decode(e);class WDe{constructor(t,n,r){this.name=t,this.prefix=n,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class ZDe{constructor(t,n,r){if(this.name=t,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return $ee(this,t)}}class XDe{constructor(t){this.decoders=t}or(t){return $ee(this,t)}decode(t){const n=t[0],r=this.decoders[n];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const $ee=(e,t)=>new XDe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _De{constructor(t,n,r,i){this.name=t,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new WDe(t,n,r),this.decoder=new ZDe(t,n,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const aS=({name:e,prefix:t,encode:n,decode:r})=>new _De(e,t,n,r),am=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=qDe(n,t);return aS({prefix:e,name:t,encode:r,decode:o=>YDe(i(o))})},$De=(e,t,n,r)=>{const i={};for(let c=0;c=8&&(s-=8,a[l++]=255&u>>s)}if(s>=n||255&u<<8-s)throw new SyntaxError("Unexpected end of data");return a},eCe=(e,t,n)=>{const r=t[t.length-1]==="=",i=(1<n;)a-=n,o+=t[i&s>>a];if(a&&(o+=t[i&s<aS({prefix:t,name:e,encode(i){return eCe(i,r,n)},decode(i){return $De(i,r,n,e)}}),tCe=aS({prefix:"\0",name:"identity",encode:e=>VDe(e),decode:e=>JDe(e)}),nCe=Object.freeze(Object.defineProperty({__proto__:null,identity:tCe},Symbol.toStringTag,{value:"Module"})),rCe=lo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),iCe=Object.freeze(Object.defineProperty({__proto__:null,base2:rCe},Symbol.toStringTag,{value:"Module"})),oCe=lo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),aCe=Object.freeze(Object.defineProperty({__proto__:null,base8:oCe},Symbol.toStringTag,{value:"Module"})),sCe=am({prefix:"9",name:"base10",alphabet:"0123456789"}),cCe=Object.freeze(Object.defineProperty({__proto__:null,base10:sCe},Symbol.toStringTag,{value:"Module"})),uCe=lo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),lCe=lo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),dCe=Object.freeze(Object.defineProperty({__proto__:null,base16:uCe,base16upper:lCe},Symbol.toStringTag,{value:"Module"})),fCe=lo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),hCe=lo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gCe=lo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),pCe=lo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),yCe=lo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),bCe=lo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),mCe=lo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),vCe=lo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),wCe=lo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),ACe=Object.freeze(Object.defineProperty({__proto__:null,base32:fCe,base32hex:yCe,base32hexpad:mCe,base32hexpadupper:vCe,base32hexupper:bCe,base32pad:gCe,base32padupper:pCe,base32upper:hCe,base32z:wCe},Symbol.toStringTag,{value:"Module"})),ICe=am({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ECe=am({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),MCe=Object.freeze(Object.defineProperty({__proto__:null,base36:ICe,base36upper:ECe},Symbol.toStringTag,{value:"Module"})),SCe=am({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),DCe=am({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),CCe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:SCe,base58flickr:DCe},Symbol.toStringTag,{value:"Module"})),LCe=lo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),kCe=lo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),BCe=lo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),TCe=lo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),xCe=Object.freeze(Object.defineProperty({__proto__:null,base64:LCe,base64pad:kCe,base64url:BCe,base64urlpad:TCe},Symbol.toStringTag,{value:"Module"})),ete=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),NCe=ete.reduce((e,t,n)=>(e[n]=t,e),[]),OCe=ete.reduce((e,t,n)=>(e[t.codePointAt(0)]=n,e),[]);function FCe(e){return e.reduce((t,n)=>(t+=NCe[n],t),"")}function UCe(e){const t=[];for(const n of e){const r=OCe[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);t.push(r)}return new Uint8Array(t)}const RCe=aS({prefix:"🚀",name:"base256emoji",encode:FCe,decode:UCe}),PCe=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:RCe},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const N7={...nCe,...iCe,...aCe,...cCe,...dCe,...ACe,...MCe,...CCe,...xCe,...PCe};function tte(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const O7=tte("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),oL=tte("ascii","a",e=>{let t="a";for(let n=0;n{e=e.substring(1);const t=_ee(e.length);for(let n=0;n>>16&65535,c=s&65535,d=u>>>16&65535,f=u&65535;return c*f+(l*f+c*d<<16>>>0)|0}e.mul=Math.imul||t;function n(s,u){return s+u|0}e.add=n;function r(s,u){return s-u|0}e.sub=r;function i(s,u){return s<>>32-u}e.rotl=i;function o(s,u){return s<<32-u|s>>>u}e.rotr=o;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})(ite);Object.defineProperty(dn,"__esModule",{value:!0});var ote=ite;function zCe(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}dn.readInt16BE=zCe;function jCe(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}dn.readUint16BE=jCe;function GCe(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}dn.readInt16LE=GCe;function HCe(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}dn.readUint16LE=HCe;function ate(e,t,n){return t===void 0&&(t=new Uint8Array(2)),n===void 0&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}dn.writeUint16BE=ate;dn.writeInt16BE=ate;function ste(e,t,n){return t===void 0&&(t=new Uint8Array(2)),n===void 0&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}dn.writeUint16LE=ste;dn.writeInt16LE=ste;function n6(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}dn.readInt32BE=n6;function r6(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}dn.readUint32BE=r6;function i6(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}dn.readInt32LE=i6;function o6(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}dn.readUint32LE=o6;function o3(e,t,n){return t===void 0&&(t=new Uint8Array(4)),n===void 0&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}dn.writeUint32BE=o3;dn.writeInt32BE=o3;function a3(e,t,n){return t===void 0&&(t=new Uint8Array(4)),n===void 0&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}dn.writeUint32LE=a3;dn.writeInt32LE=a3;function KCe(e,t){t===void 0&&(t=0);var n=n6(e,t),r=n6(e,t+4);return n*4294967296+r-(r>>31)*4294967296}dn.readInt64BE=KCe;function QCe(e,t){t===void 0&&(t=0);var n=r6(e,t),r=r6(e,t+4);return n*4294967296+r}dn.readUint64BE=QCe;function qCe(e,t){t===void 0&&(t=0);var n=i6(e,t),r=i6(e,t+4);return r*4294967296+n-(n>>31)*4294967296}dn.readInt64LE=qCe;function YCe(e,t){t===void 0&&(t=0);var n=o6(e,t),r=o6(e,t+4);return r*4294967296+n}dn.readUint64LE=YCe;function cte(e,t,n){return t===void 0&&(t=new Uint8Array(8)),n===void 0&&(n=0),o3(e/4294967296>>>0,t,n),o3(e>>>0,t,n+4),t}dn.writeUint64BE=cte;dn.writeInt64BE=cte;function ute(e,t,n){return t===void 0&&(t=new Uint8Array(8)),n===void 0&&(n=0),a3(e>>>0,t,n),a3(e/4294967296>>>0,t,n+4),t}dn.writeUint64LE=ute;dn.writeInt64LE=ute;function JCe(e,t,n){if(n===void 0&&(n=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r}dn.readUintBE=JCe;function VCe(e,t,n){if(n===void 0&&(n=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o=r;o--)n[o]=t/i&255,i*=256;return n}dn.writeUintBE=WCe;function ZCe(e,t,n,r){if(n===void 0&&(n=new Uint8Array(e/8)),r===void 0&&(r=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!ote.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=u[c++],l--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(c=o(this._temp,this._state,u,c,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=u[c++],l--;return this},s.prototype.finish=function(u){if(!this._finished){var l=this._bytesHashed,c=this._bufferLength,d=l/536870912|0,f=l<<3,h=l%64<56?64:128;this._buffer[c]=128;for(var g=c+1;g0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(u){return this._state.set(u.state),this._bufferLength=u.bufferLength,u.buffer&&this._buffer.set(u.buffer),this._bytesHashed=u.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(u){n.wipe(u.state),u.buffer&&n.wipe(u.buffer),u.bufferLength=0,u.bytesHashed=0},s}();e.SHA256=r;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 o(s,u,l,c,d){for(;d>=64;){for(var f=u[0],h=u[1],g=u[2],b=u[3],y=u[4],M=u[5],E=u[6],k=u[7],C=0;C<16;C++){var H=c+C*4;s[C]=t.readUint32BE(l,H)}for(var C=16;C<64;C++){var R=s[C-2],m=(R>>>17|R<<32-17)^(R>>>19|R<<32-19)^R>>>10;R=s[C-15];var w=(R>>>7|R<<32-7)^(R>>>18|R<<32-18)^R>>>3;s[C]=(m+s[C-7]|0)+(w+s[C-16]|0)}for(var C=0;C<64;C++){var m=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&M^~y&E)|0)+(k+(i[C]+s[C]|0)|0)|0,w=((f>>>2|f<<32-2)^(f>>>13|f<<32-13)^(f>>>22|f<<32-22))+(f&h^f&g^h&g)|0;k=E,E=M,M=y,y=b+m|0,b=g,g=h,h=f,f=m+w|0}u[0]+=f,u[1]+=h,u[2]+=g,u[3]+=b,u[4]+=y,u[5]+=M,u[6]+=E,u[7]+=k,c+=64,d-=64}return c}function a(s){var u=new r;u.update(s);var l=u.digest();return u.clean(),l}e.hash=a})(rte);var Wh={},sS={},cS={};Object.defineProperty(cS,"__esModule",{value:!0});cS.BrowserRandomSource=void 0;const F7=65536;class a8e{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const n=new Uint8Array(t);for(let r=0;rc8e)throw new RangeError("requested too many random bytes");var n=l8e.allocUnsafe(e);if(e>0)if(e>aL)for(var r=0;r0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")U7(u,this,n);else for(var l=u.length,c=yte(u,l),r=0;r0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,f8e(s)}return e}mr.prototype.addListener=function(t,n){return fte(this,t,n,!1)};mr.prototype.on=mr.prototype.addListener;mr.prototype.prependListener=function(t,n){return fte(this,t,n,!0)};function h8e(){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 hte(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h8e.bind(r);return i.listener=n,r.wrapFn=i,i}mr.prototype.once=function(t,n){return lS(n),this.on(t,hte(this,t,n)),this};mr.prototype.prependOnceListener=function(t,n){return lS(n),this.prependListener(t,hte(this,t,n)),this};mr.prototype.removeListener=function(t,n){var r,i,o,a,s;if(lS(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():g8e(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this};mr.prototype.off=mr.prototype.removeListener;mr.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),a;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function gte(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?p8e(i):yte(i,i.length)}mr.prototype.listeners=function(t){return gte(this,t,!0)};mr.prototype.rawListeners=function(t){return gte(this,t,!1)};mr.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):pte.call(e,t)};mr.prototype.listenerCount=pte;function pte(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}mr.prototype.eventNames=function(){return this._eventsCount>0?NE(this._events):[]};function yte(e,t){for(var n=new Array(t),r=0;r"u"||!zi?On:zi(Uint8Array),Xf={"%AggregateError%":typeof AggregateError>"u"?On:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?On:ArrayBuffer,"%ArrayIteratorPrototype%":v0&&zi?zi([][Symbol.iterator]()):On,"%AsyncFromSyncIteratorPrototype%":On,"%AsyncFunction%":F0,"%AsyncGenerator%":F0,"%AsyncGeneratorFunction%":F0,"%AsyncIteratorPrototype%":F0,"%Atomics%":typeof Atomics>"u"?On:Atomics,"%BigInt%":typeof BigInt>"u"?On:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?On:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?On:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?On:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?On:Float32Array,"%Float64Array%":typeof Float64Array>"u"?On:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?On:FinalizationRegistry,"%Function%":Ate,"%GeneratorFunction%":F0,"%Int8Array%":typeof Int8Array>"u"?On:Int8Array,"%Int16Array%":typeof Int16Array>"u"?On:Int16Array,"%Int32Array%":typeof Int32Array>"u"?On:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v0&&zi?zi(zi([][Symbol.iterator]())):On,"%JSON%":typeof JSON=="object"?JSON:On,"%Map%":typeof Map>"u"?On:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v0||!zi?On:zi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?On:Promise,"%Proxy%":typeof Proxy>"u"?On:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?On:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?On:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v0||!zi?On:zi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?On:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v0&&zi?zi(""[Symbol.iterator]()):On,"%Symbol%":v0?Symbol:On,"%SyntaxError%":Hg,"%ThrowTypeError%":N8e,"%TypedArray%":F8e,"%TypeError%":yg,"%Uint8Array%":typeof Uint8Array>"u"?On:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?On:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?On:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?On:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?On:WeakMap,"%WeakRef%":typeof WeakRef>"u"?On:WeakRef,"%WeakSet%":typeof WeakSet>"u"?On:WeakSet};if(zi)try{null.error}catch(e){var U8e=zi(zi(e));Xf["%Error.prototype%"]=U8e}var R8e=function e(t){var n;if(t==="%AsyncFunction%")n=cL("async function () {}");else if(t==="%GeneratorFunction%")n=cL("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=cL("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&zi&&(n=zi(i.prototype))}return Xf[t]=n,n},H7={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},sm=wte,c3=x8e,P8e=sm.call(Function.call,Array.prototype.concat),z8e=sm.call(Function.apply,Array.prototype.splice),K7=sm.call(Function.call,String.prototype.replace),u3=sm.call(Function.call,String.prototype.slice),j8e=sm.call(Function.call,RegExp.prototype.exec),G8e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H8e=/\\(\\)?/g,K8e=function(t){var n=u3(t,0,1),r=u3(t,-1);if(n==="%"&&r!=="%")throw new Hg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hg("invalid intrinsic syntax, expected opening `%`");var i=[];return K7(t,G8e,function(o,a,s,u){i[i.length]=s?K7(u,H8e,"$1"):a||o}),i},Q8e=function(t,n){var r=t,i;if(c3(H7,r)&&(i=H7[r],r="%"+i[0]+"%"),c3(Xf,r)){var o=Xf[r];if(o===F0&&(o=R8e(r)),typeof o>"u"&&!n)throw new yg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Hg("intrinsic "+t+" does not exist!")},cm=function(t,n){if(typeof t!="string"||t.length===0)throw new yg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new yg('"allowMissing" argument must be a boolean');if(j8e(/^%?[^%]*%?$/,t)===null)throw new Hg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=K8e(t),i=r.length>0?r[0]:"",o=Q8e("%"+i+"%",n),a=o.name,s=o.value,u=!1,l=o.alias;l&&(i=l[0],z8e(r,P8e([0,1],l)));for(var c=1,d=!0;c=r.length){var b=Zf(s,f);d=!!b,d&&"get"in b&&!("originalValue"in b.get)?s=b.get:s=s[f]}else d=c3(s,f),s=s[f];d&&!u&&(Xf[a]=s)}}return s},Ite={exports:{}};(function(e){var t=wte,n=cm,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var f=o(t,i,arguments);if(a&&s){var h=a(f,"length");h.configurable&&s(f,"length",{value:1+u(0,d.length-(arguments.length-1))})}return f};var l=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(Ite);var fS=Ite.exports,Ete=cm,Mte=fS,q8e=Mte(Ete("String.prototype.indexOf")),hS=function(t,n){var r=Ete(t,!!n);return typeof r=="function"&&q8e(t,".prototype.")>-1?Mte(r):r},Y8e=VF(),J8e=hS,u6=J8e("Object.prototype.toString"),gS=function(t){return Y8e&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:u6(t)==="[object Arguments]"},Ste=function(t){return gS(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&u6(t)!=="[object Array]"&&u6(t.callee)==="[object Function]"},V8e=function(){return gS(arguments)}();gS.isLegacyArguments=Ste;var W8e=V8e?gS:Ste,Z8e=Object.prototype.toString,X8e=Function.prototype.toString,_8e=/^\s*(?:function)?\*/,Dte=VF(),lL=Object.getPrototypeOf,$8e=function(){if(!Dte)return!1;try{return Function("return function*() {}")()}catch{}},dL,eLe=function(t){if(typeof t!="function")return!1;if(_8e.test(X8e.call(t)))return!0;if(!Dte){var n=Z8e.call(t);return n==="[object GeneratorFunction]"}if(!lL)return!1;if(typeof dL>"u"){var r=$8e();dL=r?lL(r):!1}return lL(t)===dL},Cte=Function.prototype.toString,K0=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l6,OE;if(typeof K0=="function"&&typeof Object.defineProperty=="function")try{l6=Object.defineProperty({},"length",{get:function(){throw OE}}),OE={},K0(function(){throw 42},null,l6)}catch(e){e!==OE&&(K0=null)}else K0=null;var tLe=/^\s*class\b/,d6=function(t){try{var n=Cte.call(t);return tLe.test(n)}catch{return!1}},fL=function(t){try{return d6(t)?!1:(Cte.call(t),!0)}catch{return!1}},FE=Object.prototype.toString,nLe="[object Object]",rLe="[object Function]",iLe="[object GeneratorFunction]",oLe="[object HTMLAllCollection]",aLe="[object HTML document.all class]",sLe="[object HTMLCollection]",cLe=typeof Symbol=="function"&&!!Symbol.toStringTag,uLe=!(0 in[,]),f6=function(){return!1};if(typeof document=="object"){var lLe=document.all;FE.call(lLe)===FE.call(document.all)&&(f6=function(t){if((uLe||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=FE.call(t);return(n===oLe||n===aLe||n===sLe||n===nLe)&&t("")==null}catch{}return!1})}var dLe=K0?function(t){if(f6(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{K0(t,null,l6)}catch(n){if(n!==OE)return!1}return!d6(t)&&fL(t)}:function(t){if(f6(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(cLe)return fL(t);if(d6(t))return!1;var n=FE.call(t);return n!==rLe&&n!==iLe&&!/^\[object HTML/.test(n)?!1:fL(t)},fLe=dLe,hLe=Object.prototype.toString,Lte=Object.prototype.hasOwnProperty,gLe=function(t,n,r){for(var i=0,o=t.length;i=3&&(i=r),hLe.call(t)==="[object Array]"?gLe(t,n,i):typeof t=="string"?pLe(t,n,i):yLe(t,n,i)},mLe=bLe,hL=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],vLe=typeof globalThis>"u"?V:globalThis,wLe=function(){for(var t=[],n=0;n"u"?V:globalThis,h6=ILe(),ZF=WF("String.prototype.slice"),gL=Object.getPrototypeOf,MLe=WF("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r-1?n:n!=="Object"?!1:DLe(t)}return RE?SLe(t):null},CLe=Tte,LLe=function(t){return!!CLe(t)};(function(e){var t=W8e,n=eLe,r=Tte,i=LLe;function o(ce){return ce.call.bind(ce)}var a=typeof BigInt<"u",s=typeof Symbol<"u",u=o(Object.prototype.toString),l=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),d=o(Boolean.prototype.valueOf);if(a)var f=o(BigInt.prototype.valueOf);if(s)var h=o(Symbol.prototype.valueOf);function g(ce,ye){if(typeof ce!="object")return!1;try{return ye(ce),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function b(ce){return typeof Promise<"u"&&ce instanceof Promise||ce!==null&&typeof ce=="object"&&typeof ce.then=="function"&&typeof ce.catch=="function"}e.isPromise=b;function y(ce){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ce):i(ce)||Z(ce)}e.isArrayBufferView=y;function M(ce){return r(ce)==="Uint8Array"}e.isUint8Array=M;function E(ce){return r(ce)==="Uint8ClampedArray"}e.isUint8ClampedArray=E;function k(ce){return r(ce)==="Uint16Array"}e.isUint16Array=k;function C(ce){return r(ce)==="Uint32Array"}e.isUint32Array=C;function H(ce){return r(ce)==="Int8Array"}e.isInt8Array=H;function R(ce){return r(ce)==="Int16Array"}e.isInt16Array=R;function m(ce){return r(ce)==="Int32Array"}e.isInt32Array=m;function w(ce){return r(ce)==="Float32Array"}e.isFloat32Array=w;function G(ce){return r(ce)==="Float64Array"}e.isFloat64Array=G;function Y(ce){return r(ce)==="BigInt64Array"}e.isBigInt64Array=Y;function K(ce){return r(ce)==="BigUint64Array"}e.isBigUint64Array=K;function D(ce){return u(ce)==="[object Map]"}D.working=typeof Map<"u"&&D(new Map);function v(ce){return typeof Map>"u"?!1:D.working?D(ce):ce instanceof Map}e.isMap=v;function p(ce){return u(ce)==="[object Set]"}p.working=typeof Set<"u"&&p(new Set);function A(ce){return typeof Set>"u"?!1:p.working?p(ce):ce instanceof Set}e.isSet=A;function B(ce){return u(ce)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function O(ce){return typeof WeakMap>"u"?!1:B.working?B(ce):ce instanceof WeakMap}e.isWeakMap=O;function j(ce){return u(ce)==="[object WeakSet]"}j.working=typeof WeakSet<"u"&&j(new WeakSet);function U(ce){return j(ce)}e.isWeakSet=U;function N(ce){return u(ce)==="[object ArrayBuffer]"}N.working=typeof ArrayBuffer<"u"&&N(new ArrayBuffer);function P(ce){return typeof ArrayBuffer>"u"?!1:N.working?N(ce):ce instanceof ArrayBuffer}e.isArrayBuffer=P;function x(ce){return u(ce)==="[object DataView]"}x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1));function Z(ce){return typeof DataView>"u"?!1:x.working?x(ce):ce instanceof DataView}e.isDataView=Z;var ie=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q(ce){return u(ce)==="[object SharedArrayBuffer]"}function S(ce){return typeof ie>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new ie)),Q.working?Q(ce):ce instanceof ie)}e.isSharedArrayBuffer=S;function z(ce){return u(ce)==="[object AsyncFunction]"}e.isAsyncFunction=z;function I(ce){return u(ce)==="[object Map Iterator]"}e.isMapIterator=I;function F(ce){return u(ce)==="[object Set Iterator]"}e.isSetIterator=F;function T(ce){return u(ce)==="[object Generator]"}e.isGeneratorObject=T;function L(ce){return u(ce)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=L;function q(ce){return g(ce,l)}e.isNumberObject=q;function re(ce){return g(ce,c)}e.isStringObject=re;function se(ce){return g(ce,d)}e.isBooleanObject=se;function pe(ce){return a&&g(ce,f)}e.isBigIntObject=pe;function oe(ce){return s&&g(ce,h)}e.isSymbolObject=oe;function _(ce){return q(ce)||re(ce)||se(ce)||pe(ce)||oe(ce)}e.isBoxedPrimitive=_;function ee(ce){return typeof Uint8Array<"u"&&(P(ce)||S(ce))}e.isAnyArrayBuffer=ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ce){Object.defineProperty(e,ce,{enumerable:!1,value:function(){throw new Error(ce+" is not supported in userland")}})})})(vte);var kLe=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"};(function(e){var t=Object.getOwnPropertyDescriptors||function(Z){for(var ie=Object.keys(Z),Q={},S=0;S=S)return F;switch(F){case"%s":return String(Q[ie++]);case"%d":return Number(Q[ie++]);case"%j":try{return JSON.stringify(Q[ie++])}catch{return"[Circular]"}default:return F}}),I=Q[ie];ie"u")return function(){return e.deprecate(x,Z).apply(this,arguments)};var ie=!1;function Q(){if(!ie){if(Rt.throwDeprecation)throw new Error(Z);Rt.traceDeprecation?console.trace(Z):console.error(Z),ie=!0}return x.apply(this,arguments)}return Q};var r={},i=/^$/;if({GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG){var o={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}e.debuglog=function(x){if(x=x.toUpperCase(),!r[x])if(i.test(x)){var Z=Rt.pid;r[x]=function(){var ie=e.format.apply(e,arguments);console.error("%s %d: %s",x,Z,ie)}}else r[x]=function(){};return r[x]};function a(x,Z){var ie={seen:[],stylize:u};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),M(Z)?ie.showHidden=Z:Z&&e._extend(ie,Z),m(ie.showHidden)&&(ie.showHidden=!1),m(ie.depth)&&(ie.depth=2),m(ie.colors)&&(ie.colors=!1),m(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=s),c(ie,x,ie.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(x,Z){var ie=a.styles[Z];return ie?"\x1B["+a.colors[ie][0]+"m"+x+"\x1B["+a.colors[ie][1]+"m":x}function u(x,Z){return x}function l(x){var Z={};return x.forEach(function(ie,Q){Z[ie]=!0}),Z}function c(x,Z,ie){if(x.customInspect&&Z&&D(Z.inspect)&&Z.inspect!==e.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var Q=Z.inspect(ie,x);return H(Q)||(Q=c(x,Q,ie)),Q}var S=d(x,Z);if(S)return S;var z=Object.keys(Z),I=l(z);if(x.showHidden&&(z=Object.getOwnPropertyNames(Z)),K(Z)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return f(Z);if(z.length===0){if(D(Z)){var F=Z.name?": "+Z.name:"";return x.stylize("[Function"+F+"]","special")}if(w(Z))return x.stylize(RegExp.prototype.toString.call(Z),"regexp");if(Y(Z))return x.stylize(Date.prototype.toString.call(Z),"date");if(K(Z))return f(Z)}var T="",L=!1,q=["{","}"];if(y(Z)&&(L=!0,q=["[","]"]),D(Z)){var re=Z.name?": "+Z.name:"";T=" [Function"+re+"]"}if(w(Z)&&(T=" "+RegExp.prototype.toString.call(Z)),Y(Z)&&(T=" "+Date.prototype.toUTCString.call(Z)),K(Z)&&(T=" "+f(Z)),z.length===0&&(!L||Z.length==0))return q[0]+T+q[1];if(ie<0)return w(Z)?x.stylize(RegExp.prototype.toString.call(Z),"regexp"):x.stylize("[Object]","special");x.seen.push(Z);var se;return L?se=h(x,Z,ie,I,z):se=z.map(function(pe){return g(x,Z,ie,I,pe,L)}),x.seen.pop(),b(se,T,q)}function d(x,Z){if(m(Z))return x.stylize("undefined","undefined");if(H(Z)){var ie="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(ie,"string")}if(C(Z))return x.stylize(""+Z,"number");if(M(Z))return x.stylize(""+Z,"boolean");if(E(Z))return x.stylize("null","null")}function f(x){return"["+Error.prototype.toString.call(x)+"]"}function h(x,Z,ie,Q,S){for(var z=[],I=0,F=Z.length;Ic8e)throw new RangeError("requested too many random bytes");var n=l8e.allocUnsafe(e);if(e>0)if(e>aL)for(var r=0;r0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")U7(u,this,n);else for(var l=u.length,c=yte(u,l),r=0;r0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,f8e(s)}return e}mr.prototype.addListener=function(t,n){return fte(this,t,n,!1)};mr.prototype.on=mr.prototype.addListener;mr.prototype.prependListener=function(t,n){return fte(this,t,n,!0)};function h8e(){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 hte(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h8e.bind(r);return i.listener=n,r.wrapFn=i,i}mr.prototype.once=function(t,n){return lS(n),this.on(t,hte(this,t,n)),this};mr.prototype.prependOnceListener=function(t,n){return lS(n),this.prependListener(t,hte(this,t,n)),this};mr.prototype.removeListener=function(t,n){var r,i,o,a,s;if(lS(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():g8e(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this};mr.prototype.off=mr.prototype.removeListener;mr.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),a;for(i=0;i=0;i--)this.removeListener(t,n[i]);return this};function gte(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?p8e(i):yte(i,i.length)}mr.prototype.listeners=function(t){return gte(this,t,!0)};mr.prototype.rawListeners=function(t){return gte(this,t,!1)};mr.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):pte.call(e,t)};mr.prototype.listenerCount=pte;function pte(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}mr.prototype.eventNames=function(){return this._eventsCount>0?NE(this._events):[]};function yte(e,t){for(var n=new Array(t),r=0;r"u"||!zi?On:zi(Uint8Array),Xf={"%AggregateError%":typeof AggregateError>"u"?On:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?On:ArrayBuffer,"%ArrayIteratorPrototype%":v0&&zi?zi([][Symbol.iterator]()):On,"%AsyncFromSyncIteratorPrototype%":On,"%AsyncFunction%":F0,"%AsyncGenerator%":F0,"%AsyncGeneratorFunction%":F0,"%AsyncIteratorPrototype%":F0,"%Atomics%":typeof Atomics>"u"?On:Atomics,"%BigInt%":typeof BigInt>"u"?On:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?On:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?On:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?On:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?On:Float32Array,"%Float64Array%":typeof Float64Array>"u"?On:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?On:FinalizationRegistry,"%Function%":Ate,"%GeneratorFunction%":F0,"%Int8Array%":typeof Int8Array>"u"?On:Int8Array,"%Int16Array%":typeof Int16Array>"u"?On:Int16Array,"%Int32Array%":typeof Int32Array>"u"?On:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v0&&zi?zi(zi([][Symbol.iterator]())):On,"%JSON%":typeof JSON=="object"?JSON:On,"%Map%":typeof Map>"u"?On:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v0||!zi?On:zi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?On:Promise,"%Proxy%":typeof Proxy>"u"?On:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?On:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?On:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v0||!zi?On:zi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?On:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v0&&zi?zi(""[Symbol.iterator]()):On,"%Symbol%":v0?Symbol:On,"%SyntaxError%":Hg,"%ThrowTypeError%":N8e,"%TypedArray%":F8e,"%TypeError%":yg,"%Uint8Array%":typeof Uint8Array>"u"?On:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?On:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?On:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?On:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?On:WeakMap,"%WeakRef%":typeof WeakRef>"u"?On:WeakRef,"%WeakSet%":typeof WeakSet>"u"?On:WeakSet};if(zi)try{null.error}catch(e){var U8e=zi(zi(e));Xf["%Error.prototype%"]=U8e}var R8e=function e(t){var n;if(t==="%AsyncFunction%")n=cL("async function () {}");else if(t==="%GeneratorFunction%")n=cL("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=cL("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&zi&&(n=zi(i.prototype))}return Xf[t]=n,n},H7={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},sm=wte,c3=x8e,P8e=sm.call(Function.call,Array.prototype.concat),z8e=sm.call(Function.apply,Array.prototype.splice),K7=sm.call(Function.call,String.prototype.replace),u3=sm.call(Function.call,String.prototype.slice),j8e=sm.call(Function.call,RegExp.prototype.exec),G8e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H8e=/\\(\\)?/g,K8e=function(t){var n=u3(t,0,1),r=u3(t,-1);if(n==="%"&&r!=="%")throw new Hg("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Hg("invalid intrinsic syntax, expected opening `%`");var i=[];return K7(t,G8e,function(o,a,s,u){i[i.length]=s?K7(u,H8e,"$1"):a||o}),i},Q8e=function(t,n){var r=t,i;if(c3(H7,r)&&(i=H7[r],r="%"+i[0]+"%"),c3(Xf,r)){var o=Xf[r];if(o===F0&&(o=R8e(r)),typeof o>"u"&&!n)throw new yg("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Hg("intrinsic "+t+" does not exist!")},cm=function(t,n){if(typeof t!="string"||t.length===0)throw new yg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new yg('"allowMissing" argument must be a boolean');if(j8e(/^%?[^%]*%?$/,t)===null)throw new Hg("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=K8e(t),i=r.length>0?r[0]:"",o=Q8e("%"+i+"%",n),a=o.name,s=o.value,u=!1,l=o.alias;l&&(i=l[0],z8e(r,P8e([0,1],l)));for(var c=1,d=!0;c=r.length){var b=Zf(s,f);d=!!b,d&&"get"in b&&!("originalValue"in b.get)?s=b.get:s=s[f]}else d=c3(s,f),s=s[f];d&&!u&&(Xf[a]=s)}}return s},Ite={exports:{}};(function(e){var t=wte,n=cm,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var f=o(t,i,arguments);if(a&&s){var h=a(f,"length");h.configurable&&s(f,"length",{value:1+u(0,d.length-(arguments.length-1))})}return f};var l=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(Ite);var fS=Ite.exports,Ete=cm,Mte=fS,q8e=Mte(Ete("String.prototype.indexOf")),hS=function(t,n){var r=Ete(t,!!n);return typeof r=="function"&&q8e(t,".prototype.")>-1?Mte(r):r},Y8e=VF(),J8e=hS,u6=J8e("Object.prototype.toString"),gS=function(t){return Y8e&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:u6(t)==="[object Arguments]"},Ste=function(t){return gS(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&u6(t)!=="[object Array]"&&u6(t.callee)==="[object Function]"},V8e=function(){return gS(arguments)}();gS.isLegacyArguments=Ste;var W8e=V8e?gS:Ste,Z8e=Object.prototype.toString,X8e=Function.prototype.toString,_8e=/^\s*(?:function)?\*/,Dte=VF(),lL=Object.getPrototypeOf,$8e=function(){if(!Dte)return!1;try{return Function("return function*() {}")()}catch{}},dL,eLe=function(t){if(typeof t!="function")return!1;if(_8e.test(X8e.call(t)))return!0;if(!Dte){var n=Z8e.call(t);return n==="[object GeneratorFunction]"}if(!lL)return!1;if(typeof dL>"u"){var r=$8e();dL=r?lL(r):!1}return lL(t)===dL},Cte=Function.prototype.toString,K0=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l6,OE;if(typeof K0=="function"&&typeof Object.defineProperty=="function")try{l6=Object.defineProperty({},"length",{get:function(){throw OE}}),OE={},K0(function(){throw 42},null,l6)}catch(e){e!==OE&&(K0=null)}else K0=null;var tLe=/^\s*class\b/,d6=function(t){try{var n=Cte.call(t);return tLe.test(n)}catch{return!1}},fL=function(t){try{return d6(t)?!1:(Cte.call(t),!0)}catch{return!1}},FE=Object.prototype.toString,nLe="[object Object]",rLe="[object Function]",iLe="[object GeneratorFunction]",oLe="[object HTMLAllCollection]",aLe="[object HTML document.all class]",sLe="[object HTMLCollection]",cLe=typeof Symbol=="function"&&!!Symbol.toStringTag,uLe=!(0 in[,]),f6=function(){return!1};if(typeof document=="object"){var lLe=document.all;FE.call(lLe)===FE.call(document.all)&&(f6=function(t){if((uLe||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=FE.call(t);return(n===oLe||n===aLe||n===sLe||n===nLe)&&t("")==null}catch{}return!1})}var dLe=K0?function(t){if(f6(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{K0(t,null,l6)}catch(n){if(n!==OE)return!1}return!d6(t)&&fL(t)}:function(t){if(f6(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(cLe)return fL(t);if(d6(t))return!1;var n=FE.call(t);return n!==rLe&&n!==iLe&&!/^\[object HTML/.test(n)?!1:fL(t)},fLe=dLe,hLe=Object.prototype.toString,Lte=Object.prototype.hasOwnProperty,gLe=function(t,n,r){for(var i=0,o=t.length;i=3&&(i=r),hLe.call(t)==="[object Array]"?gLe(t,n,i):typeof t=="string"?pLe(t,n,i):yLe(t,n,i)},mLe=bLe,hL=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],vLe=typeof globalThis>"u"?V:globalThis,wLe=function(){for(var t=[],n=0;n"u"?V:globalThis,h6=ILe(),ZF=WF("String.prototype.slice"),gL=Object.getPrototypeOf,MLe=WF("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r-1?n:n!=="Object"?!1:DLe(t)}return RE?SLe(t):null},CLe=Tte,LLe=function(t){return!!CLe(t)};(function(e){var t=W8e,n=eLe,r=Tte,i=LLe;function o(ce){return ce.call.bind(ce)}var a=typeof BigInt<"u",s=typeof Symbol<"u",u=o(Object.prototype.toString),l=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),d=o(Boolean.prototype.valueOf);if(a)var f=o(BigInt.prototype.valueOf);if(s)var h=o(Symbol.prototype.valueOf);function g(ce,ye){if(typeof ce!="object")return!1;try{return ye(ce),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function b(ce){return typeof Promise<"u"&&ce instanceof Promise||ce!==null&&typeof ce=="object"&&typeof ce.then=="function"&&typeof ce.catch=="function"}e.isPromise=b;function y(ce){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ce):i(ce)||Z(ce)}e.isArrayBufferView=y;function M(ce){return r(ce)==="Uint8Array"}e.isUint8Array=M;function E(ce){return r(ce)==="Uint8ClampedArray"}e.isUint8ClampedArray=E;function k(ce){return r(ce)==="Uint16Array"}e.isUint16Array=k;function C(ce){return r(ce)==="Uint32Array"}e.isUint32Array=C;function H(ce){return r(ce)==="Int8Array"}e.isInt8Array=H;function R(ce){return r(ce)==="Int16Array"}e.isInt16Array=R;function m(ce){return r(ce)==="Int32Array"}e.isInt32Array=m;function w(ce){return r(ce)==="Float32Array"}e.isFloat32Array=w;function G(ce){return r(ce)==="Float64Array"}e.isFloat64Array=G;function Y(ce){return r(ce)==="BigInt64Array"}e.isBigInt64Array=Y;function K(ce){return r(ce)==="BigUint64Array"}e.isBigUint64Array=K;function D(ce){return u(ce)==="[object Map]"}D.working=typeof Map<"u"&&D(new Map);function v(ce){return typeof Map>"u"?!1:D.working?D(ce):ce instanceof Map}e.isMap=v;function p(ce){return u(ce)==="[object Set]"}p.working=typeof Set<"u"&&p(new Set);function A(ce){return typeof Set>"u"?!1:p.working?p(ce):ce instanceof Set}e.isSet=A;function B(ce){return u(ce)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function O(ce){return typeof WeakMap>"u"?!1:B.working?B(ce):ce instanceof WeakMap}e.isWeakMap=O;function j(ce){return u(ce)==="[object WeakSet]"}j.working=typeof WeakSet<"u"&&j(new WeakSet);function U(ce){return j(ce)}e.isWeakSet=U;function N(ce){return u(ce)==="[object ArrayBuffer]"}N.working=typeof ArrayBuffer<"u"&&N(new ArrayBuffer);function P(ce){return typeof ArrayBuffer>"u"?!1:N.working?N(ce):ce instanceof ArrayBuffer}e.isArrayBuffer=P;function x(ce){return u(ce)==="[object DataView]"}x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1));function Z(ce){return typeof DataView>"u"?!1:x.working?x(ce):ce instanceof DataView}e.isDataView=Z;var ie=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Q(ce){return u(ce)==="[object SharedArrayBuffer]"}function S(ce){return typeof ie>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new ie)),Q.working?Q(ce):ce instanceof ie)}e.isSharedArrayBuffer=S;function z(ce){return u(ce)==="[object AsyncFunction]"}e.isAsyncFunction=z;function I(ce){return u(ce)==="[object Map Iterator]"}e.isMapIterator=I;function F(ce){return u(ce)==="[object Set Iterator]"}e.isSetIterator=F;function T(ce){return u(ce)==="[object Generator]"}e.isGeneratorObject=T;function L(ce){return u(ce)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=L;function q(ce){return g(ce,l)}e.isNumberObject=q;function re(ce){return g(ce,c)}e.isStringObject=re;function se(ce){return g(ce,d)}e.isBooleanObject=se;function pe(ce){return a&&g(ce,f)}e.isBigIntObject=pe;function oe(ce){return s&&g(ce,h)}e.isSymbolObject=oe;function _(ce){return q(ce)||re(ce)||se(ce)||pe(ce)||oe(ce)}e.isBoxedPrimitive=_;function ee(ce){return typeof Uint8Array<"u"&&(P(ce)||S(ce))}e.isAnyArrayBuffer=ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ce){Object.defineProperty(e,ce,{enumerable:!1,value:function(){throw new Error(ce+" is not supported in userland")}})})})(vte);var kLe=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"};(function(e){var t=Object.getOwnPropertyDescriptors||function(Z){for(var ie=Object.keys(Z),Q={},S=0;S=S)return F;switch(F){case"%s":return String(Q[ie++]);case"%d":return Number(Q[ie++]);case"%j":try{return JSON.stringify(Q[ie++])}catch{return"[Circular]"}default:return F}}),I=Q[ie];ie"u")return function(){return e.deprecate(x,Z).apply(this,arguments)};var ie=!1;function Q(){if(!ie){if(Rt.throwDeprecation)throw new Error(Z);Rt.traceDeprecation?console.trace(Z):console.error(Z),ie=!0}return x.apply(this,arguments)}return Q};var r={},i=/^$/;if({GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG){var o={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}e.debuglog=function(x){if(x=x.toUpperCase(),!r[x])if(i.test(x)){var Z=Rt.pid;r[x]=function(){var ie=e.format.apply(e,arguments);console.error("%s %d: %s",x,Z,ie)}}else r[x]=function(){};return r[x]};function a(x,Z){var ie={seen:[],stylize:u};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),M(Z)?ie.showHidden=Z:Z&&e._extend(ie,Z),m(ie.showHidden)&&(ie.showHidden=!1),m(ie.depth)&&(ie.depth=2),m(ie.colors)&&(ie.colors=!1),m(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=s),c(ie,x,ie.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(x,Z){var ie=a.styles[Z];return ie?"\x1B["+a.colors[ie][0]+"m"+x+"\x1B["+a.colors[ie][1]+"m":x}function u(x,Z){return x}function l(x){var Z={};return x.forEach(function(ie,Q){Z[ie]=!0}),Z}function c(x,Z,ie){if(x.customInspect&&Z&&D(Z.inspect)&&Z.inspect!==e.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var Q=Z.inspect(ie,x);return H(Q)||(Q=c(x,Q,ie)),Q}var S=d(x,Z);if(S)return S;var z=Object.keys(Z),I=l(z);if(x.showHidden&&(z=Object.getOwnPropertyNames(Z)),K(Z)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return f(Z);if(z.length===0){if(D(Z)){var F=Z.name?": "+Z.name:"";return x.stylize("[Function"+F+"]","special")}if(w(Z))return x.stylize(RegExp.prototype.toString.call(Z),"regexp");if(Y(Z))return x.stylize(Date.prototype.toString.call(Z),"date");if(K(Z))return f(Z)}var T="",L=!1,q=["{","}"];if(y(Z)&&(L=!0,q=["[","]"]),D(Z)){var re=Z.name?": "+Z.name:"";T=" [Function"+re+"]"}if(w(Z)&&(T=" "+RegExp.prototype.toString.call(Z)),Y(Z)&&(T=" "+Date.prototype.toUTCString.call(Z)),K(Z)&&(T=" "+f(Z)),z.length===0&&(!L||Z.length==0))return q[0]+T+q[1];if(ie<0)return w(Z)?x.stylize(RegExp.prototype.toString.call(Z),"regexp"):x.stylize("[Object]","special");x.seen.push(Z);var se;return L?se=h(x,Z,ie,I,z):se=z.map(function(pe){return g(x,Z,ie,I,pe,L)}),x.seen.pop(),b(se,T,q)}function d(x,Z){if(m(Z))return x.stylize("undefined","undefined");if(H(Z)){var ie="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(ie,"string")}if(C(Z))return x.stylize(""+Z,"number");if(M(Z))return x.stylize(""+Z,"boolean");if(E(Z))return x.stylize("null","null")}function f(x){return"["+Error.prototype.toString.call(x)+"]"}function h(x,Z,ie,Q,S){for(var z=[],I=0,F=Z.length;I-1&&(z?F=F.split(` `).map(function(L){return" "+L}).join(` `).slice(2):F=` @@ -342,7 +342,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */(function(e){(function(){var t="input is invalid type",n="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&typeof self=="object",a=!i.JS_SHA3_NO_NODE_JS&&typeof Rt=="object"&&Rt.versions&&Rt.versions.node;a?i=zFe:o&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],d=[4,1024,262144,67108864],f=[1,256,65536,16777216],h=[6,1536,393216,100663296],g=[0,8,16,24],b=[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],y=[224,256,384,512],M=[128,256],E=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(Q){return Object.prototype.toString.call(Q)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(Q){return typeof Q=="object"&&Q.buffer&&Q.buffer.constructor===ArrayBuffer});for(var C=function(Q,S,z){return function(I){return new x(Q,S,Q).update(I)[z]()}},H=function(Q,S,z){return function(I,F){return new x(Q,S,F).update(I)[z]()}},R=function(Q,S,z){return function(I,F,T,L){return p["cshake"+Q].update(I,F,T,L)[z]()}},m=function(Q,S,z){return function(I,F,T,L){return p["kmac"+Q].update(I,F,T,L)[z]()}},w=function(Q,S,z,I){for(var F=0;F>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var I=0;I<50;++I)this.s[I]=0}x.prototype.update=function(Q){if(this.finalized)throw new Error(n);var S,z=typeof Q;if(z!=="string"){if(z==="object"){if(Q===null)throw new Error(t);if(u&&Q.constructor===ArrayBuffer)Q=new Uint8Array(Q);else if(!Array.isArray(Q)&&(!u||!ArrayBuffer.isView(Q)))throw new Error(t)}else throw new Error(t);S=!0}for(var I=this.blocks,F=this.byteCount,T=Q.length,L=this.blockCount,q=0,re=this.s,se,pe;q>2]|=Q[q]<>2]|=pe<>2]|=(192|pe>>6)<>2]|=(128|pe&63)<=57344?(I[se>>2]|=(224|pe>>12)<>2]|=(128|pe>>6&63)<>2]|=(128|pe&63)<>2]|=(240|pe>>18)<>2]|=(128|pe>>12&63)<>2]|=(128|pe>>6&63)<>2]|=(128|pe&63)<=F){for(this.start=se-F,this.block=I[L],se=0;se>8,z=Q&255;z>0;)F.unshift(z),Q=Q>>8,z=Q&255,++I;return S?F.push(I):F.unshift(I),this.update(F),F.length},x.prototype.encodeString=function(Q){var S,z=typeof Q;if(z!=="string"){if(z==="object"){if(Q===null)throw new Error(t);if(u&&Q.constructor===ArrayBuffer)Q=new Uint8Array(Q);else if(!Array.isArray(Q)&&(!u||!ArrayBuffer.isView(Q)))throw new Error(t)}else throw new Error(t);S=!0}var I=0,F=Q.length;if(S)I=F;else for(var T=0;T=57344?I+=3:(L=65536+((L&1023)<<10|Q.charCodeAt(++T)&1023),I+=4)}return I+=this.encode(I*8),this.update(Q),I},x.prototype.bytepad=function(Q,S){for(var z=this.encode(S),I=0;I>2]|=this.padding[S&3],this.lastByteIndex===this.byteCount)for(Q[0]=Q[z],S=1;S>4&15]+l[q&15]+l[q>>12&15]+l[q>>8&15]+l[q>>20&15]+l[q>>16&15]+l[q>>28&15]+l[q>>24&15];T%Q===0&&(ie(S),F=0)}return I&&(q=S[F],L+=l[q>>4&15]+l[q&15],I>1&&(L+=l[q>>12&15]+l[q>>8&15]),I>2&&(L+=l[q>>20&15]+l[q>>16&15])),L},x.prototype.arrayBuffer=function(){this.finalize();var Q=this.blockCount,S=this.s,z=this.outputBlocks,I=this.extraBytes,F=0,T=0,L=this.outputBits>>3,q;I?q=new ArrayBuffer(z+1<<2):q=new ArrayBuffer(L);for(var re=new Uint32Array(q);T>8&255,L[q+2]=re>>16&255,L[q+3]=re>>24&255;T%Q===0&&ie(S)}return I&&(q=T<<2,re=S[F],L[q]=re&255,I>1&&(L[q+1]=re>>8&255),I>2&&(L[q+2]=re>>16&255)),L};function Z(Q,S,z){x.call(this,Q,S,z)}Z.prototype=new x,Z.prototype.finalize=function(){return this.encode(this.outputBits,!0),x.prototype.finalize.call(this)};var ie=function(Q){var S,z,I,F,T,L,q,re,se,pe,oe,_,ee,ce,ye,le,ve,Ae,de,we,ke,ae,$,ne,fe,ge,Ie,ue,J,X,Ee,De,Se,Oe,Ne,Ye,qe,Je,Ke,Ce,He,Ve,Ue,tt,ut,me,Le,xe,Pe,Xe,pt,at,yt,kt,xt,Cn,yn,Ln,po,mi,di,Fi,xo;for(I=0;I<48;I+=2)F=Q[0]^Q[10]^Q[20]^Q[30]^Q[40],T=Q[1]^Q[11]^Q[21]^Q[31]^Q[41],L=Q[2]^Q[12]^Q[22]^Q[32]^Q[42],q=Q[3]^Q[13]^Q[23]^Q[33]^Q[43],re=Q[4]^Q[14]^Q[24]^Q[34]^Q[44],se=Q[5]^Q[15]^Q[25]^Q[35]^Q[45],pe=Q[6]^Q[16]^Q[26]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23]=qe^~Ke&He,Q[32]=me^~xe&Xe,Q[33]=Le^~Pe&pt,Q[42]=Cn^~Ln&mi,Q[43]=yn^~po&di,Q[4]=Ae^~we&ae,Q[5]=de^~ke&$,Q[14]=ue^~X&De,Q[15]=J^~Ee&Se,Q[24]=Je^~Ce&Ve,Q[25]=Ke^~He&Ue,Q[34]=xe^~Xe&at,Q[35]=Pe^~pt&yt,Q[44]=Ln^~mi&Fi,Q[45]=po^~di&xo,Q[6]=we^~ae&ce,Q[7]=ke^~$&ye,Q[16]=X^~De&ne,Q[17]=Ee^~Se&fe,Q[26]=Ce^~Ve&Oe,Q[27]=He^~Ue&Ne,Q[36]=Xe^~at&tt,Q[37]=pt^~yt&ut,Q[46]=mi^~Fi&kt,Q[47]=di^~xo&xt,Q[8]=ae^~ce&le,Q[9]=$^~ye&ve,Q[18]=De^~ne&ge,Q[19]=Se^~fe&Ie,Q[28]=Ve^~Oe&Ye,Q[29]=Ue^~Ne&qe,Q[38]=at^~tt&me,Q[39]=yt^~ut&Le,Q[48]=Fi^~kt&Cn,Q[49]=xo^~xt&yn,Q[0]^=b[I],Q[1]^=b[I+1]};if(s)e.exports=p;else for(B=0;B{this.registry[r]||(this.registry[r]=jUe(n.legacyResolvers[r]))})}resolve(t,n={}){try{const r=this,i=zUe(t);if(i===null)return Promise.resolve({...w3,didResolutionMetadata:{error:"invalidDid"}});const o=r.registry[i.method];return o?Promise.resolve(r.cache(i,()=>o(i.did,i,r,n))):Promise.resolve({...w3,didResolutionMetadata:{error:"unsupportedDidMethod"}})}catch(r){return Promise.reject(r)}}}var R6={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof V<"u"&&V,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s=typeof o<"u"&&o||typeof self<"u"&&self||typeof s<"u"&&s,u={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 l(A){return A&&DataView.prototype.isPrototypeOf(A)}if(u.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(A){return A&&c.indexOf(Object.prototype.toString.call(A))>-1};function f(A){if(typeof A!="string"&&(A=String(A)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(A)||A==="")throw new TypeError('Invalid character in header field name: "'+A+'"');return A.toLowerCase()}function h(A){return typeof A!="string"&&(A=String(A)),A}function g(A){var B={next:function(){var O=A.shift();return{done:O===void 0,value:O}}};return u.iterable&&(B[Symbol.iterator]=function(){return B}),B}function b(A){this.map={},A instanceof b?A.forEach(function(B,O){this.append(O,B)},this):Array.isArray(A)?A.forEach(function(B){this.append(B[0],B[1])},this):A&&Object.getOwnPropertyNames(A).forEach(function(B){this.append(B,A[B])},this)}b.prototype.append=function(A,B){A=f(A),B=h(B);var O=this.map[A];this.map[A]=O?O+", "+B:B},b.prototype.delete=function(A){delete this.map[f(A)]},b.prototype.get=function(A){return A=f(A),this.has(A)?this.map[A]:null},b.prototype.has=function(A){return this.map.hasOwnProperty(f(A))},b.prototype.set=function(A,B){this.map[f(A)]=h(B)},b.prototype.forEach=function(A,B){for(var O in this.map)this.map.hasOwnProperty(O)&&A.call(B,this.map[O],O,this)},b.prototype.keys=function(){var A=[];return this.forEach(function(B,O){A.push(O)}),g(A)},b.prototype.values=function(){var A=[];return this.forEach(function(B){A.push(B)}),g(A)},b.prototype.entries=function(){var A=[];return this.forEach(function(B,O){A.push([O,B])}),g(A)},u.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function y(A){if(A.bodyUsed)return Promise.reject(new TypeError("Already read"));A.bodyUsed=!0}function M(A){return new Promise(function(B,O){A.onload=function(){B(A.result)},A.onerror=function(){O(A.error)}})}function E(A){var B=new FileReader,O=M(B);return B.readAsArrayBuffer(A),O}function k(A){var B=new FileReader,O=M(B);return B.readAsText(A),O}function C(A){for(var B=new Uint8Array(A),O=new Array(B.length),j=0;j-1?B:A}function G(A,B){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B=B||{};var O=B.body;if(A instanceof G){if(A.bodyUsed)throw new TypeError("Already read");this.url=A.url,this.credentials=A.credentials,B.headers||(this.headers=new b(A.headers)),this.method=A.method,this.mode=A.mode,this.signal=A.signal,!O&&A._bodyInit!=null&&(O=A._bodyInit,A.bodyUsed=!0)}else this.url=String(A);if(this.credentials=B.credentials||this.credentials||"same-origin",(B.headers||!this.headers)&&(this.headers=new b(B.headers)),this.method=w(B.method||this.method||"GET"),this.mode=B.mode||this.mode||null,this.signal=B.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&O)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(O),(this.method==="GET"||this.method==="HEAD")&&(B.cache==="no-store"||B.cache==="no-cache")){var j=/([?&])_=[^&]*/;if(j.test(this.url))this.url=this.url.replace(j,"$1_="+new Date().getTime());else{var U=/\?/;this.url+=(U.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})};function Y(A){var B=new FormData;return A.trim().split("&").forEach(function(O){if(O){var j=O.split("="),U=j.shift().replace(/\+/g," "),N=j.join("=").replace(/\+/g," ");B.append(decodeURIComponent(U),decodeURIComponent(N))}}),B}function K(A){var B=new b,O=A.replace(/\r?\n[\t ]+/g," ");return O.split("\r").map(function(j){return j.indexOf(` -`)===0?j.substr(1,j.length):j}).forEach(function(j){var U=j.split(":"),N=U.shift().trim();if(N){var P=U.join(":").trim();B.append(N,P)}}),B}R.call(G.prototype);function D(A,B){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B||(B={}),this.type="default",this.status=B.status===void 0?200:B.status,this.ok=this.status>=200&&this.status<300,this.statusText=B.statusText===void 0?"":""+B.statusText,this.headers=new b(B.headers),this.url=B.url||"",this._initBody(A)}R.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},D.error=function(){var A=new D(null,{status:0,statusText:""});return A.type="error",A};var v=[301,302,303,307,308];D.redirect=function(A,B){if(v.indexOf(B)===-1)throw new RangeError("Invalid status code");return new D(null,{status:B,headers:{location:A}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(B,O){this.message=B,this.name=O;var j=Error(B);this.stack=j.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function p(A,B){return new Promise(function(O,j){var U=new G(A,B);if(U.signal&&U.signal.aborted)return j(new a.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function P(){N.abort()}N.onload=function(){var Z={status:N.status,statusText:N.statusText,headers:K(N.getAllResponseHeaders()||"")};Z.url="responseURL"in N?N.responseURL:Z.headers.get("X-Request-URL");var ie="response"in N?N.response:N.responseText;setTimeout(function(){O(new D(ie,Z))},0)},N.onerror=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},N.ontimeout=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},N.onabort=function(){setTimeout(function(){j(new a.DOMException("Aborted","AbortError"))},0)};function x(Z){try{return Z===""&&s.location.href?s.location.href:Z}catch{return Z}}N.open(U.method,x(U.url),!0),U.credentials==="include"?N.withCredentials=!0:U.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&(u.blob?N.responseType="blob":u.arrayBuffer&&U.headers.get("Content-Type")&&U.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(N.responseType="arraybuffer")),B&&typeof B.headers=="object"&&!(B.headers instanceof b)?Object.getOwnPropertyNames(B.headers).forEach(function(Z){N.setRequestHeader(Z,h(B.headers[Z]))}):U.headers.forEach(function(Z,ie){N.setRequestHeader(ie,Z)}),U.signal&&(U.signal.addEventListener("abort",P),N.onreadystatechange=function(){N.readyState===4&&U.signal.removeEventListener("abort",P)}),N.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return p.polyfill=!0,s.fetch||(s.fetch=p,s.Headers=b,s.Request=G,s.Response=D),a.Headers=b,a.Request=G,a.Response=D,a.fetch=p,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(R6,R6.exports);var GUe=R6.exports;const HUe=Pa(GUe);function KUe(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}const QUe=function(e){try{return Promise.resolve(HUe(e,{mode:"cors"})).then(function(t){if(t.status>=400)throw new Error(`Bad response ${t.statusText}`);return t.json()})}catch(t){return Promise.reject(t)}};function Ma(e,t,n){if(!e.s){if(n instanceof FU)if(n.s)t&1&&(t=n.s),n=n.v;else{n.o=Ma.bind(null,e,t);return}if(n&&n.then){n.then(Ma.bind(null,e,t),Ma.bind(null,e,2));return}e.s=t,e.v=n;const r=e.o;r&&r(e)}}const qUe="/.well-known/did.json",FU=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const o=i&1?t:n;if(o){try{Ma(r,1,o(this.v))}catch(a){Ma(r,2,a)}return r}else return this}return this.o=function(o){try{const a=o.v;o.s&1?Ma(r,1,t?t(a):a):n?Ma(r,1,n(a)):Ma(r,2,a)}catch(a){Ma(r,2,a)}},r},e}();function A0(e){return e instanceof FU&&e.s&1}function YUe(e,t){var n;do{var r=e();if(r&&r.then)if(A0(r))r=r.v;else{n=!0;break}var i=t();if(A0(i)&&(i=i.v),!i)return r}while(!i.then);const o=new FU,a=Ma.bind(null,o,2);return(n?r.then(s):i.then(u)).then(void 0,a),o;function s(l){for(r=l;i=t(),A0(i)&&(i=i.v),!!i;){if(i.then){i.then(u).then(void 0,a);return}if(r=e(),r&&r.then)if(A0(r))r=r.v;else{r.then(s).then(void 0,a);return}}Ma(o,1,r)}function u(l){if(l){do{if(r=e(),r&&r.then)if(A0(r))r=r.v;else{r.then(s).then(void 0,a);return}if(l=t(),A0(l)&&(l=l.v),!l){Ma(o,1,r);return}}while(!l.then);l.then(u).then(void 0,a)}else Ma(o,1,r)}}function zie(){return{web:function(t,n){try{let i=function(){const f=typeof c?.["@context"]<"u"?"application/did+ld+json":"application/did+json";return o?{didDocument:c,didDocumentMetadata:l,didResolutionMetadata:{error:"notFound",message:o}}:{didDocument:c,didDocumentMetadata:l,didResolutionMetadata:{contentType:f}}},r,o=null,a=decodeURIComponent(n.id)+qUe;const s=n.id.split(":");s.length>1&&(a=s.map(decodeURIComponent).join("/")+"/did.json");const u=`https://${a}`,l={};let c=null;const d=YUe(function(){function f(){r||c?.id===t||(o="resolver_error: DID document id does not match requested did")}const h=KUe(function(){return Promise.resolve(QUe(u)).then(function(g){c=g})},function(g){o=`resolver_error: DID must resolve to a valid https URL containing a JSON document: ${g}`,r=1});return h&&h.then?h.then(f):f(h)},function(){return!r&&!1});return Promise.resolve(d&&d.then?d.then(i):i(d))}catch(r){return Promise.reject(r)}}}}var ps={},YS={},jie={},$o={},JS={};Object.defineProperty(JS,"__esModule",{value:!0});JS.errorCodeFromLogs=void 0;const JUe=/Custom program error: (0x[a-f0-9]+)/i;function VUe(e){for(const t of e){const n=t.match(JUe);if(n==null)continue;const r=n[1];try{return parseInt(r)}catch{}}return null}JS.errorCodeFromLogs=VUe;var Gie={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LangErrorMessage=e.LangErrorCode=void 0,e.LangErrorCode={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,StateInvalidAddress:4e3,Deprecated:5e3},e.LangErrorMessage=new Map([[e.LangErrorCode.InstructionMissing,"8 byte instruction identifier not provided"],[e.LangErrorCode.InstructionFallbackNotFound,"Fallback functions are not supported"],[e.LangErrorCode.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[e.LangErrorCode.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[e.LangErrorCode.IdlInstructionStub,"The program was compiled without idl instructions"],[e.LangErrorCode.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[e.LangErrorCode.ConstraintMut,"A mut constraint was violated"],[e.LangErrorCode.ConstraintHasOne,"A has_one constraint was violated"],[e.LangErrorCode.ConstraintSigner,"A signer constraint was violated"],[e.LangErrorCode.ConstraintRaw,"A raw constraint was violated"],[e.LangErrorCode.ConstraintOwner,"An owner constraint was violated"],[e.LangErrorCode.ConstraintRentExempt,"A rent exempt constraint was violated"],[e.LangErrorCode.ConstraintSeeds,"A seeds constraint was violated"],[e.LangErrorCode.ConstraintExecutable,"An executable constraint was violated"],[e.LangErrorCode.ConstraintState,"A state constraint was violated"],[e.LangErrorCode.ConstraintAssociated,"An associated constraint was violated"],[e.LangErrorCode.ConstraintAssociatedInit,"An associated init constraint was violated"],[e.LangErrorCode.ConstraintClose,"A close constraint was violated"],[e.LangErrorCode.ConstraintAddress,"An address constraint was violated"],[e.LangErrorCode.ConstraintZero,"Expected zero account discriminant"],[e.LangErrorCode.ConstraintTokenMint,"A token mint constraint was violated"],[e.LangErrorCode.ConstraintTokenOwner,"A token owner constraint was violated"],[e.LangErrorCode.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[e.LangErrorCode.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[e.LangErrorCode.ConstraintMintDecimals,"A mint decimals constraint was violated"],[e.LangErrorCode.ConstraintSpace,"A space constraint was violated"],[e.LangErrorCode.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[e.LangErrorCode.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[e.LangErrorCode.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[e.LangErrorCode.AccountDidNotDeserialize,"Failed to deserialize the account"],[e.LangErrorCode.AccountDidNotSerialize,"Failed to serialize the account"],[e.LangErrorCode.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[e.LangErrorCode.AccountNotMutable,"The given account is not mutable"],[e.LangErrorCode.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[e.LangErrorCode.InvalidProgramId,"Program ID was not as expected"],[e.LangErrorCode.InvalidProgramExecutable,"Program account is not executable"],[e.LangErrorCode.AccountNotSigner,"The given account did not sign"],[e.LangErrorCode.AccountNotSystemOwned,"The given account is not owned by the system program"],[e.LangErrorCode.AccountNotInitialized,"The program expected this account to be already initialized"],[e.LangErrorCode.AccountNotProgramData,"The given account is not a program data account"],[e.LangErrorCode.StateInvalidAddress,"The given state account does not have the correct address"],[e.LangErrorCode.Deprecated,"The API being used is deprecated and should no longer be used"]])})(Gie);var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.tokenLendingErrors=void 0;VS.tokenLendingErrors=new Map([[0,{code:0,message:'Failed to unpack instruction data"',name:"InstructionUnpackError"}],[1,{code:1,message:'Account is already initialized"',name:"AlreadyInitialized"}],[2,{code:2,message:'Lamport balance below rent-exempt threshold"',name:"NotRentExempt"}],[3,{code:3,message:'Market authority is invalid"',name:"InvalidMarketAuthority"}],[4,{code:4,message:'Market owner is invalid"',name:"InvalidMarketOwner"}],[5,{code:5,message:'Input account owner is not the program address"',name:"InvalidAccountOwner"}],[6,{code:6,message:'Input token account is not owned by the correct token program id"',name:"InvalidTokenOwner"}],[7,{code:7,message:'Input token account is not valid"',name:"InvalidTokenAccount"}],[8,{code:8,message:'Input token mint account is not valid"',name:"InvalidTokenMint"}],[9,{code:9,message:'Input token program account is not valid"',name:"InvalidTokenProgram"}],[10,{code:10,message:'Input amount is invalid"',name:"InvalidAmount"}],[11,{code:11,message:'Input config value is invalid"',name:"InvalidConfig"}],[12,{code:12,message:'Input account must be a signer"',name:"InvalidSigner"}],[13,{code:13,message:'Invalid account input"',name:"InvalidAccountInput"}],[14,{code:14,message:'Math operation overflow"',name:"MathOverflow"}],[15,{code:15,message:'Token initialize mint failed"',name:"TokenInitializeMintFailed"}],[16,{code:16,message:'Token initialize account failed"',name:"TokenInitializeAccountFailed"}],[17,{code:17,message:'Token transfer failed"',name:"TokenTransferFailed"}],[18,{code:18,message:'Token mint to failed"',name:"TokenMintToFailed"}],[19,{code:19,message:'Token burn failed"',name:"TokenBurnFailed"}],[20,{code:20,message:'Insufficient liquidity available"',name:"InsufficientLiquidity"}],[21,{code:21,message:'Input reserve has collateral disabled"',name:"ReserveCollateralDisabled"}],[22,{code:22,message:'Reserve state needs to be refreshed"',name:"ReserveStale"}],[23,{code:23,message:'Withdraw amount too small"',name:"WithdrawTooSmall"}],[24,{code:24,message:'Withdraw amount too large"',name:"WithdrawTooLarge"}],[25,{code:25,message:'Borrow amount too small to receive liquidity after fees"',name:"BorrowTooSmall"}],[26,{code:26,message:'Borrow amount too large for deposited collateral"',name:"BorrowTooLarge"}],[27,{code:27,message:'Repay amount too small to transfer liquidity"',name:"RepayTooSmall"}],[28,{code:28,message:'Liquidation amount too small to receive collateral"',name:"LiquidationTooSmall"}],[29,{code:29,message:'Cannot liquidate healthy obligations"',name:"ObligationHealthy"}],[30,{code:30,message:'Obligation state needs to be refreshed"',name:"ObligationStale"}],[31,{code:31,message:'Obligation reserve limit exceeded"',name:"ObligationReserveLimit"}],[32,{code:32,message:'Obligation owner is invalid"',name:"InvalidObligationOwner"}],[33,{code:33,message:'Obligation deposits are empty"',name:"ObligationDepositsEmpty"}],[34,{code:34,message:'Obligation borrows are empty"',name:"ObligationBorrowsEmpty"}],[35,{code:35,message:'Obligation deposits have zero value"',name:"ObligationDepositsZero"}],[36,{code:36,message:'Obligation borrows have zero value"',name:"ObligationBorrowsZero"}],[37,{code:37,message:'Invalid obligation collateral"',name:"InvalidObligationCollateral"}],[38,{code:38,message:'Invalid obligation liquidity"',name:"InvalidObligationLiquidity"}],[39,{code:39,message:'Obligation collateral is empty"',name:"ObligationCollateralEmpty"}],[40,{code:40,message:'Obligation liquidity is empty"',name:"ObligationLiquidityEmpty"}],[41,{code:41,message:'Interest rate is negative"',name:"NegativeInterestRate"}],[42,{code:42,message:'Input oracle config is invalid"',name:"InvalidOracleConfig"}],[43,{code:43,message:'Input flash loan receiver program account is not valid"',name:"InvalidFlashLoanReceiverProgram"}],[44,{code:44,message:'Not enough liquidity after flash loan"',name:"NotEnoughLiquidityAfterFlashLoan"}]]);var WUe=V&&V.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),ZUe=V&&V.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),XUe=V&&V.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&WUe(t,e,n);return ZUe(t,e),t};Object.defineProperty($o,"__esModule",{value:!0});$o.TokenLendingError=$o.AnchorError=$o.CustomProgramError=$o.CusperUnknownError=$o.initCusper=$o.ErrorResolver=void 0;const _Ue=JS,gQ=XUe(Gie),$Ue=VS;class Hie{constructor(t){this.resolveErrorFromCode=t}errorFromCode(t,n,r=!0){let i=this.resolveErrorFromCode!=null?this.resolveErrorFromCode(t):null;if(i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(i=Xg.fromCode(t),i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(i=_g.fromCode(t),i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(r)return i=new P6(t,"CusperUnknownError","cusper does not know this error"),this.passPreparedError(i,n??this.errorFromCode)}errorFromProgramLogs(t,n=!0){const r=(0,_Ue.errorCodeFromLogs)(t);return r==null?null:this.errorFromCode(r,this.errorFromProgramLogs,n)}throwError(t){const n=t.logs!=null&&this.errorFromProgramLogs(t.logs,!0)||new P6(-1,"Error created without logs and thus without error code");throw this.passPreparedError(n,this.throwError)}passPreparedError(t,n){return t==null?null:(typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(t,n),t)}}$o.ErrorResolver=Hie;function eRe(e){return new Hie(e)}$o.initCusper=eRe;class P6 extends Error{constructor(t,...n){super(...n),this.code=t,this.name="CusperUnknownError"}}$o.CusperUnknownError=P6;class tRe extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`CustomProgramError#${n}`}}$o.CustomProgramError=tRe;class Xg extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`AnchorError#${n}`}static fromCode(t){const n=Xg.errorMap.get(t);return n!=null?new Xg(n.code,n.name,n.message):null}toString(){return`${this.name}: ${this.message}`}}$o.AnchorError=Xg;Xg.errorMap=Object.entries(gQ.LangErrorCode).reduce((e,[t,n])=>(e.set(n,{code:n,name:t,message:gQ.LangErrorMessage.get(n)}),e),new Map);class _g extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`TokenLendingError#${n}`}static fromCode(t){const n=_g.errorMap.get(t);return n!=null?new _g(n.code,n.name,n.message):null}toString(){return`${this.name}: ${this.message}`}}$o.TokenLendingError=_g;_g.errorMap=$Ue.tokenLendingErrors;var Kie={};Object.defineProperty(Kie,"__esModule",{value:!0});(function(e){var t=V&&V.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=V&&V.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n($o,e),n(Kie,e)})(jie);var pB={},yB={},z6={},he={},Ki={},or={};Object.defineProperty(or,"__esModule",{value:!0});or.isElementCollectionFixedSizeBeet=or.isFixableBeet=or.assertFixedSizeBeet=or.isFixedSizeBeet=or.BEET_TYPE_ARG_INNER=or.BEET_TYPE_ARG_LEN=or.BEET_PACKAGE=void 0;const nRe=Yr();or.BEET_PACKAGE="@metaplex-foundation/beet";or.BEET_TYPE_ARG_LEN="len";or.BEET_TYPE_ARG_INNER="Beet<{innner}>";function Qie(e){return Object.keys(e).includes("byteSize")}or.isFixedSizeBeet=Qie;function rRe(e,t=`${e} should have been a fixed beet`){(0,nRe.strict)(Qie(e),t)}or.assertFixedSizeBeet=rRe;function iRe(e){return typeof e.toFixedFromData=="function"&&typeof e.toFixedFromValue=="function"}or.isFixableBeet=iRe;function oRe(e){const t=Object.keys(e);return t.includes("length")&&t.includes("elementByteSize")&&t.includes("lenPrefixByteSize")}or.isElementCollectionFixedSizeBeet=oRe;var Id={};(function(e){var t=V&&V.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.numbersTypeMap=e.bool=e.i512=e.i256=e.i128=e.i64=e.i32=e.i16=e.i8=e.u512=e.u256=e.u128=e.u64=e.u32=e.u16=e.u8=void 0;const n=t(Pd),r=or;e.u8={write:function(a,s,u){a.writeUInt8(u,s)},read:function(a,s){return a.readUInt8(s)},byteSize:1,description:"u8"},e.u16={write:function(a,s,u){a.writeUInt16LE(u,s)},read:function(a,s){return a.readUInt16LE(s)},byteSize:2,description:"u16"},e.u32={write:function(a,s,u){a.writeUInt32LE(u,s)},read:function(a,s){return a.readUInt32LE(s)},byteSize:4,description:"u32"};function i(a,s){return{write:function(u,l,c){const f=(n.default.isBN(c)?c:new n.default(c)).toArray("le",this.byteSize);Be.Buffer.from(f).copy(u,l,0,this.byteSize)},read:function(u,l){const c=u.slice(l,l+this.byteSize);return new n.default(c,"le")},byteSize:a,description:s}}e.u64=i(8,"u64"),e.u128=i(16,"u128"),e.u256=i(32,"u256"),e.u512=i(64,"u512"),e.i8={write:function(a,s,u){a.writeInt8(u,s)},read:function(a,s){return a.readInt8(s)},byteSize:1,description:"i8"},e.i16={write:function(a,s,u){a.writeInt16LE(u,s)},read:function(a,s){return a.readInt16LE(s)},byteSize:2,description:"i16"},e.i32={write:function(a,s,u){a.writeInt32LE(u,s)},read:function(a,s){return a.readInt32LE(s)},byteSize:4,description:"i32"};function o(a,s){const u=a*8;return{write:function(l,c,d){const h=(n.default.isBN(d)?d:new n.default(d)).toTwos(u).toArray("le",this.byteSize);Be.Buffer.from(h).copy(l,c,0,this.byteSize)},read:function(l,c){const d=l.slice(c,c+this.byteSize);return new n.default(d,"le").fromTwos(u)},byteSize:a,description:s}}e.i64=o(8,"i64"),e.i128=o(16,"i128"),e.i256=o(32,"i256"),e.i512=o(64,"i512"),e.bool={write:function(a,s,u){const l=u?1:0;e.u8.write(a,s,l)},read:function(a,s){return e.u8.read(a,s)===1},byteSize:1,description:"bool"},e.numbersTypeMap={u8:{beet:"u8",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},u16:{beet:"u16",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},u32:{beet:"u32",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i8:{beet:"i8",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i16:{beet:"i16",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i32:{beet:"i32",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},bool:{beet:"bool",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"boolean"},u64:{beet:"u64",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u128:{beet:"u128",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u256:{beet:"u256",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u512:{beet:"u512",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i64:{beet:"i64",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i128:{beet:"i128",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i256:{beet:"i256",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i512:{beet:"i512",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE}}})(Id);var Fr={},j6={exports:{}},bB,pQ;function aRe(){if(pQ)return bB;pQ=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;bB=function(c,d){d=d||{};var f=typeof c;if(f==="string"&&c.length>0)return a(c);if(f==="number"&&isFinite(c))return d.long?u(c):s(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function a(c){if(c=String(c),!(c.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(d){var f=parseFloat(d[1]),h=(d[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return f*o;case"weeks":case"week":case"w":return f*i;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function s(c){var d=Math.abs(c);return d>=r?Math.round(c/r)+"d":d>=n?Math.round(c/n)+"h":d>=t?Math.round(c/t)+"m":d>=e?Math.round(c/e)+"s":c+"ms"}function u(c){var d=Math.abs(c);return d>=r?l(c,d,r,"day"):d>=n?l(c,d,n,"hour"):d>=t?l(c,d,t,"minute"):d>=e?l(c,d,e,"second"):c+" ms"}function l(c,d,f,h){var g=d>=f*1.5;return Math.round(c/f)+" "+h+(g?"s":"")}return bB}function sRe(e){n.debug=n,n.default=n,n.coerce=u,n.disable=o,n.enable=i,n.enabled=a,n.humanize=aRe(),n.destroy=l,Object.keys(e).forEach(c=>{n[c]=e[c]}),n.names=[],n.skips=[],n.formatters={};function t(c){let d=0;for(let f=0;f{if(R==="%%")return"%";C++;const w=n.formatters[m];if(typeof w=="function"){const G=y[C];R=w.call(M,G),y.splice(C,1),C--}return R}),n.formatArgs.call(M,y),(M.log||n.log).apply(M,y)}return b.namespace=c,b.useColors=n.useColors(),b.color=n.selectColor(c),b.extend=r,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(c)),g),set:y=>{f=y}}),typeof n.init=="function"&&n.init(b),b}function r(c,d){const f=n(this.namespace+(typeof d>"u"?":":d)+c);return f.log=this.log,f}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let d;const f=(typeof c=="string"?c:"").split(/[\s,]+/),h=f.length;for(d=0;d"-"+d)].join(",");return n.enable(""),c}function a(c){if(c[c.length-1]==="*")return!0;let d,f;for(d=0,f=n.skips.length;d{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let c=0,d=0;u[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(c++,f==="%c"&&(d=c))}),u.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function i(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")}catch{}return!u&&typeof Rt<"u"&&"env"in Rt&&(u={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.DEBUG),u}function a(){try{return localStorage}catch{}}e.exports=cRe(t);const{formatters:s}=e.exports;s.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(j6,j6.exports);var UU=j6.exports,yQ={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},bQ={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},RU={},PU={},Lm={};Object.keys(yQ).forEach(function(e){var t=RU[e]="\x1B["+yQ[e]+"m",n=PU[e]="\x1B[39m";Lm[e]=function(r){return t+r+n}});Object.keys(bQ).forEach(function(e){var t=RU[e]="\x1B["+bQ[e]+"m",n=PU[e]="\x1B[49m";Lm[e]=function(r){return t+r+n}});var WS=Lm;Lm.open=RU;Lm.close=PU;var qie=V&&V.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.UnreachableCaseError=Fr.stringify=Fr.bytes=Fr.beetBytes=Fr.logTrace=Fr.logDebug=Fr.logInfo=Fr.logError=void 0;const ZS=qie(UU),uRe=qie(WS),mQ=or,{brightBlack:Yie}=uRe.default;Fr.logError=(0,ZS.default)("beet:error");Fr.logInfo=(0,ZS.default)("beet:info");Fr.logDebug=(0,ZS.default)("beet:debug");Fr.logTrace=(0,ZS.default)("beet:trace");function lRe(e,t=!1){let n;if((0,mQ.isFixableBeet)(e))n="? B";else if((0,mQ.isElementCollectionFixedSizeBeet)(e)){const r=t?"length":e.length,i=e.lenPrefixByteSize;n=i>0?`${i} + (${e.elementByteSize} * ${r}) B (${e.byteSize} B)`:`(${e.elementByteSize} * ${r}) B (${e.byteSize} B)`}else n=`${e.byteSize} B`;return Yie(n)}Fr.beetBytes=lRe;function dRe(e){return Yie(`${e} B`)}Fr.bytes=dRe;function fRe(e){return e.toString==="function"?e.toString():e}Fr.stringify=fRe;let hRe=class extends Error{constructor(t){super(`Unreachable case: ${t}`)}};Fr.UnreachableCaseError=hRe;var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.fixBeetFromValue=Xc.fixBeetFromData=void 0;const A3=or,Jie=Fr;function gRe(e,t,n){if((0,A3.isFixedSizeBeet)(e))return e;if((0,A3.isFixableBeet)(e))return e.toFixedFromData(t,n);throw new Jie.UnreachableCaseError(e)}Xc.fixBeetFromData=gRe;function pRe(e,t){if((0,A3.isFixedSizeBeet)(e))return e;if((0,A3.isFixableBeet)(e))return e.toFixedFromValue(t);throw new Jie.UnreachableCaseError(e)}Xc.fixBeetFromValue=pRe;Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectionsTypeMap=Ki.uint8Array=Ki.fixedSizeUint8Array=Ki.fixedSizeBuffer=Ki.array=Ki.fixedSizeArray=Ki.uniformFixedSizeArray=void 0;const I0=or,yh=Yr(),Ed=Id,E0=or,Vie=Fr,vQ=Xc;function yRe(e,t,n=!1){const r=e.byteSize*t,i=n?4+r:r;return{write:function(o,a,s){yh.strict.equal(s.length,t,`array length ${s.length} should match len ${t}`),n&&(Ed.u32.write(o,a,t),a+=4);for(let u=0;u(${t})`}}Ki.uniformFixedSizeArray=yRe;function G6(e,t){const n=e.length,r=n===0?"":e[0].description;return{write:function(i,o,a){yh.strict.equal(a.length,n,`array length ${a.length} should match len ${n}`),Ed.u32.write(i,o,n);let s=o+4;for(let u=0;u(${n})[ 4 + ${t} ]`}}Ki.fixedSizeArray=G6;function bRe(e){return{toFixedFromData(t,n){const r=Ed.u32.read(t,n);(0,Vie.logTrace)(`${this.description}[${r}]`);const i=n+4;let o=i;const a=new Array(r);for(let s=0;s`}}Fo.coptionNone=Q6;function q6(e){const t=1+e.byteSize,n={write:function(r,i,o){(0,K6.assertFixedSizeBeet)(e,`coption inner type ${e.description} needs to be fixed before calling write`),(0,hb.strict)(o!=null,"coptionSome cannot handle `null` values"),r[i]=_ie,e.write(r,i+1,o)},read:function(r,i){return(0,K6.assertFixedSizeBeet)(e,`coption inner type ${e.description} needs to be fixed before calling read`),(0,hb.strict)(zU(r,i),"coptionSome can only handle `SOME` data"),e.read(r,i+1)},description:`COption<${e.description}>[1 + ${e.byteSize}]`,byteSize:t,inner:e};return(0,Zie.logTrace)(n.description),n}Fo.coptionSome=q6;function mRe(e){return{toFixedFromData(t,n){if(zU(t,n)){const r=(0,AQ.fixBeetFromData)(e,t,n+1);return q6(r)}else return(0,hb.strict)(jU(t,n),`Expected ${t} to hold a COption`),Q6(e.description)},toFixedFromValue(t){return t==null?Q6(e.description):q6((0,AQ.fixBeetFromValue)(e,t))},description:`COption<${e.description}>`}}Fo.coption=mRe;Fo.compositesTypeMap={option:{beet:"coption",isFixable:!0,sourcePack:wQ.BEET_PACKAGE,ts:"COption",arg:K6.BEET_TYPE_ARG_INNER,pack:wQ.BEET_PACKAGE}};var Y6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.stringTypeMap=e.utf8String=e.fixedSizeUtf8String=void 0;const t=or,n=Yr(),r=Id,i=Fr,o=a=>({write:function(s,u,l){const c=Be.Buffer.from(l,"utf8");n.strict.equal(c.byteLength,a,`${l} has invalid byte size`),r.u32.write(s,u,a),c.copy(s,u+4,0,a)},read:function(s,u){const l=r.u32.read(s,u);return n.strict.equal(l,a,"invalid byte size"),s.slice(u+4,u+4+a).toString("utf8")},elementByteSize:1,length:a,lenPrefixByteSize:4,byteSize:4+a,description:`Utf8String(4 + ${a})`});e.fixedSizeUtf8String=o,e.utf8String={toFixedFromData(a,s){const u=r.u32.read(a,s);return(0,i.logTrace)(`${this.description}[${u}]`),(0,e.fixedSizeUtf8String)(u)},toFixedFromValue(a){const s=Be.Buffer.from(a).byteLength;return(0,e.fixedSizeUtf8String)(s)},description:"Utf8String"},e.stringTypeMap={fixedSizeString:{beet:"fixedSizeUtf8String",isFixable:!1,sourcePack:t.BEET_PACKAGE,ts:"string",arg:t.BEET_TYPE_ARG_LEN},string:{beet:"utf8String",isFixable:!0,sourcePack:t.BEET_PACKAGE,ts:"string"}}})(Y6);var Qs={},Kc={},bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.BeetReader=bh.BeetWriter=void 0;const vRe=Yr();let wRe=class{constructor(t){this.buf=Be.Buffer.alloc(t),this._offset=0}get buffer(){return this.buf}get offset(){return this._offset}maybeResize(t){this._offset+t>this.buf.length&&vRe.strict.fail(`We shouldn't ever need to resize, but ${this._offset+t} > ${this.buf.length}`)}write(t,n){this.maybeResize(t.byteSize),t.write(this.buf,this._offset,n),this._offset+=t.byteSize}writeStruct(t,n){for(const[r,i]of n){const o=t[r];this.write(i,o)}}};bh.BeetWriter=wRe;let ARe=class{constructor(t,n=0){this.buffer=t,this._offset=n}get offset(){return this._offset}read(t){const n=t.read(this.buffer,this._offset);return this._offset+=t.byteSize,n}readStruct(t){const n={};for(const[r,i]of t)n[r]=this.read(i);return n}};bh.BeetReader=ARe;Object.defineProperty(Kc,"__esModule",{value:!0});Kc.BeetArgsStruct=Kc.isBeetStruct=Kc.BeetStruct=void 0;const IQ=bh,mu=Fr;let km=class J6{constructor(t,n,r=J6.description){if(this.fields=t,this.construct=n,this.description=r,this.byteSize=this.getByteSize(),mu.logDebug.enabled){const i=t.map(([o,a])=>`${String(o)}: ${a.description} ${(0,mu.beetBytes)(a)}`).join(` +`)===0?j.substr(1,j.length):j}).forEach(function(j){var U=j.split(":"),N=U.shift().trim();if(N){var P=U.join(":").trim();B.append(N,P)}}),B}R.call(G.prototype);function D(A,B){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B||(B={}),this.type="default",this.status=B.status===void 0?200:B.status,this.ok=this.status>=200&&this.status<300,this.statusText=B.statusText===void 0?"":""+B.statusText,this.headers=new b(B.headers),this.url=B.url||"",this._initBody(A)}R.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},D.error=function(){var A=new D(null,{status:0,statusText:""});return A.type="error",A};var v=[301,302,303,307,308];D.redirect=function(A,B){if(v.indexOf(B)===-1)throw new RangeError("Invalid status code");return new D(null,{status:B,headers:{location:A}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(B,O){this.message=B,this.name=O;var j=Error(B);this.stack=j.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function p(A,B){return new Promise(function(O,j){var U=new G(A,B);if(U.signal&&U.signal.aborted)return j(new a.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function P(){N.abort()}N.onload=function(){var Z={status:N.status,statusText:N.statusText,headers:K(N.getAllResponseHeaders()||"")};Z.url="responseURL"in N?N.responseURL:Z.headers.get("X-Request-URL");var ie="response"in N?N.response:N.responseText;setTimeout(function(){O(new D(ie,Z))},0)},N.onerror=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},N.ontimeout=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},N.onabort=function(){setTimeout(function(){j(new a.DOMException("Aborted","AbortError"))},0)};function x(Z){try{return Z===""&&s.location.href?s.location.href:Z}catch{return Z}}N.open(U.method,x(U.url),!0),U.credentials==="include"?N.withCredentials=!0:U.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&(u.blob?N.responseType="blob":u.arrayBuffer&&U.headers.get("Content-Type")&&U.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(N.responseType="arraybuffer")),B&&typeof B.headers=="object"&&!(B.headers instanceof b)?Object.getOwnPropertyNames(B.headers).forEach(function(Z){N.setRequestHeader(Z,h(B.headers[Z]))}):U.headers.forEach(function(Z,ie){N.setRequestHeader(ie,Z)}),U.signal&&(U.signal.addEventListener("abort",P),N.onreadystatechange=function(){N.readyState===4&&U.signal.removeEventListener("abort",P)}),N.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return p.polyfill=!0,s.fetch||(s.fetch=p,s.Headers=b,s.Request=G,s.Response=D),a.Headers=b,a.Request=G,a.Response=D,a.fetch=p,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(R6,R6.exports);var GUe=R6.exports;const HUe=Pa(GUe);function KUe(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}const QUe=function(e){try{return Promise.resolve(HUe(e,{mode:"cors"})).then(function(t){if(t.status>=400)throw new Error(`Bad response ${t.statusText}`);return t.json()})}catch(t){return Promise.reject(t)}};function Ma(e,t,n){if(!e.s){if(n instanceof FU)if(n.s)t&1&&(t=n.s),n=n.v;else{n.o=Ma.bind(null,e,t);return}if(n&&n.then){n.then(Ma.bind(null,e,t),Ma.bind(null,e,2));return}e.s=t,e.v=n;const r=e.o;r&&r(e)}}const qUe="/.well-known/did.json",FU=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const o=i&1?t:n;if(o){try{Ma(r,1,o(this.v))}catch(a){Ma(r,2,a)}return r}else return this}return this.o=function(o){try{const a=o.v;o.s&1?Ma(r,1,t?t(a):a):n?Ma(r,1,n(a)):Ma(r,2,a)}catch(a){Ma(r,2,a)}},r},e}();function A0(e){return e instanceof FU&&e.s&1}function YUe(e,t){var n;do{var r=e();if(r&&r.then)if(A0(r))r=r.v;else{n=!0;break}var i=t();if(A0(i)&&(i=i.v),!i)return r}while(!i.then);const o=new FU,a=Ma.bind(null,o,2);return(n?r.then(s):i.then(u)).then(void 0,a),o;function s(l){for(r=l;i=t(),A0(i)&&(i=i.v),!!i;){if(i.then){i.then(u).then(void 0,a);return}if(r=e(),r&&r.then)if(A0(r))r=r.v;else{r.then(s).then(void 0,a);return}}Ma(o,1,r)}function u(l){if(l){do{if(r=e(),r&&r.then)if(A0(r))r=r.v;else{r.then(s).then(void 0,a);return}if(l=t(),A0(l)&&(l=l.v),!l){Ma(o,1,r);return}}while(!l.then);l.then(u).then(void 0,a)}else Ma(o,1,r)}}function zie(){return{web:function(t,n){try{let i=function(){const f=typeof c?.["@context"]<"u"?"application/did+ld+json":"application/did+json";return o?{didDocument:c,didDocumentMetadata:l,didResolutionMetadata:{error:"notFound",message:o}}:{didDocument:c,didDocumentMetadata:l,didResolutionMetadata:{contentType:f}}},r,o=null,a=decodeURIComponent(n.id)+qUe;const s=n.id.split(":");s.length>1&&(a=s.map(decodeURIComponent).join("/")+"/did.json");const u=`https://${a}`,l={};let c=null;const d=YUe(function(){function f(){r||c?.id===t||(o="resolver_error: DID document id does not match requested did")}const h=KUe(function(){return Promise.resolve(QUe(u)).then(function(g){c=g})},function(g){o=`resolver_error: DID must resolve to a valid https URL containing a JSON document: ${g}`,r=1});return h&&h.then?h.then(f):f(h)},function(){return!r&&!1});return Promise.resolve(d&&d.then?d.then(i):i(d))}catch(r){return Promise.reject(r)}}}}var ps={},YS={},jie={},$o={},JS={};Object.defineProperty(JS,"__esModule",{value:!0});JS.errorCodeFromLogs=void 0;const JUe=/Custom program error: (0x[a-f0-9]+)/i;function VUe(e){for(const t of e){const n=t.match(JUe);if(n==null)continue;const r=n[1];try{return parseInt(r)}catch{}}return null}JS.errorCodeFromLogs=VUe;var Gie={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LangErrorMessage=e.LangErrorCode=void 0,e.LangErrorCode={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,StateInvalidAddress:4e3,Deprecated:5e3},e.LangErrorMessage=new Map([[e.LangErrorCode.InstructionMissing,"8 byte instruction identifier not provided"],[e.LangErrorCode.InstructionFallbackNotFound,"Fallback functions are not supported"],[e.LangErrorCode.InstructionDidNotDeserialize,"The program could not deserialize the given instruction"],[e.LangErrorCode.InstructionDidNotSerialize,"The program could not serialize the given instruction"],[e.LangErrorCode.IdlInstructionStub,"The program was compiled without idl instructions"],[e.LangErrorCode.IdlInstructionInvalidProgram,"The transaction was given an invalid program for the IDL instruction"],[e.LangErrorCode.ConstraintMut,"A mut constraint was violated"],[e.LangErrorCode.ConstraintHasOne,"A has_one constraint was violated"],[e.LangErrorCode.ConstraintSigner,"A signer constraint was violated"],[e.LangErrorCode.ConstraintRaw,"A raw constraint was violated"],[e.LangErrorCode.ConstraintOwner,"An owner constraint was violated"],[e.LangErrorCode.ConstraintRentExempt,"A rent exempt constraint was violated"],[e.LangErrorCode.ConstraintSeeds,"A seeds constraint was violated"],[e.LangErrorCode.ConstraintExecutable,"An executable constraint was violated"],[e.LangErrorCode.ConstraintState,"A state constraint was violated"],[e.LangErrorCode.ConstraintAssociated,"An associated constraint was violated"],[e.LangErrorCode.ConstraintAssociatedInit,"An associated init constraint was violated"],[e.LangErrorCode.ConstraintClose,"A close constraint was violated"],[e.LangErrorCode.ConstraintAddress,"An address constraint was violated"],[e.LangErrorCode.ConstraintZero,"Expected zero account discriminant"],[e.LangErrorCode.ConstraintTokenMint,"A token mint constraint was violated"],[e.LangErrorCode.ConstraintTokenOwner,"A token owner constraint was violated"],[e.LangErrorCode.ConstraintMintMintAuthority,"A mint mint authority constraint was violated"],[e.LangErrorCode.ConstraintMintFreezeAuthority,"A mint freeze authority constraint was violated"],[e.LangErrorCode.ConstraintMintDecimals,"A mint decimals constraint was violated"],[e.LangErrorCode.ConstraintSpace,"A space constraint was violated"],[e.LangErrorCode.AccountDiscriminatorAlreadySet,"The account discriminator was already set on this account"],[e.LangErrorCode.AccountDiscriminatorNotFound,"No 8 byte discriminator was found on the account"],[e.LangErrorCode.AccountDiscriminatorMismatch,"8 byte discriminator did not match what was expected"],[e.LangErrorCode.AccountDidNotDeserialize,"Failed to deserialize the account"],[e.LangErrorCode.AccountDidNotSerialize,"Failed to serialize the account"],[e.LangErrorCode.AccountNotEnoughKeys,"Not enough account keys given to the instruction"],[e.LangErrorCode.AccountNotMutable,"The given account is not mutable"],[e.LangErrorCode.AccountOwnedByWrongProgram,"The given account is owned by a different program than expected"],[e.LangErrorCode.InvalidProgramId,"Program ID was not as expected"],[e.LangErrorCode.InvalidProgramExecutable,"Program account is not executable"],[e.LangErrorCode.AccountNotSigner,"The given account did not sign"],[e.LangErrorCode.AccountNotSystemOwned,"The given account is not owned by the system program"],[e.LangErrorCode.AccountNotInitialized,"The program expected this account to be already initialized"],[e.LangErrorCode.AccountNotProgramData,"The given account is not a program data account"],[e.LangErrorCode.StateInvalidAddress,"The given state account does not have the correct address"],[e.LangErrorCode.Deprecated,"The API being used is deprecated and should no longer be used"]])})(Gie);var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.tokenLendingErrors=void 0;VS.tokenLendingErrors=new Map([[0,{code:0,message:'Failed to unpack instruction data"',name:"InstructionUnpackError"}],[1,{code:1,message:'Account is already initialized"',name:"AlreadyInitialized"}],[2,{code:2,message:'Lamport balance below rent-exempt threshold"',name:"NotRentExempt"}],[3,{code:3,message:'Market authority is invalid"',name:"InvalidMarketAuthority"}],[4,{code:4,message:'Market owner is invalid"',name:"InvalidMarketOwner"}],[5,{code:5,message:'Input account owner is not the program address"',name:"InvalidAccountOwner"}],[6,{code:6,message:'Input token account is not owned by the correct token program id"',name:"InvalidTokenOwner"}],[7,{code:7,message:'Input token account is not valid"',name:"InvalidTokenAccount"}],[8,{code:8,message:'Input token mint account is not valid"',name:"InvalidTokenMint"}],[9,{code:9,message:'Input token program account is not valid"',name:"InvalidTokenProgram"}],[10,{code:10,message:'Input amount is invalid"',name:"InvalidAmount"}],[11,{code:11,message:'Input config value is invalid"',name:"InvalidConfig"}],[12,{code:12,message:'Input account must be a signer"',name:"InvalidSigner"}],[13,{code:13,message:'Invalid account input"',name:"InvalidAccountInput"}],[14,{code:14,message:'Math operation overflow"',name:"MathOverflow"}],[15,{code:15,message:'Token initialize mint failed"',name:"TokenInitializeMintFailed"}],[16,{code:16,message:'Token initialize account failed"',name:"TokenInitializeAccountFailed"}],[17,{code:17,message:'Token transfer failed"',name:"TokenTransferFailed"}],[18,{code:18,message:'Token mint to failed"',name:"TokenMintToFailed"}],[19,{code:19,message:'Token burn failed"',name:"TokenBurnFailed"}],[20,{code:20,message:'Insufficient liquidity available"',name:"InsufficientLiquidity"}],[21,{code:21,message:'Input reserve has collateral disabled"',name:"ReserveCollateralDisabled"}],[22,{code:22,message:'Reserve state needs to be refreshed"',name:"ReserveStale"}],[23,{code:23,message:'Withdraw amount too small"',name:"WithdrawTooSmall"}],[24,{code:24,message:'Withdraw amount too large"',name:"WithdrawTooLarge"}],[25,{code:25,message:'Borrow amount too small to receive liquidity after fees"',name:"BorrowTooSmall"}],[26,{code:26,message:'Borrow amount too large for deposited collateral"',name:"BorrowTooLarge"}],[27,{code:27,message:'Repay amount too small to transfer liquidity"',name:"RepayTooSmall"}],[28,{code:28,message:'Liquidation amount too small to receive collateral"',name:"LiquidationTooSmall"}],[29,{code:29,message:'Cannot liquidate healthy obligations"',name:"ObligationHealthy"}],[30,{code:30,message:'Obligation state needs to be refreshed"',name:"ObligationStale"}],[31,{code:31,message:'Obligation reserve limit exceeded"',name:"ObligationReserveLimit"}],[32,{code:32,message:'Obligation owner is invalid"',name:"InvalidObligationOwner"}],[33,{code:33,message:'Obligation deposits are empty"',name:"ObligationDepositsEmpty"}],[34,{code:34,message:'Obligation borrows are empty"',name:"ObligationBorrowsEmpty"}],[35,{code:35,message:'Obligation deposits have zero value"',name:"ObligationDepositsZero"}],[36,{code:36,message:'Obligation borrows have zero value"',name:"ObligationBorrowsZero"}],[37,{code:37,message:'Invalid obligation collateral"',name:"InvalidObligationCollateral"}],[38,{code:38,message:'Invalid obligation liquidity"',name:"InvalidObligationLiquidity"}],[39,{code:39,message:'Obligation collateral is empty"',name:"ObligationCollateralEmpty"}],[40,{code:40,message:'Obligation liquidity is empty"',name:"ObligationLiquidityEmpty"}],[41,{code:41,message:'Interest rate is negative"',name:"NegativeInterestRate"}],[42,{code:42,message:'Input oracle config is invalid"',name:"InvalidOracleConfig"}],[43,{code:43,message:'Input flash loan receiver program account is not valid"',name:"InvalidFlashLoanReceiverProgram"}],[44,{code:44,message:'Not enough liquidity after flash loan"',name:"NotEnoughLiquidityAfterFlashLoan"}]]);var WUe=V&&V.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),ZUe=V&&V.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),XUe=V&&V.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&WUe(t,e,n);return ZUe(t,e),t};Object.defineProperty($o,"__esModule",{value:!0});$o.TokenLendingError=$o.AnchorError=$o.CustomProgramError=$o.CusperUnknownError=$o.initCusper=$o.ErrorResolver=void 0;const _Ue=JS,gQ=XUe(Gie),$Ue=VS;class Hie{constructor(t){this.resolveErrorFromCode=t}errorFromCode(t,n,r=!0){let i=this.resolveErrorFromCode!=null?this.resolveErrorFromCode(t):null;if(i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(i=Xg.fromCode(t),i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(i=_g.fromCode(t),i!=null)return this.passPreparedError(i,n??this.errorFromCode);if(r)return i=new P6(t,"CusperUnknownError","cusper does not know this error"),this.passPreparedError(i,n??this.errorFromCode)}errorFromProgramLogs(t,n=!0){const r=(0,_Ue.errorCodeFromLogs)(t);return r==null?null:this.errorFromCode(r,this.errorFromProgramLogs,n)}throwError(t){const n=t.logs!=null&&this.errorFromProgramLogs(t.logs,!0)||new P6(-1,"Error created without logs and thus without error code");throw this.passPreparedError(n,this.throwError)}passPreparedError(t,n){return t==null?null:(typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(t,n),t)}}$o.ErrorResolver=Hie;function eRe(e){return new Hie(e)}$o.initCusper=eRe;class P6 extends Error{constructor(t,...n){super(...n),this.code=t,this.name="CusperUnknownError"}}$o.CusperUnknownError=P6;class tRe extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`CustomProgramError#${n}`}}$o.CustomProgramError=tRe;class Xg extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`AnchorError#${n}`}static fromCode(t){const n=Xg.errorMap.get(t);return n!=null?new Xg(n.code,n.name,n.message):null}toString(){return`${this.name}: ${this.message}`}}$o.AnchorError=Xg;Xg.errorMap=Object.entries(gQ.LangErrorCode).reduce((e,[t,n])=>(e.set(n,{code:n,name:t,message:gQ.LangErrorMessage.get(n)}),e),new Map);class _g extends Error{constructor(t,n,...r){super(...r),this.code=t,this.name=`TokenLendingError#${n}`}static fromCode(t){const n=_g.errorMap.get(t);return n!=null?new _g(n.code,n.name,n.message):null}toString(){return`${this.name}: ${this.message}`}}$o.TokenLendingError=_g;_g.errorMap=$Ue.tokenLendingErrors;var Kie={};Object.defineProperty(Kie,"__esModule",{value:!0});(function(e){var t=V&&V.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o),Object.defineProperty(r,a,{enumerable:!0,get:function(){return i[o]}})}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=V&&V.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n($o,e),n(Kie,e)})(jie);var pB={},yB={},z6={},he={},Ki={},or={};Object.defineProperty(or,"__esModule",{value:!0});or.isElementCollectionFixedSizeBeet=or.isFixableBeet=or.assertFixedSizeBeet=or.isFixedSizeBeet=or.BEET_TYPE_ARG_INNER=or.BEET_TYPE_ARG_LEN=or.BEET_PACKAGE=void 0;const nRe=Yr();or.BEET_PACKAGE="@metaplex-foundation/beet";or.BEET_TYPE_ARG_LEN="len";or.BEET_TYPE_ARG_INNER="Beet<{innner}>";function Qie(e){return Object.keys(e).includes("byteSize")}or.isFixedSizeBeet=Qie;function rRe(e,t=`${e} should have been a fixed beet`){(0,nRe.strict)(Qie(e),t)}or.assertFixedSizeBeet=rRe;function iRe(e){return typeof e.toFixedFromData=="function"&&typeof e.toFixedFromValue=="function"}or.isFixableBeet=iRe;function oRe(e){const t=Object.keys(e);return t.includes("length")&&t.includes("elementByteSize")&&t.includes("lenPrefixByteSize")}or.isElementCollectionFixedSizeBeet=oRe;var Id={};(function(e){var t=V&&V.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.numbersTypeMap=e.bool=e.i512=e.i256=e.i128=e.i64=e.i32=e.i16=e.i8=e.u512=e.u256=e.u128=e.u64=e.u32=e.u16=e.u8=void 0;const n=t(Pd),r=or;e.u8={write:function(a,s,u){a.writeUInt8(u,s)},read:function(a,s){return a.readUInt8(s)},byteSize:1,description:"u8"},e.u16={write:function(a,s,u){a.writeUInt16LE(u,s)},read:function(a,s){return a.readUInt16LE(s)},byteSize:2,description:"u16"},e.u32={write:function(a,s,u){a.writeUInt32LE(u,s)},read:function(a,s){return a.readUInt32LE(s)},byteSize:4,description:"u32"};function i(a,s){return{write:function(u,l,c){const f=(n.default.isBN(c)?c:new n.default(c)).toArray("le",this.byteSize);Be.Buffer.from(f).copy(u,l,0,this.byteSize)},read:function(u,l){const c=u.slice(l,l+this.byteSize);return new n.default(c,"le")},byteSize:a,description:s}}e.u64=i(8,"u64"),e.u128=i(16,"u128"),e.u256=i(32,"u256"),e.u512=i(64,"u512"),e.i8={write:function(a,s,u){a.writeInt8(u,s)},read:function(a,s){return a.readInt8(s)},byteSize:1,description:"i8"},e.i16={write:function(a,s,u){a.writeInt16LE(u,s)},read:function(a,s){return a.readInt16LE(s)},byteSize:2,description:"i16"},e.i32={write:function(a,s,u){a.writeInt32LE(u,s)},read:function(a,s){return a.readInt32LE(s)},byteSize:4,description:"i32"};function o(a,s){const u=a*8;return{write:function(l,c,d){const h=(n.default.isBN(d)?d:new n.default(d)).toTwos(u).toArray("le",this.byteSize);Be.Buffer.from(h).copy(l,c,0,this.byteSize)},read:function(l,c){const d=l.slice(c,c+this.byteSize);return new n.default(d,"le").fromTwos(u)},byteSize:a,description:s}}e.i64=o(8,"i64"),e.i128=o(16,"i128"),e.i256=o(32,"i256"),e.i512=o(64,"i512"),e.bool={write:function(a,s,u){const l=u?1:0;e.u8.write(a,s,l)},read:function(a,s){return e.u8.read(a,s)===1},byteSize:1,description:"bool"},e.numbersTypeMap={u8:{beet:"u8",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},u16:{beet:"u16",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},u32:{beet:"u32",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i8:{beet:"i8",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i16:{beet:"i16",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},i32:{beet:"i32",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"number"},bool:{beet:"bool",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"boolean"},u64:{beet:"u64",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u128:{beet:"u128",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u256:{beet:"u256",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},u512:{beet:"u512",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i64:{beet:"i64",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i128:{beet:"i128",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i256:{beet:"i256",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE},i512:{beet:"i512",isFixable:!1,sourcePack:r.BEET_PACKAGE,ts:"bignum",pack:r.BEET_PACKAGE}}})(Id);var Fr={},j6={exports:{}},bB,pQ;function aRe(){if(pQ)return bB;pQ=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,o=r*365.25;bB=function(c,d){d=d||{};var f=typeof c;if(f==="string"&&c.length>0)return a(c);if(f==="number"&&isFinite(c))return d.long?u(c):s(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function a(c){if(c=String(c),!(c.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(d){var f=parseFloat(d[1]),h=(d[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return f*o;case"weeks":case"week":case"w":return f*i;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function s(c){var d=Math.abs(c);return d>=r?Math.round(c/r)+"d":d>=n?Math.round(c/n)+"h":d>=t?Math.round(c/t)+"m":d>=e?Math.round(c/e)+"s":c+"ms"}function u(c){var d=Math.abs(c);return d>=r?l(c,d,r,"day"):d>=n?l(c,d,n,"hour"):d>=t?l(c,d,t,"minute"):d>=e?l(c,d,e,"second"):c+" ms"}function l(c,d,f,h){var g=d>=f*1.5;return Math.round(c/f)+" "+h+(g?"s":"")}return bB}function sRe(e){n.debug=n,n.default=n,n.coerce=u,n.disable=o,n.enable=i,n.enabled=a,n.humanize=aRe(),n.destroy=l,Object.keys(e).forEach(c=>{n[c]=e[c]}),n.names=[],n.skips=[],n.formatters={};function t(c){let d=0;for(let f=0;f{if(R==="%%")return"%";C++;const w=n.formatters[m];if(typeof w=="function"){const G=y[C];R=w.call(M,G),y.splice(C,1),C--}return R}),n.formatArgs.call(M,y),(M.log||n.log).apply(M,y)}return b.namespace=c,b.useColors=n.useColors(),b.color=n.selectColor(c),b.extend=r,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(c)),g),set:y=>{f=y}}),typeof n.init=="function"&&n.init(b),b}function r(c,d){const f=n(this.namespace+(typeof d>"u"?":":d)+c);return f.log=this.log,f}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let d;const f=(typeof c=="string"?c:"").split(/[\s,]+/),h=f.length;for(d=0;d"-"+d)].join(",");return n.enable(""),c}function a(c){if(c[c.length-1]==="*")return!0;let d,f;for(d=0,f=n.skips.length;d{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let c=0,d=0;u[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(c++,f==="%c"&&(d=c))}),u.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function i(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")}catch{}return!u&&typeof Rt<"u"&&"env"in Rt&&(u={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.DEBUG),u}function a(){try{return localStorage}catch{}}e.exports=cRe(t);const{formatters:s}=e.exports;s.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(j6,j6.exports);var UU=j6.exports,yQ={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},bQ={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},RU={},PU={},Lm={};Object.keys(yQ).forEach(function(e){var t=RU[e]="\x1B["+yQ[e]+"m",n=PU[e]="\x1B[39m";Lm[e]=function(r){return t+r+n}});Object.keys(bQ).forEach(function(e){var t=RU[e]="\x1B["+bQ[e]+"m",n=PU[e]="\x1B[49m";Lm[e]=function(r){return t+r+n}});var WS=Lm;Lm.open=RU;Lm.close=PU;var qie=V&&V.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.UnreachableCaseError=Fr.stringify=Fr.bytes=Fr.beetBytes=Fr.logTrace=Fr.logDebug=Fr.logInfo=Fr.logError=void 0;const ZS=qie(UU),uRe=qie(WS),mQ=or,{brightBlack:Yie}=uRe.default;Fr.logError=(0,ZS.default)("beet:error");Fr.logInfo=(0,ZS.default)("beet:info");Fr.logDebug=(0,ZS.default)("beet:debug");Fr.logTrace=(0,ZS.default)("beet:trace");function lRe(e,t=!1){let n;if((0,mQ.isFixableBeet)(e))n="? B";else if((0,mQ.isElementCollectionFixedSizeBeet)(e)){const r=t?"length":e.length,i=e.lenPrefixByteSize;n=i>0?`${i} + (${e.elementByteSize} * ${r}) B (${e.byteSize} B)`:`(${e.elementByteSize} * ${r}) B (${e.byteSize} B)`}else n=`${e.byteSize} B`;return Yie(n)}Fr.beetBytes=lRe;function dRe(e){return Yie(`${e} B`)}Fr.bytes=dRe;function fRe(e){return e.toString==="function"?e.toString():e}Fr.stringify=fRe;let hRe=class extends Error{constructor(t){super(`Unreachable case: ${t}`)}};Fr.UnreachableCaseError=hRe;var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.fixBeetFromValue=Xc.fixBeetFromData=void 0;const A3=or,Jie=Fr;function gRe(e,t,n){if((0,A3.isFixedSizeBeet)(e))return e;if((0,A3.isFixableBeet)(e))return e.toFixedFromData(t,n);throw new Jie.UnreachableCaseError(e)}Xc.fixBeetFromData=gRe;function pRe(e,t){if((0,A3.isFixedSizeBeet)(e))return e;if((0,A3.isFixableBeet)(e))return e.toFixedFromValue(t);throw new Jie.UnreachableCaseError(e)}Xc.fixBeetFromValue=pRe;Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectionsTypeMap=Ki.uint8Array=Ki.fixedSizeUint8Array=Ki.fixedSizeBuffer=Ki.array=Ki.fixedSizeArray=Ki.uniformFixedSizeArray=void 0;const I0=or,yh=Yr(),Ed=Id,E0=or,Vie=Fr,vQ=Xc;function yRe(e,t,n=!1){const r=e.byteSize*t,i=n?4+r:r;return{write:function(o,a,s){yh.strict.equal(s.length,t,`array length ${s.length} should match len ${t}`),n&&(Ed.u32.write(o,a,t),a+=4);for(let u=0;u(${t})`}}Ki.uniformFixedSizeArray=yRe;function G6(e,t){const n=e.length,r=n===0?"":e[0].description;return{write:function(i,o,a){yh.strict.equal(a.length,n,`array length ${a.length} should match len ${n}`),Ed.u32.write(i,o,n);let s=o+4;for(let u=0;u(${n})[ 4 + ${t} ]`}}Ki.fixedSizeArray=G6;function bRe(e){return{toFixedFromData(t,n){const r=Ed.u32.read(t,n);(0,Vie.logTrace)(`${this.description}[${r}]`);const i=n+4;let o=i;const a=new Array(r);for(let s=0;s`}}Fo.coptionNone=Q6;function q6(e){const t=1+e.byteSize,n={write:function(r,i,o){(0,K6.assertFixedSizeBeet)(e,`coption inner type ${e.description} needs to be fixed before calling write`),(0,hb.strict)(o!=null,"coptionSome cannot handle `null` values"),r[i]=_ie,e.write(r,i+1,o)},read:function(r,i){return(0,K6.assertFixedSizeBeet)(e,`coption inner type ${e.description} needs to be fixed before calling read`),(0,hb.strict)(zU(r,i),"coptionSome can only handle `SOME` data"),e.read(r,i+1)},description:`COption<${e.description}>[1 + ${e.byteSize}]`,byteSize:t,inner:e};return(0,Zie.logTrace)(n.description),n}Fo.coptionSome=q6;function mRe(e){return{toFixedFromData(t,n){if(zU(t,n)){const r=(0,AQ.fixBeetFromData)(e,t,n+1);return q6(r)}else return(0,hb.strict)(jU(t,n),`Expected ${t} to hold a COption`),Q6(e.description)},toFixedFromValue(t){return t==null?Q6(e.description):q6((0,AQ.fixBeetFromValue)(e,t))},description:`COption<${e.description}>`}}Fo.coption=mRe;Fo.compositesTypeMap={option:{beet:"coption",isFixable:!0,sourcePack:wQ.BEET_PACKAGE,ts:"COption",arg:K6.BEET_TYPE_ARG_INNER,pack:wQ.BEET_PACKAGE}};var Y6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.stringTypeMap=e.utf8String=e.fixedSizeUtf8String=void 0;const t=or,n=Yr(),r=Id,i=Fr,o=a=>({write:function(s,u,l){const c=Be.Buffer.from(l,"utf8");n.strict.equal(c.byteLength,a,`${l} has invalid byte size`),r.u32.write(s,u,a),c.copy(s,u+4,0,a)},read:function(s,u){const l=r.u32.read(s,u);return n.strict.equal(l,a,"invalid byte size"),s.slice(u+4,u+4+a).toString("utf8")},elementByteSize:1,length:a,lenPrefixByteSize:4,byteSize:4+a,description:`Utf8String(4 + ${a})`});e.fixedSizeUtf8String=o,e.utf8String={toFixedFromData(a,s){const u=r.u32.read(a,s);return(0,i.logTrace)(`${this.description}[${u}]`),(0,e.fixedSizeUtf8String)(u)},toFixedFromValue(a){const s=Be.Buffer.from(a).byteLength;return(0,e.fixedSizeUtf8String)(s)},description:"Utf8String"},e.stringTypeMap={fixedSizeString:{beet:"fixedSizeUtf8String",isFixable:!1,sourcePack:t.BEET_PACKAGE,ts:"string",arg:t.BEET_TYPE_ARG_LEN},string:{beet:"utf8String",isFixable:!0,sourcePack:t.BEET_PACKAGE,ts:"string"}}})(Y6);var Qs={},Kc={},bh={};Object.defineProperty(bh,"__esModule",{value:!0});bh.BeetReader=bh.BeetWriter=void 0;const vRe=Yr();let wRe=class{constructor(t){this.buf=Be.Buffer.alloc(t),this._offset=0}get buffer(){return this.buf}get offset(){return this._offset}maybeResize(t){this._offset+t>this.buf.length&&vRe.strict.fail(`We shouldn't ever need to resize, but ${this._offset+t} > ${this.buf.length}`)}write(t,n){this.maybeResize(t.byteSize),t.write(this.buf,this._offset,n),this._offset+=t.byteSize}writeStruct(t,n){for(const[r,i]of n){const o=t[r];this.write(i,o)}}};bh.BeetWriter=wRe;let ARe=class{constructor(t,n=0){this.buffer=t,this._offset=n}get offset(){return this._offset}read(t){const n=t.read(this.buffer,this._offset);return this._offset+=t.byteSize,n}readStruct(t){const n={};for(const[r,i]of t)n[r]=this.read(i);return n}};bh.BeetReader=ARe;Object.defineProperty(Kc,"__esModule",{value:!0});Kc.BeetArgsStruct=Kc.isBeetStruct=Kc.BeetStruct=void 0;const IQ=bh,mu=Fr;let km=class J6{constructor(t,n,r=J6.description){if(this.fields=t,this.construct=n,this.description=r,this.byteSize=this.getByteSize(),mu.logDebug.enabled){const i=t.map(([o,a])=>`${String(o)}: ${a.description} ${(0,mu.beetBytes)(a)}`).join(` `);(0,mu.logDebug)(`struct ${r} { ${i} } ${(0,mu.beetBytes)(this)}`)}}read(t,n){const[r]=this.deserialize(t,n);return r}write(t,n,r){const[i,o]=this.serialize(r);i.copy(t,n,0,o)}deserialize(t,n=0){mu.logTrace.enabled&&((0,mu.logTrace)("deserializing [%s] from %d bytes buffer",this.description,t.byteLength),(0,mu.logTrace)(t),(0,mu.logTrace)(t.toJSON().data));const r=new IQ.BeetReader(t,n),i=r.readStruct(this.fields);return[this.construct(i),r.offset]}serialize(t,n=this.byteSize){(0,mu.logTrace)("serializing [%s] %o to %d bytes buffer",this.description,t,n);const r=new IQ.BeetWriter(n);return r.writeStruct(t,this.fields),[r.buffer,r.offset]}getByteSize(){return this.fields.reduce((t,[n,r])=>t+r.byteSize,0)}get type(){return J6.TYPE}};Kc.BeetStruct=km;km.description="BeetStruct";km.TYPE="BeetStruct";function IRe(e){return e.type===km.TYPE}Kc.isBeetStruct=IRe;let $ie=class eoe extends km{constructor(t,n=eoe.description){super(t,r=>r,n)}};Kc.BeetArgsStruct=$ie;$ie.description="BeetArgsStruct";var Wu={},ERe=V&&V.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.FixableBeetArgsStruct=Wu.isFixableBeetStruct=Wu.FixableBeetStruct=void 0;const EQ=Xc,kI=Kc,MRe=or,SRe=Yr(),mB=Fr,DRe=ERe(WS),{brightBlack:CRe}=DRe.default;let Bm=class $y{constructor(t,n,r=$y.description){this.fields=t,this.construct=n,this.description=r;let i=0;if(mB.logDebug.enabled){const o=t.map(([s,u])=>((0,MRe.isFixedSizeBeet)(u)&&(i+=u.byteSize),`${s}: ${u.description} ${(0,mB.beetBytes)(u)}`)).join(` @@ -371,7 +371,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * @license MIT */(function(e){const t=AC,n=GR,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.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 o(){try{const ae=new Uint8Array(1),$={foo:function(){return 42}};return Object.setPrototypeOf($,Uint8Array.prototype),Object.setPrototypeOf(ae,$),ae.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(ae){if(ae>i)throw new RangeError('The value "'+ae+'" is invalid for option "size"');const $=new Uint8Array(ae);return Object.setPrototypeOf($,s.prototype),$}function s(ae,$,ne){if(typeof ae=="number"){if(typeof $=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(ae)}return u(ae,$,ne)}s.poolSize=8192;function u(ae,$,ne){if(typeof ae=="string")return f(ae,$);if(ArrayBuffer.isView(ae))return g(ae);if(ae==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae);if(ve(ae,ArrayBuffer)||ae&&ve(ae.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(ae,SharedArrayBuffer)||ae&&ve(ae.buffer,SharedArrayBuffer)))return b(ae,$,ne);if(typeof ae=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const fe=ae.valueOf&&ae.valueOf();if(fe!=null&&fe!==ae)return s.from(fe,$,ne);const ge=y(ae);if(ge)return ge;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ae[Symbol.toPrimitive]=="function")return s.from(ae[Symbol.toPrimitive]("string"),$,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ae)}s.from=function(ae,$,ne){return u(ae,$,ne)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be of type number');if(ae<0)throw new RangeError('The value "'+ae+'" is invalid for option "size"')}function c(ae,$,ne){return l(ae),ae<=0?a(ae):$!==void 0?typeof ne=="string"?a(ae).fill($,ne):a(ae).fill($):a(ae)}s.alloc=function(ae,$,ne){return c(ae,$,ne)};function d(ae){return l(ae),a(ae<0?0:M(ae)|0)}s.allocUnsafe=function(ae){return d(ae)},s.allocUnsafeSlow=function(ae){return d(ae)};function f(ae,$){if((typeof $!="string"||$==="")&&($="utf8"),!s.isEncoding($))throw new TypeError("Unknown encoding: "+$);const ne=k(ae,$)|0;let fe=a(ne);const ge=fe.write(ae,$);return ge!==ne&&(fe=fe.slice(0,ge)),fe}function h(ae){const $=ae.length<0?0:M(ae.length)|0,ne=a($);for(let fe=0;fe<$;fe+=1)ne[fe]=ae[fe]&255;return ne}function g(ae){if(ve(ae,Uint8Array)){const $=new Uint8Array(ae);return b($.buffer,$.byteOffset,$.byteLength)}return h(ae)}function b(ae,$,ne){if($<0||ae.byteLength<$)throw new RangeError('"offset" is outside of buffer bounds');if(ae.byteLength<$+(ne||0))throw new RangeError('"length" is outside of buffer bounds');let fe;return $===void 0&&ne===void 0?fe=new Uint8Array(ae):ne===void 0?fe=new Uint8Array(ae,$):fe=new Uint8Array(ae,$,ne),Object.setPrototypeOf(fe,s.prototype),fe}function y(ae){if(s.isBuffer(ae)){const $=M(ae.length)|0,ne=a($);return ne.length===0||ae.copy(ne,0,0,$),ne}if(ae.length!==void 0)return typeof ae.length!="number"||Ae(ae.length)?a(0):h(ae);if(ae.type==="Buffer"&&Array.isArray(ae.data))return h(ae.data)}function M(ae){if(ae>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return ae|0}function E(ae){return+ae!=ae&&(ae=0),s.alloc(+ae)}s.isBuffer=function($){return $!=null&&$._isBuffer===!0&&$!==s.prototype},s.compare=function($,ne){if(ve($,Uint8Array)&&($=s.from($,$.offset,$.byteLength)),ve(ne,Uint8Array)&&(ne=s.from(ne,ne.offset,ne.byteLength)),!s.isBuffer($)||!s.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===ne)return 0;let fe=$.length,ge=ne.length;for(let Ie=0,ue=Math.min(fe,ge);Iege.length?(s.isBuffer(ue)||(ue=s.from(ue)),ue.copy(ge,Ie)):Uint8Array.prototype.set.call(ge,ue,Ie);else if(s.isBuffer(ue))ue.copy(ge,Ie);else throw new TypeError('"list" argument must be an Array of Buffers');Ie+=ue.length}return ge};function k(ae,$){if(s.isBuffer(ae))return ae.length;if(ArrayBuffer.isView(ae)||ve(ae,ArrayBuffer))return ae.byteLength;if(typeof ae!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ae);const ne=ae.length,fe=arguments.length>2&&arguments[2]===!0;if(!fe&&ne===0)return 0;let ge=!1;for(;;)switch($){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return _(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return ye(ae).length;default:if(ge)return fe?-1:_(ae).length;$=(""+$).toLowerCase(),ge=!0}}s.byteLength=k;function C(ae,$,ne){let fe=!1;if(($===void 0||$<0)&&($=0),$>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,$>>>=0,ne<=$))return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return U(this,$,ne);case"utf8":case"utf-8":return p(this,$,ne);case"ascii":return O(this,$,ne);case"latin1":case"binary":return j(this,$,ne);case"base64":return v(this,$,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,$,ne);default:if(fe)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),fe=!0}}s.prototype._isBuffer=!0;function H(ae,$,ne){const fe=ae[$];ae[$]=ae[ne],ae[ne]=fe}s.prototype.swap16=function(){const $=this.length;if($%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;ne<$;ne+=2)H(this,ne,ne+1);return this},s.prototype.swap32=function(){const $=this.length;if($%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ne=0;ne<$;ne+=4)H(this,ne,ne+3),H(this,ne+1,ne+2);return this},s.prototype.swap64=function(){const $=this.length;if($%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ne=0;ne<$;ne+=8)H(this,ne,ne+7),H(this,ne+1,ne+6),H(this,ne+2,ne+5),H(this,ne+3,ne+4);return this},s.prototype.toString=function(){const $=this.length;return $===0?"":arguments.length===0?p(this,0,$):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function($){if(!s.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:s.compare(this,$)===0},s.prototype.inspect=function(){let $="";const ne=e.INSPECT_MAX_BYTES;return $=this.toString("hex",0,ne).replace(/(.{2})/g,"$1 ").trim(),this.length>ne&&($+=" ... "),""},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function($,ne,fe,ge,Ie){if(ve($,Uint8Array)&&($=s.from($,$.offset,$.byteLength)),!s.isBuffer($))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(ne===void 0&&(ne=0),fe===void 0&&(fe=$?$.length:0),ge===void 0&&(ge=0),Ie===void 0&&(Ie=this.length),ne<0||fe>$.length||ge<0||Ie>this.length)throw new RangeError("out of range index");if(ge>=Ie&&ne>=fe)return 0;if(ge>=Ie)return-1;if(ne>=fe)return 1;if(ne>>>=0,fe>>>=0,ge>>>=0,Ie>>>=0,this===$)return 0;let ue=Ie-ge,J=fe-ne;const X=Math.min(ue,J),Ee=this.slice(ge,Ie),De=$.slice(ne,fe);for(let Se=0;Se2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,Ae(ne)&&(ne=ge?0:ae.length-1),ne<0&&(ne=ae.length+ne),ne>=ae.length){if(ge)return-1;ne=ae.length-1}else if(ne<0)if(ge)ne=0;else return-1;if(typeof $=="string"&&($=s.from($,fe)),s.isBuffer($))return $.length===0?-1:m(ae,$,ne,fe,ge);if(typeof $=="number")return $=$&255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(ae,$,ne):Uint8Array.prototype.lastIndexOf.call(ae,$,ne):m(ae,[$],ne,fe,ge);throw new TypeError("val must be string, number or Buffer")}function m(ae,$,ne,fe,ge){let Ie=1,ue=ae.length,J=$.length;if(fe!==void 0&&(fe=String(fe).toLowerCase(),fe==="ucs2"||fe==="ucs-2"||fe==="utf16le"||fe==="utf-16le")){if(ae.length<2||$.length<2)return-1;Ie=2,ue/=2,J/=2,ne/=2}function X(De,Se){return Ie===1?De[Se]:De.readUInt16BE(Se*Ie)}let Ee;if(ge){let De=-1;for(Ee=ne;Eeue&&(ne=ue-J),Ee=ne;Ee>=0;Ee--){let De=!0;for(let Se=0;Sege&&(fe=ge)):fe=ge;const Ie=$.length;fe>Ie/2&&(fe=Ie/2);let ue;for(ue=0;ue>>0,isFinite(fe)?(fe=fe>>>0,ge===void 0&&(ge="utf8")):(ge=fe,fe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ie=this.length-ne;if((fe===void 0||fe>Ie)&&(fe=Ie),$.length>0&&(fe<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");ge||(ge="utf8");let ue=!1;for(;;)switch(ge){case"hex":return w(this,$,ne,fe);case"utf8":case"utf-8":return G(this,$,ne,fe);case"ascii":case"latin1":case"binary":return Y(this,$,ne,fe);case"base64":return K(this,$,ne,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,$,ne,fe);default:if(ue)throw new TypeError("Unknown encoding: "+ge);ge=(""+ge).toLowerCase(),ue=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function v(ae,$,ne){return $===0&&ne===ae.length?t.fromByteArray(ae):t.fromByteArray(ae.slice($,ne))}function p(ae,$,ne){ne=Math.min(ae.length,ne);const fe=[];let ge=$;for(;ge239?4:Ie>223?3:Ie>191?2:1;if(ge+J<=ne){let X,Ee,De,Se;switch(J){case 1:Ie<128&&(ue=Ie);break;case 2:X=ae[ge+1],(X&192)===128&&(Se=(Ie&31)<<6|X&63,Se>127&&(ue=Se));break;case 3:X=ae[ge+1],Ee=ae[ge+2],(X&192)===128&&(Ee&192)===128&&(Se=(Ie&15)<<12|(X&63)<<6|Ee&63,Se>2047&&(Se<55296||Se>57343)&&(ue=Se));break;case 4:X=ae[ge+1],Ee=ae[ge+2],De=ae[ge+3],(X&192)===128&&(Ee&192)===128&&(De&192)===128&&(Se=(Ie&15)<<18|(X&63)<<12|(Ee&63)<<6|De&63,Se>65535&&Se<1114112&&(ue=Se))}}ue===null?(ue=65533,J=1):ue>65535&&(ue-=65536,fe.push(ue>>>10&1023|55296),ue=56320|ue&1023),fe.push(ue),ge+=J}return B(fe)}const A=4096;function B(ae){const $=ae.length;if($<=A)return String.fromCharCode.apply(String,ae);let ne="",fe=0;for(;fe<$;)ne+=String.fromCharCode.apply(String,ae.slice(fe,fe+=A));return ne}function O(ae,$,ne){let fe="";ne=Math.min(ae.length,ne);for(let ge=$;gefe)&&(ne=fe);let ge="";for(let Ie=$;Iefe&&($=fe),ne<0?(ne+=fe,ne<0&&(ne=0)):ne>fe&&(ne=fe),ne<$&&(ne=$);const ge=this.subarray($,ne);return Object.setPrototypeOf(ge,s.prototype),ge};function P(ae,$,ne){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+$>ne)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function($,ne,fe){$=$>>>0,ne=ne>>>0,fe||P($,ne,this.length);let ge=this[$],Ie=1,ue=0;for(;++ue>>0,ne=ne>>>0,fe||P($,ne,this.length);let ge=this[$+--ne],Ie=1;for(;ne>0&&(Ie*=256);)ge+=this[$+--ne]*Ie;return ge},s.prototype.readUint8=s.prototype.readUInt8=function($,ne){return $=$>>>0,ne||P($,1,this.length),this[$]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function($,ne){return $=$>>>0,ne||P($,2,this.length),this[$]|this[$+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function($,ne){return $=$>>>0,ne||P($,2,this.length),this[$]<<8|this[$+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function($,ne){return $=$>>>0,ne||P($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function($,ne){return $=$>>>0,ne||P($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},s.prototype.readBigUInt64LE=we(function($){$=$>>>0,re($,"offset");const ne=this[$],fe=this[$+7];(ne===void 0||fe===void 0)&&se($,this.length-8);const ge=ne+this[++$]*2**8+this[++$]*2**16+this[++$]*2**24,Ie=this[++$]+this[++$]*2**8+this[++$]*2**16+fe*2**24;return BigInt(ge)+(BigInt(Ie)<>>0,re($,"offset");const ne=this[$],fe=this[$+7];(ne===void 0||fe===void 0)&&se($,this.length-8);const ge=ne*2**24+this[++$]*2**16+this[++$]*2**8+this[++$],Ie=this[++$]*2**24+this[++$]*2**16+this[++$]*2**8+fe;return(BigInt(ge)<>>0,ne=ne>>>0,fe||P($,ne,this.length);let ge=this[$],Ie=1,ue=0;for(;++ue=Ie&&(ge-=Math.pow(2,8*ne)),ge},s.prototype.readIntBE=function($,ne,fe){$=$>>>0,ne=ne>>>0,fe||P($,ne,this.length);let ge=ne,Ie=1,ue=this[$+--ge];for(;ge>0&&(Ie*=256);)ue+=this[$+--ge]*Ie;return Ie*=128,ue>=Ie&&(ue-=Math.pow(2,8*ne)),ue},s.prototype.readInt8=function($,ne){return $=$>>>0,ne||P($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},s.prototype.readInt16LE=function($,ne){$=$>>>0,ne||P($,2,this.length);const fe=this[$]|this[$+1]<<8;return fe&32768?fe|4294901760:fe},s.prototype.readInt16BE=function($,ne){$=$>>>0,ne||P($,2,this.length);const fe=this[$+1]|this[$]<<8;return fe&32768?fe|4294901760:fe},s.prototype.readInt32LE=function($,ne){return $=$>>>0,ne||P($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},s.prototype.readInt32BE=function($,ne){return $=$>>>0,ne||P($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},s.prototype.readBigInt64LE=we(function($){$=$>>>0,re($,"offset");const ne=this[$],fe=this[$+7];(ne===void 0||fe===void 0)&&se($,this.length-8);const ge=this[$+4]+this[$+5]*2**8+this[$+6]*2**16+(fe<<24);return(BigInt(ge)<>>0,re($,"offset");const ne=this[$],fe=this[$+7];(ne===void 0||fe===void 0)&&se($,this.length-8);const ge=(ne<<24)+this[++$]*2**16+this[++$]*2**8+this[++$];return(BigInt(ge)<>>0,ne||P($,4,this.length),n.read(this,$,!0,23,4)},s.prototype.readFloatBE=function($,ne){return $=$>>>0,ne||P($,4,this.length),n.read(this,$,!1,23,4)},s.prototype.readDoubleLE=function($,ne){return $=$>>>0,ne||P($,8,this.length),n.read(this,$,!0,52,8)},s.prototype.readDoubleBE=function($,ne){return $=$>>>0,ne||P($,8,this.length),n.read(this,$,!1,52,8)};function x(ae,$,ne,fe,ge,Ie){if(!s.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if($>ge||$ae.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function($,ne,fe,ge){if($=+$,ne=ne>>>0,fe=fe>>>0,!ge){const J=Math.pow(2,8*fe)-1;x(this,$,ne,fe,J,0)}let Ie=1,ue=0;for(this[ne]=$&255;++ue>>0,fe=fe>>>0,!ge){const J=Math.pow(2,8*fe)-1;x(this,$,ne,fe,J,0)}let Ie=fe-1,ue=1;for(this[ne+Ie]=$&255;--Ie>=0&&(ue*=256);)this[ne+Ie]=$/ue&255;return ne+fe},s.prototype.writeUint8=s.prototype.writeUInt8=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,1,255,0),this[ne]=$&255,ne+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,2,65535,0),this[ne]=$&255,this[ne+1]=$>>>8,ne+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,2,65535,0),this[ne]=$>>>8,this[ne+1]=$&255,ne+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,4,4294967295,0),this[ne+3]=$>>>24,this[ne+2]=$>>>16,this[ne+1]=$>>>8,this[ne]=$&255,ne+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,4,4294967295,0),this[ne]=$>>>24,this[ne+1]=$>>>16,this[ne+2]=$>>>8,this[ne+3]=$&255,ne+4};function Z(ae,$,ne,fe,ge){q($,fe,ge,ae,ne,7);let Ie=Number($&BigInt(4294967295));ae[ne++]=Ie,Ie=Ie>>8,ae[ne++]=Ie,Ie=Ie>>8,ae[ne++]=Ie,Ie=Ie>>8,ae[ne++]=Ie;let ue=Number($>>BigInt(32)&BigInt(4294967295));return ae[ne++]=ue,ue=ue>>8,ae[ne++]=ue,ue=ue>>8,ae[ne++]=ue,ue=ue>>8,ae[ne++]=ue,ne}function ie(ae,$,ne,fe,ge){q($,fe,ge,ae,ne,7);let Ie=Number($&BigInt(4294967295));ae[ne+7]=Ie,Ie=Ie>>8,ae[ne+6]=Ie,Ie=Ie>>8,ae[ne+5]=Ie,Ie=Ie>>8,ae[ne+4]=Ie;let ue=Number($>>BigInt(32)&BigInt(4294967295));return ae[ne+3]=ue,ue=ue>>8,ae[ne+2]=ue,ue=ue>>8,ae[ne+1]=ue,ue=ue>>8,ae[ne]=ue,ne+8}s.prototype.writeBigUInt64LE=we(function($,ne=0){return Z(this,$,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=we(function($,ne=0){return ie(this,$,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function($,ne,fe,ge){if($=+$,ne=ne>>>0,!ge){const X=Math.pow(2,8*fe-1);x(this,$,ne,fe,X-1,-X)}let Ie=0,ue=1,J=0;for(this[ne]=$&255;++Ie>0)-J&255;return ne+fe},s.prototype.writeIntBE=function($,ne,fe,ge){if($=+$,ne=ne>>>0,!ge){const X=Math.pow(2,8*fe-1);x(this,$,ne,fe,X-1,-X)}let Ie=fe-1,ue=1,J=0;for(this[ne+Ie]=$&255;--Ie>=0&&(ue*=256);)$<0&&J===0&&this[ne+Ie+1]!==0&&(J=1),this[ne+Ie]=($/ue>>0)-J&255;return ne+fe},s.prototype.writeInt8=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,1,127,-128),$<0&&($=255+$+1),this[ne]=$&255,ne+1},s.prototype.writeInt16LE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,2,32767,-32768),this[ne]=$&255,this[ne+1]=$>>>8,ne+2},s.prototype.writeInt16BE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,2,32767,-32768),this[ne]=$>>>8,this[ne+1]=$&255,ne+2},s.prototype.writeInt32LE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,4,2147483647,-2147483648),this[ne]=$&255,this[ne+1]=$>>>8,this[ne+2]=$>>>16,this[ne+3]=$>>>24,ne+4},s.prototype.writeInt32BE=function($,ne,fe){return $=+$,ne=ne>>>0,fe||x(this,$,ne,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),this[ne]=$>>>24,this[ne+1]=$>>>16,this[ne+2]=$>>>8,this[ne+3]=$&255,ne+4},s.prototype.writeBigInt64LE=we(function($,ne=0){return Z(this,$,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=we(function($,ne=0){return ie(this,$,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(ae,$,ne,fe,ge,Ie){if(ne+fe>ae.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function S(ae,$,ne,fe,ge){return $=+$,ne=ne>>>0,ge||Q(ae,$,ne,4),n.write(ae,$,ne,fe,23,4),ne+4}s.prototype.writeFloatLE=function($,ne,fe){return S(this,$,ne,!0,fe)},s.prototype.writeFloatBE=function($,ne,fe){return S(this,$,ne,!1,fe)};function z(ae,$,ne,fe,ge){return $=+$,ne=ne>>>0,ge||Q(ae,$,ne,8),n.write(ae,$,ne,fe,52,8),ne+8}s.prototype.writeDoubleLE=function($,ne,fe){return z(this,$,ne,!0,fe)},s.prototype.writeDoubleBE=function($,ne,fe){return z(this,$,ne,!1,fe)},s.prototype.copy=function($,ne,fe,ge){if(!s.isBuffer($))throw new TypeError("argument should be a Buffer");if(fe||(fe=0),!ge&&ge!==0&&(ge=this.length),ne>=$.length&&(ne=$.length),ne||(ne=0),ge>0&&ge=this.length)throw new RangeError("Index out of range");if(ge<0)throw new RangeError("sourceEnd out of bounds");ge>this.length&&(ge=this.length),$.length-ne>>0,fe=fe===void 0?this.length:fe>>>0,$||($=0);let Ie;if(typeof $=="number")for(Ie=ne;Ie2**32?ge=T(String(ne)):typeof ne=="bigint"&&(ge=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(ge=T(ge)),ge+="n"),fe+=` It must be ${$}. Received ${ge}`,fe},RangeError);function T(ae){let $="",ne=ae.length;const fe=ae[0]==="-"?1:0;for(;ne>=fe+4;ne-=3)$=`_${ae.slice(ne-3,ne)}${$}`;return`${ae.slice(0,ne)}${$}`}function L(ae,$,ne){re($,"offset"),(ae[$]===void 0||ae[$+ne]===void 0)&&se($,ae.length-(ne+1))}function q(ae,$,ne,fe,ge,Ie){if(ae>ne||ae<$){const ue=typeof $=="bigint"?"n":"";let J;throw Ie>3?$===0||$===BigInt(0)?J=`>= 0${ue} and < 2${ue} ** ${(Ie+1)*8}${ue}`:J=`>= -(2${ue} ** ${(Ie+1)*8-1}${ue}) and < 2 ** ${(Ie+1)*8-1}${ue}`:J=`>= ${$}${ue} and <= ${ne}${ue}`,new I.ERR_OUT_OF_RANGE("value",J,ae)}L(fe,ge,Ie)}function re(ae,$){if(typeof ae!="number")throw new I.ERR_INVALID_ARG_TYPE($,"number",ae)}function se(ae,$,ne){throw Math.floor(ae)!==ae?(re(ae,ne),new I.ERR_OUT_OF_RANGE(ne||"offset","an integer",ae)):$<0?new I.ERR_BUFFER_OUT_OF_BOUNDS:new I.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${$}`,ae)}const pe=/[^+/0-9A-Za-z-_]/g;function oe(ae){if(ae=ae.split("=")[0],ae=ae.trim().replace(pe,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function _(ae,$){$=$||1/0;let ne;const fe=ae.length;let ge=null;const Ie=[];for(let ue=0;ue55295&&ne<57344){if(!ge){if(ne>56319){($-=3)>-1&&Ie.push(239,191,189);continue}else if(ue+1===fe){($-=3)>-1&&Ie.push(239,191,189);continue}ge=ne;continue}if(ne<56320){($-=3)>-1&&Ie.push(239,191,189),ge=ne;continue}ne=(ge-55296<<10|ne-56320)+65536}else ge&&($-=3)>-1&&Ie.push(239,191,189);if(ge=null,ne<128){if(($-=1)<0)break;Ie.push(ne)}else if(ne<2048){if(($-=2)<0)break;Ie.push(ne>>6|192,ne&63|128)}else if(ne<65536){if(($-=3)<0)break;Ie.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if(($-=4)<0)break;Ie.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return Ie}function ee(ae){const $=[];for(let ne=0;ne>8,ge=ne%256,Ie.push(ge),Ie.push(fe);return Ie}function ye(ae){return t.toByteArray(oe(ae))}function le(ae,$,ne,fe){let ge;for(ge=0;ge=$.length||ge>=ae.length);++ge)$[ge+ne]=ae[ge];return ge}function ve(ae,$){return ae instanceof $||ae!=null&&ae.constructor!=null&&ae.constructor.name!=null&&ae.constructor.name===$.name}function Ae(ae){return ae!==ae}const de=function(){const ae="0123456789abcdef",$=new Array(256);for(let ne=0;ne<16;++ne){const fe=ne*16;for(let ge=0;ge<16;++ge)$[fe+ge]=ae[ne]+ae[ge]}return $}();function we(ae){return typeof BigInt>"u"?ke:ae}function ke(){throw new Error("BigInt not supported")}})(Due);/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(e,t){var n=Due,r=n.Buffer;function i(a,s){for(var u in a)s[u]=a[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(a,s,u){return r(a,s,u)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,s,u){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,s,u)},o.alloc=function(a,s,u){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return s!==void 0?typeof u=="string"?l.fill(s,u):l.fill(s):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(oN,oN.exports);var sE=oN.exports.Buffer;function Ynt(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,k=new Uint8Array(E);y!==M;){for(var C=h[y],H=0,R=E-1;(C!==0||H>>0,k[R]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");b=H,y++}for(var m=E-b;m!==E&&k[m]===0;)m++;for(var w=s.repeat(g);m>>0,E=new Uint8Array(M);h[g];){var k=t[h.charCodeAt(g)];if(k===255)return;for(var C=0,H=M-1;(k!==0||C>>0,E[H]=k%256>>>0,k=k/256>>>0;if(k!==0)throw new Error("Non-zero carry");y=C,g++}for(var R=M-y;R!==M&&E[R]===0;)R++;var m=sE.allocUnsafe(b+(M-R));m.fill(0,0,b);for(var w=b;R!==M;)m[w++]=E[R++];return m}function f(h){var g=d(h);if(g)return g;throw new Error("Non-base"+a+" character")}return{encode:c,decodeUnsafe:d,decode:f}}var Jnt=Ynt,Vnt=Jnt,Wnt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Znt=Vnt(Wnt);function i1(e){return"version"in e}var Ns=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},tn=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Rs,xc,_0,P0,k1,Tr,tM,nM,V3,rM,aN,tJ,nJ,rJ;function Xnt(e){return"standard:connect"in e.features&&"standard:events"in e.features&&("solana:signAndSendTransaction"in e.features||"solana:signTransaction"in e.features)}class _nt extends pue{constructor({wallet:t}){super(),Rs.add(this),xc.set(this,void 0),_0.set(this,void 0),P0.set(this,void 0),k1.set(this,void 0),Tr.set(this,void 0),tM.set(this,void 0),nM.set(this,typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.Installed),aN.set(this,r=>{if(!tn(this,xc,"f")||!tn(this,_0,"f")||!("accounts"in r))return;const i=tn(this,Tr,"f").accounts[0];if(!i){tn(this,Rs,"m",rM).call(this),this.emit("error",new go),this.emit("disconnect");return}if(i===tn(this,xc,"f"))return;let o;try{o=new _e(i.publicKey)}catch(a){tn(this,Rs,"m",rM).call(this),this.emit("error",new wr(a?.message)),this.emit("disconnect");return}tn(this,Rs,"m",V3).call(this,i,o),this.emit("connect",o)}),Ns(this,Tr,t,"f");const n="solana:signAndSendTransaction"in t.features?t.features["solana:signAndSendTransaction"].supportedTransactionVersions:t.features["solana:signTransaction"].supportedTransactionVersions;Ns(this,tM,Rnt(n,["legacy"])?null:new Set(n),"f"),Ns(this,xc,null,"f"),Ns(this,_0,null,"f"),Ns(this,P0,!1,"f")}get supportedTransactionVersions(){return tn(this,tM,"f")}get name(){return tn(this,Tr,"f").name}get icon(){return tn(this,Tr,"f").icon}get url(){return"https://github.com/wallet-standard"}get publicKey(){return tn(this,_0,"f")}get connecting(){return tn(this,P0,"f")}get readyState(){return tn(this,nM,"f")}get wallet(){return tn(this,Tr,"f")}get standard(){return!0}async connect(){try{if(this.connected||this.connecting)return;if(tn(this,nM,"f")!==rt.Installed)throw new vr;if(Ns(this,P0,!0,"f"),!tn(this,Tr,"f").accounts.length)try{await tn(this,Tr,"f").features["standard:connect"].connect()}catch(r){throw new Zi(r?.message,r)}if(!tn(this,Tr,"f").accounts.length)throw new Rr;const t=tn(this,Tr,"f").accounts[0];let n;try{n=new _e(t.publicKey)}catch(r){throw new wr(r?.message,r)}Ns(this,k1,tn(this,Tr,"f").features["standard:events"].on("change",tn(this,aN,"f")),"f"),tn(this,Rs,"m",V3).call(this,t,n),this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{Ns(this,P0,!1,"f")}}async disconnect(){if("standard:disconnect"in tn(this,Tr,"f").features)try{await tn(this,Tr,"f").features["standard:disconnect"].disconnect()}catch(t){this.emit("error",new Jo(t?.message,t))}tn(this,Rs,"m",rM).call(this),this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=tn(this,xc,"f");if(!i)throw new vt;let o;if("solana:signAndSendTransaction"in tn(this,Tr,"f").features)if(i.features.includes("solana:signAndSendTransaction"))o="solana:signAndSendTransaction";else if("solana:signTransaction"in tn(this,Tr,"f").features&&i.features.includes("solana:signTransaction"))o="solana:signTransaction";else throw new Rr;else if("solana:signTransaction"in tn(this,Tr,"f").features){if(!i.features.includes("solana:signTransaction"))throw new Rr;o="solana:signTransaction"}else throw new mg;const a=Unt(n.rpcEndpoint);if(!i.chains.includes(a))throw new ia;try{const{signers:s,...u}=r;let l;if(i1(t)?(s?.length&&t.sign(s),l=t.serialize()):(t=await this.prepareTransaction(t,n,u),s?.length&&t.partialSign(...s),l=new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))),o==="solana:signAndSendTransaction"){const[c]=await tn(this,Tr,"f").features["solana:signAndSendTransaction"].signAndSendTransaction({account:i,chain:a,transaction:l,options:{preflightCommitment:I5(u.preflightCommitment||n.commitment),skipPreflight:u.skipPreflight,maxRetries:u.maxRetries,minContextSlot:u.minContextSlot}});return Znt.encode(c.signature)}else{const[c]=await tn(this,Tr,"f").features["solana:signTransaction"].signTransaction({account:i,chain:a,transaction:l,options:{preflightCommitment:I5(u.preflightCommitment||n.commitment),minContextSlot:u.minContextSlot}});return await n.sendRawTransaction(c.signedTransaction,{...u,preflightCommitment:I5(u.preflightCommitment||n.commitment)})}}catch(s){throw s instanceof ti?s:new ia(s?.message,s)}}catch(i){throw this.emit("error",i),i}}}xc=new WeakMap,_0=new WeakMap,P0=new WeakMap,k1=new WeakMap,Tr=new WeakMap,tM=new WeakMap,nM=new WeakMap,aN=new WeakMap,Rs=new WeakSet,V3=function(t,n){Ns(this,xc,t,"f"),Ns(this,_0,n,"f"),t?.features.includes("solana:signTransaction")?(this.signTransaction=tn(this,Rs,"m",tJ),this.signAllTransactions=tn(this,Rs,"m",nJ)):(delete this.signTransaction,delete this.signAllTransactions),t?.features.includes("solana:signMessage")?this.signMessage=tn(this,Rs,"m",rJ):delete this.signMessage},rM=function(){const t=tn(this,k1,"f");t&&(Ns(this,k1,void 0,"f"),t()),tn(this,Rs,"m",V3).call(this,null,null)},tJ=async function(t){try{const n=tn(this,xc,"f");if(!n)throw new vt;if(!("solana:signTransaction"in tn(this,Tr,"f").features))throw new mg;if(!n.features.includes("solana:signTransaction"))throw new Rr;try{const i=(await tn(this,Tr,"f").features["solana:signTransaction"].signTransaction({account:n,transaction:i1(t)?t.serialize():new Uint8Array(t.serialize({requireAllSignatures:!1,verifySignatures:!1}))}))[0].signedTransaction;return i1(t)?Ug.deserialize(i):xn.from(i)}catch(r){throw r instanceof ti?r:new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}},nJ=async function(t){try{const n=tn(this,xc,"f");if(!n)throw new vt;if(!("solana:signTransaction"in tn(this,Tr,"f").features))throw new mg;if(!n.features.includes("solana:signTransaction"))throw new jt;try{const r=await tn(this,Tr,"f").features["solana:signTransaction"].signTransaction(...t.map(i=>({account:n,transaction:i1(i)?i.serialize():new Uint8Array(i.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return t.map((i,o)=>{const a=r[o].signedTransaction;return i1(i)?Ug.deserialize(a):xn.from(a)})}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}},rJ=async function(t){try{const n=tn(this,xc,"f");if(!n)throw new vt;if(!("solana:signMessage"in tn(this,Tr,"f").features))throw new mg;if(!n.features.includes("solana:signMessage"))throw new Xi;try{return(await tn(this,Tr,"f").features["solana:signMessage"].signMessage({account:n,message:t}))[0].signature}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}};var $nt=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},ert=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},iM;let Aa;const oM=new Set,$0={};function trt(){if(Aa||(Aa=Object.freeze({register:iJ,get:nrt,on:rrt}),typeof window>"u"))return Aa;const e=Object.freeze({register:iJ});try{window.addEventListener("wallet-standard:register-wallet",({detail:t})=>t(e))}catch(t){console.error(`wallet-standard:register-wallet event listener could not be added `,t)}try{window.dispatchEvent(new irt(e))}catch(t){console.error(`wallet-standard:app-ready event could not be dispatched -`,t)}return Aa}function iJ(...e){var t;return e=e.filter(n=>!oM.has(n)),e.length?(e.forEach(n=>oM.add(n)),(t=$0.register)==null||t.forEach(n=>sN(()=>n(...e))),function(){var r;e.forEach(i=>oM.delete(i)),(r=$0.unregister)==null||r.forEach(i=>sN(()=>i(...e)))}):()=>{}}function nrt(){return[...oM]}function rrt(e,t){var n;return(n=$0[e])!=null&&n.push(t)||($0[e]=[t]),function(){var i;$0[e]=(i=$0[e])==null?void 0:i.filter(o=>t!==o)}}function sN(e){try{e()}catch(t){console.error(t)}}class irt extends Event{constructor(t){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),iM.set(this,void 0),$nt(this,iM,t,"f")}get detail(){return ert(this,iM,"f")}get type(){return"wallet-standard:app-ready"}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}iM=new WeakMap;function ort(){if(Aa||(Aa=trt(),typeof window>"u"))return Aa;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),Aa;const{register:t}=Aa,n=(...r)=>r.forEach(i=>sN(()=>i({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch{return console.error("window.navigator.wallets could not be set"),Aa}return n(...e),Aa}function art(e){const t=new Set,{get:n,on:r}=ort(),i=Uh(oJ(n()));return Fd(o=>{const a=[r("register",(...s)=>i.value=[...i.value,...oJ(s)]),r("unregister",(...s)=>i.value=i.value.filter(u=>s.some(l=>l===u.wallet)))];o(()=>a.forEach(s=>s()))}),te(()=>[...i.value,...e.value.filter(({name:o})=>i.value.some(a=>a.name===o)?(t.has(o)||(t.add(o),console.warn(`${o} was registered as a Standard Wallet. The Wallet Adapter for ${o} can be removed from your app.`)),!1):!0)])}function oJ(e){return e.filter(Xnt).map(t=>new _nt({wallet:t}))}function srt(e,t){const n=async(a,s,u)=>{var l;const c=(l=e.value)==null?void 0:l.adapter;if(!c)throw t(new Aue);if(!c.connected)throw t(new vt,c);return await c.sendTransaction(a,s,u)},r=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signTransaction"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signTransaction(u)}}),i=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signAllTransactions"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signAllTransactions(u)}}),o=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signMessage"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signMessage(u)}});return{sendTransaction:n,signTransaction:r,signAllTransactions:i,signMessage:o}}function crt(e){const t=Te(!1);return typeof window>"u"||Fd(n=>{if(e.value)return;const r=()=>t.value=!0;window.addEventListener("beforeunload",r),n(()=>window.removeEventListener("beforeunload",r))}),t}function urt(e,t){const n=Uh(null),r=Te(null),i=Te(!1),o=Te(rt.Unsupported),a=te(()=>o.value===rt.Installed||o.value===rt.Loadable),s=()=>{var u,l,c,d,f,h;r.value=(l=(u=n.value)==null?void 0:u.adapter.publicKey)!=null?l:null,i.value=(d=(c=n.value)==null?void 0:c.adapter.connected)!=null?d:!1,o.value=(h=(f=n.value)==null?void 0:f.readyState)!=null?h:rt.Unsupported};return Fd(()=>{var u;n.value=t.value&&(u=e.value.find(({adapter:l})=>l.name===t.value))!=null?u:null,s()}),{wallet:n,publicKey:r,connected:i,readyState:o,ready:a,refreshWalletState:s}}function lrt(e){const t=Uh([]);return Fd(()=>{t.value=e.value.map(n=>({adapter:n,readyState:n.readyState}))}),t}const drt=({wallets:e=[],autoConnect:t=!1,cluster:n="mainnet-beta",onError:r,localStorageKey:i="walletName"})=>{const o=Te(n),a=Te(!1),s=Te(!1),u=Uh(e),l=art(u),{isMobile:c,uriForAppIdentity:d}=Int(l),f=knt(l,c,d,o),h=lrt(f),{name:g,isUsingMwaAdapterOnMobile:b,select:y,deselect:M}=Tnt(i,c),{wallet:E,publicKey:k,connected:C,readyState:H,ready:R,refreshWalletState:m}=urt(h,g),w=crt(b),G=Lnt(w,r);Bnt(h),wnt(E,w,b,M,m,G);const Y=Ant(t,E,b,a,C,R,M),{sendTransaction:K,signTransaction:D,signAllTransactions:v,signMessage:p}=srt(E,G);return{wallets:h,autoConnect:Y,cluster:o,wallet:E,publicKey:k,readyState:H,ready:R,connected:C,connecting:a,disconnecting:s,select:y,connect:async()=>{if(C.value||a.value||s.value)return;if(!E.value)throw G(new Aue);const O=E.value.adapter;if(!R.value)throw G(new vr,O);try{a.value=!0,await O.connect()}catch(j){throw M(),j}finally{a.value=!1}},disconnect:async()=>{if(!(s.value||!E.value))try{s.value=!0,await E.value.adapter.disconnect()}finally{s.value=!1}},sendTransaction:K,signTransaction:D,signAllTransactions:v,signMessage:p}};let cN=null;const o0=()=>{if(cN)return cN;throw new Ott("Wallet not initialized. Please use the `initWallet` method to initialize the wallet.")},frt=e=>{cN=drt(e)};function hrt(){const e=o0();return te(()=>{if(!e)return;const{signTransaction:t,signAllTransactions:n,publicKey:r}=e;if(!(!r.value||!t.value||!n.value))return{publicKey:r.value,signTransaction:t.value,signAllTransactions:n.value}})}const grt={install:(e,t={})=>{frt(t),e.config.globalProperties.$wallet=o0()}};function uN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var prt=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi;const yrt=prt;var brt=typeof self=="object"&&self&&self.Object===Object&&self,mrt=yrt||brt||Function("return this")();const Lue=mrt;var vrt=function(){return Lue.Date.now()};const M5=vrt;var wrt=/\s/;function Art(e){for(var t=e.length;t--&&wrt.test(e.charAt(t)););return t}var Irt=/^\s+/;function Ert(e){return e&&e.slice(0,Art(e)+1).replace(Irt,"")}var Mrt=Lue.Symbol;const W3=Mrt;var kue=Object.prototype,Srt=kue.hasOwnProperty,Drt=kue.toString,Hy=W3?W3.toStringTag:void 0;function Crt(e){var t=Srt.call(e,Hy),n=e[Hy];try{e[Hy]=void 0;var r=!0}catch{}var i=Drt.call(e);return r&&(t?e[Hy]=n:delete e[Hy]),i}var Lrt=Object.prototype,krt=Lrt.toString;function Brt(e){return krt.call(e)}var Trt="[object Null]",xrt="[object Undefined]",aJ=W3?W3.toStringTag:void 0;function Nrt(e){return e==null?e===void 0?xrt:Trt:aJ&&aJ in Object(e)?Crt(e):Brt(e)}function Ort(e){return e!=null&&typeof e=="object"}var Frt="[object Symbol]";function Urt(e){return typeof e=="symbol"||Ort(e)&&Nrt(e)==Frt}var sJ=0/0,Rrt=/^[-+]0x[0-9a-f]+$/i,Prt=/^0b[01]+$/i,zrt=/^0o[0-7]+$/i,jrt=parseInt;function cJ(e){if(typeof e=="number")return e;if(Urt(e))return sJ;if(uN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=uN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ert(e);var n=Prt.test(e);return n||zrt.test(e)?jrt(e.slice(2),n?2:8):Rrt.test(e)?sJ:+e}var Grt="Expected a function",Hrt=Math.max,Krt=Math.min;function aM(e,t,n){var r,i,o,a,s,u,l=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Grt);t=cJ(t)||0,uN(n)&&(c=!!n.leading,d="maxWait"in n,o=d?Hrt(cJ(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function h(R){var m=r,w=i;return r=i=void 0,l=R,a=e.apply(w,m),a}function g(R){return l=R,s=setTimeout(M,t),c?h(R):a}function b(R){var m=R-u,w=R-l,G=t-m;return d?Krt(G,o-w):G}function y(R){var m=R-u,w=R-l;return u===void 0||m>=t||m<0||d&&w>=o}function M(){var R=M5();if(y(R))return E(R);s=setTimeout(M,b(R))}function E(R){return s=void 0,f&&r?h(R):(r=i=void 0,a)}function k(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function C(){return s===void 0?a:E(M5())}function H(){var R=M5(),m=y(R);if(r=arguments,i=this,u=R,m){if(s===void 0)return g(u);if(d)return clearTimeout(s),s=setTimeout(M,t),h(u)}return s===void 0&&(s=setTimeout(M,t)),a}return H.cancel=k,H.flush=C,H}async function Qrt(){const{data:e}=await sC.get("https://token.jup.ag/all");return e}const qrt=U2("token",()=>{const e=$p(),t=Te([]),n=Te(!1);async function r(){if(!n.value){console.log("getTokenList..."),n.value=!0;try{t.value=await Qrt(),console.log("Tokens: ",t.value)}catch(a){console.error("getTokenList error: ",a)}finally{n.value=!1}}}const i=te(()=>(e.cluster==="mainnet-beta"?Eet:Iet).map(s=>({name:s.name,symbol:s.symbol,image:s.image,mint:s.mint,decimals:s.decimals})));return{tokens:i,loading:n,getTokenList:r,tokenByMint:a=>i.value.find(s=>s.mint===a)}});function Yrt(){const e=qrt(),t=te(()=>e.tokens),n=Te("");function r(s){n.value=s}const i=Te("");function o(s){i.value=s}return{tokens:te(()=>t.value.filter(s=>s.symbol.toLowerCase().includes(n.value.toLocaleLowerCase())).filter(s=>!i.value||s.mint!==i.value)),handleSearchToken:r,handleFilterToken:o}}const Jrt=Symbol("WALLET_CONNECT_EVENT"),Vrt=Symbol("WALLET_DISCONNECT_EVENT"),Bue=Symbol("ACCOUNT_CHANGE_EVENT"),S5=5e3;function Wrt(){const{connection:e}=$p(),{emit:t}=F2(),{notify:n}=CO(),{wallet:r,publicKey:i}=o0(),o=Te(),a=Te(),s=async()=>{o.value!==void 0&&(await e.removeAccountChangeListener(o.value),o.value=void 0),a.value!==void 0&&(await e.removeOnLogsListener(a.value),a.value=void 0)},u=async l=>{l||(l=i.value),await s(),l&&(console.log("onConnect subscript: ",l?.toBase58()),await Promise.all([o.value=e.onAccountChange(l,c=>{console.log("ACCOUNT_CHANGE_EVENT",c),t(Bue,c)}),a.value=e.onLogs(l,c=>{console.log(c)})]))};nt([r,i],aM(([l,c],[d,f])=>{if(!l)return;u();const h=()=>{const y=l.adapter.publicKey;n({message:"Wallet update",caption:`Connected to wallet ${_ce(y?.toBase58()??"",7)}`,timeout:S5}),t(Jrt,l)},g=()=>{n({message:"Wallet update",caption:"Disconnected from wallet",timeout:S5}),s(),t(Vrt,l)},b=y=>{y?.message&&n({type:"negative",message:"Wallet update",caption:y.message,timeout:S5})};l.adapter.once("connect",h),l.adapter.once("disconnect",g),l.adapter.removeAllListeners("error"),l.adapter.on("error",b)},200),{immediate:!0})}const HR=U2("user",()=>{const e=$p(),t=o0(),n=hrt(),{publicKey:r}=t,i=Rb(),o=F2(),a=te(()=>UR.fromWallet(e.connection,n.value).env(eue).configure("debug",!0));nt(a,()=>console.log("AlbusClient: ",a.value),{immediate:!0});const{tokens:s}=Yrt(),u=Te(!1),l=Te(""),c=te(()=>Met[e.cluster]),d=te(()=>{if(i.name){const K=c.value?.policy[i.name];if(K)return K[l.value]??K.default}return""}),f=Te({}),h=te(()=>i.name?f.value[String(i.name)]??d.value:"");function g(K,D){f.value[D??i.name]=K,console.log("[swap] policies = ",f.value)}const b=Te([]),y=Te([]),M=Te();nt([c,a],aM(async()=>{console.log("[debug] service Code === ",c.value.serviceCode),c.value?(u.value=!0,y.value=await a.value?.policy.find({serviceCode:c.value.serviceCode}),M.value=(await a.value?.service.find({code:c.value.serviceCode}))?.[0]?.data??void 0,u.value=!1):(y.value=[],M.value=void 0),console.log("[debug] serviceData === ",M.value),console.log("[debug] required Policy pk === ",h.value),console.log("[debug] service Policy === ",y.value)},200),{immediate:!0});const E=te(()=>h.value?y.value?.find(K=>K.pubkey.toBase58()===h.value)?.data:null),k=xa({tokens:[],loading:!1,certificateLoading:!0,certificates:void 0}),C=te(()=>s.value.map(K=>K.mint).filter(K=>!!K)),H=aM(async()=>{if(r.value)try{k.loading=!0;const K=await iet(r.value?.toBase58(),e.connection),D=s.value.find(B=>B.mint===eM),v=D?{name:D.name,symbol:D.symbol,balance:K,decimals:9,mint:eM}:null,A=(await oet(e.connection,r.value,C.value)).map(B=>{const O=B.mint.toBase58(),j=s.value.find(U=>U.mint===O);return j?{name:j.name,symbol:j.symbol,balance:B?.balance??0,decimals:B?.decimals??0,mint:O}:null});k.tokens=[v,...A].filter(B=>!!B),console.log("[debug] user tokens === ",k.tokens)}finally{k.loading=!1}},2e3),R=K=>{let D=k.tokens.find(v=>v.mint===K)?.balance??0;return K===rue&&(D+=k.tokens.find(v=>v.mint===eM)?.balance??0),D},m=async K=>{try{const D=Ba.fromAccountInfo(K)[0],v=k.certificates?.findIndex(p=>p.data?.policy.toBase58()===D.policy.toBase58())??-1;if(k.certificates&&v>-1){const p=k.certificates[v];p.data=D,k.certificates=[...k.certificates.slice(0,v),p,...k.certificates.slice(v+1)]}}catch(D){console.log("reload cert error: ",D),setTimeout(w,0)}},w=aM(async()=>{if(b.value=[],!r.value){b.value.forEach(K=>{try{e.connection.removeAccountChangeListener(K)}catch{}}),b.value=[];return}try{k.certificateLoading=!0,k.certificates=await a.value?.proofRequest.find({user:r.value,serviceProviderCode:c.value?.serviceCode}),console.log("[debug] certificates === ",k.certificates);const K=[];k.certificates.forEach(D=>{K.push(e.connection.onAccountChange(D.pubkey,m))}),b.value=K}catch(K){console.error("getCertificates error:",K)}finally{k.certificateLoading=!1}},1500),G=te(()=>h.value?k.certificates?.find(K=>K.data.policy.toBase58()===h.value):null),Y=te(()=>(console.log("========== requiredPolicy.value = ",h.value),!h.value||G.value&&G.value.data?.status===dl.Verified));return nt([a,r],async()=>{a.value&&r.value?w():k.certificates=[]},{immediate:!0}),nt(r,K=>{K?H():k.tokens=[]},{immediate:!0}),o.on(Bue,()=>{H(),w()}),{state:k,certificate:G,certificateValid:Y,serviceLoading:u,contractPolicy:f,setContractPolicy:g,requiredPolicy:h,requiredPolicyData:E,policySpec:l,serviceData:M,servicePolicy:y,tokenBalance:R,getUserTokens:H,getCertificates:w}});function Tue(e){const t=$p(),n=te(()=>t.cluster),r=Rb(),i=HR(),o=te(()=>e?i.state.certificates?.find(l=>l.data.policy.toBase58()===e):i.certificate),a=te(()=>e??i.requiredPolicy),s=te(()=>!a.value||o.value&&o.value.data?.status===dl.Verified),u=te(()=>{let l=PR;if(eue!==zce.PROD&&n.value==="mainnet-beta"&&(l="https://stage.app.albus.finance"),o.value&&o.value.data?.status!==dl.Rejected)return`${l}/holder?certificate=${o.value.pubkey?.toBase58()}`;const c=encodeURIComponent(`${location.origin}${r.fullPath}`);return`${l}/wizard/${a.value}?cluster=${n.value}&redirect=${c}`});return{certificate:o,certificateLink:u,certificateValid:s}}const Zrt=["href"],Xrt={key:0,class:"certificate-card__info__date certificate-card__info__date--positive"},_rt=["innerHTML"],$rt={key:1,class:"certificate-card__info__date certificate-card__info__date--warning"},eit=Lt("span",null,"please wait...",-1),tit=[eit],nit={key:2,class:"certificate-card__info__date certificate-card__info__date--negative"},rit={key:0},iit={key:1},oit={key:2},ait=Di({__name:"CertificateStatus",props:{certificate:Object,certificateValid:Boolean},setup(e){const t=e,n=te(()=>{if(!t.certificate)return;const i=new Date(Number(t.certificate.data?.expiredAt)*1e3);return Number(t.certificate?.data?.expiredAt)===0?"∞":Zx(i)}),{certificateLink:r}=Tue();return(i,o)=>(Ut(),Nn("a",{href:It(r),class:"certificate-card__status",target:"_blank"},[e.certificateValid?(Ut(),Nn("div",Xrt,[zs(" valid until "),Lt("span",{innerHTML:It(n)},null,8,_rt)])):e.certificate?.data?.status===It(dl).Proved?(Ut(),Nn("div",$rt,tit)):(Ut(),Nn("div",nit,[e.certificate?e.certificate.data?.status===It(dl).Rejected?(Ut(),Nn("span",iit,"invalid certificate")):(Ut(),Nn("span",oit,"action required")):(Ut(),Nn("span",rit,"no certificate"))]))],8,Zrt))}}),sit={key:0,class:"q-px-md q-pt-md"},cit=Lt("div",{class:"policy-card__title q-mb-xs"}," Your certificate ",-1),uit={key:0},lit={class:"row"},dit=Lt("span",{class:"q-mx-auto"},"reload",-1),fit=["href"],hit={class:"certificate-card__modal-text q-ml-md"},git=["innerHTML"],pit={key:1,class:"policy-card__policy q-pa-md"},yit=Lt("div",{class:"policy-card__policy__title"}," Required certificate ",-1),bit={class:"policy-card__policy__info"},mit={class:"policy-card__policy__subtitle"},vit=Lt("div",{class:"policy-card__policy__subtitle"}," Rules: ",-1),wit={class:"q-ml-xs"},Ait={key:0},Iit=Di({__name:"PolicyInfoView",props:{requiredPolicyData:Object,certificate:Object,certificateLink:String,certificateValid:Boolean,certificateLoading:Boolean},emits:["closeDialog"],setup(e){const t=e,n=HR(),r=te(()=>n.serviceData),i=te(()=>n.serviceLoading),{connected:o}=o0(),a=te(()=>{const u=new Date(Number(t.certificate?.data?.createdAt)*1e3);return Zx(u)}),s=te(()=>{const u=new Date(Number(t.certificate?.data?.expiredAt)*1e3);return Number(t.certificate?.data?.expiredAt)===0?"∞":Zx(u)});return(u,l)=>{const c=ait,d=a$e,f=L0e;return Ut(),hi(yd,{class:"policy-card"},{default:Jt(()=>[mt(pn,{size:"20px",name:It(Jf),class:"cursor-pointer absolute-right q-pa-xs",onClick:l[0]||(l[0]=h=>u.$emit("closeDialog"))},null,8,["name"]),Lt("div",null,[mt(qz,{showing:It(i),"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),It(o)?(Ut(),Nn("div",sit,[mt(qz,{showing:e.certificateLoading,"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),cit,e.certificateValid?(Ut(),hi(yd,{key:1,flat:"",class:"certificate-card row items-center q-mt-sm"},{default:Jt(()=>[Lt("a",{href:`${It(PR)}/holder`,class:"certificate",target:"_blank"},[mt(f)],8,fit),Lt("div",hit,[Lt("div",null,"Created: "+Ro(It(a)),1),Lt("div",null,[zs("Expired: "),Lt("span",{innerHTML:It(s)},null,8,git)])])]),_:1})):(Ut(),Nn("div",uit,[mt(c,{class:"q-mb-sm",certificate:e.certificate,"certificate-valid":!!e.certificateValid},null,8,["certificate","certificate-valid"]),Lt("div",lit,[mt(d,{certificate:e.certificate,"certificate-link":e.certificateLink},null,8,["certificate","certificate-link"]),mt(_t,{loading:e.certificateLoading,unelevated:"",class:"create-certificate-btn q-ml-md",onClick:It(n).getCertificates},{default:Jt(()=>[dit,mt(pn,{name:It(Ybe),size:"8px",color:"primary"},null,8,["name"])]),_:1},8,["loading","onClick"])])]))])):Hf("",!0),e.requiredPolicyData?(Ut(),Nn("div",pit,[yit,Lt("div",bit,[Lt("div",mit," Name: "+Ro(It(r)?.name)+" "+Ro(e.requiredPolicyData.name),1),vit,Lt("div",wit,[(Ut(!0),Nn(qi,null,F1(e.requiredPolicyData.rules,(h,g)=>(Ut(),Nn("div",{key:g},[h.key!=="maxAge"&&h.key!=="expectedDateTo"||h.label!=="0"?(Ut(),Nn("span",Ait,Ro(It(ret)(h.key,h.label,h.value)),1)):Hf("",!0)]))),128))])])])):Hf("",!0)])]),_:1})}}}),Eit=Di({__name:"PolicyInfoDialog",setup(e){const t=F2(),n=Te(!1);t.on($ce,()=>{n.value=!0});const r=HR(),i=te(()=>r.requiredPolicyData),o=te(()=>r.state?.certificateLoading),{certificateLink:a,certificateValid:s,certificate:u}=Tue();return(l,c)=>{const d=Iit;return Ut(),hi(zh,{modelValue:It(n),"onUpdate:modelValue":c[1]||(c[1]=f=>Mr(n)?n.value=f:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[mt(d,{"required-policy-data":It(i),certificate:It(u),"certificate-valid":!!It(s),"certificate-loading":It(o),"certificate-link":It(a),onCloseDialog:c[0]||(c[0]=f=>n.value=!1)},null,8,["required-policy-data","certificate","certificate-valid","certificate-loading","certificate-link"])]),_:1},8,["modelValue"])}}}),Mit=e=>(tV("data-v-3326cf22"),e=e(),nV(),e),Sit={class:"column"},Dit=Mit(()=>Lt("span",{class:"q-mx-auto"},"Explore transaction",-1)),Cit=Di({__name:"TransactionSuccessDialog",setup(e){const t=F2(),n=Te(!1),r=Te("");return t.on(fet,(i="")=>{n.value=!0,r.value=i}),(i,o)=>(Ut(),hi(zh,{modelValue:It(n),"onUpdate:modelValue":o[1]||(o[1]=a=>Mr(n)?n.value=a:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[mt(yd,{class:ss(["transaction-result",{"q-py-md q-px-lg":i.$q.screen.gt.sm,"q-pa-md":!i.$q.screen.gt.sm}])},{default:Jt(()=>[mt(pn,{size:"20px",name:It(Jf),class:"cursor-pointer absolute-right q-pa-xs",onClick:o[0]||(o[0]=a=>n.value=!1)},null,8,["name"]),Lt("div",Sit,[Lt("div",{class:ss(["row q-py-sm",{"text-positive":!i.$q.dark.isActive}])},[mt(pn,{size:i.$q.screen.gt.sm?"32px":"20px",name:It(AE),class:"q-mr-sm"},null,8,["size","name"]),Lt("span",{class:ss({"text-h5":i.$q.screen.gt.sm,"policy-card__title":!i.$q.screen.gt.sm})}," The transaction was successful ",2)],2),It(r)?(Ut(),hi(_t,{key:0,href:It(r),target:"_blank",color:"primary",class:"q-mt-sm",type:"a"},{default:Jt(()=>[Dit]),_:1},8,["href"])):Hf("",!0)])]),_:1},8,["class"])]),_:1},8,["modelValue"]))}});const Lit=pl(Cit,[["__scopeId","data-v-3326cf22"]]),kit=Di({props:{text:{type:String,required:!0}},setup(e){const{notify:t}=CO();return{copy(){Ibe(e.text),t({message:"Copied to clipboard"})}}}}),Bit={id:"Group 3731"},Tit={id:"Group 3646"},xit=["fill"],Nit=["fill"];function Oit(e,t,n,r,i,o){return Ut(),hi(_t,{flat:"",round:"",dense:""},{default:Jt(()=>[(Ut(),Nn("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:t[0]||(t[0]=(...a)=>e.copy&&e.copy(...a))},[Lt("g",Bit,[Lt("g",Tit,[Lt("path",{id:"Vector",d:"M14.2856 3.46362H2.14284C0.959381 3.46362 0 4.39401 0 5.54171V17.3175C0 18.4652 0.959381 19.3956 2.14284 19.3956H14.2856C15.469 19.3956 16.4284 18.4652 16.4284 17.3175V5.54171C16.4284 4.39401 15.469 3.46362 14.2856 3.46362Z",fill:e.$q.dark.isActive?"#fff":"#455A64"},null,8,xit),Lt("path",{id:"Vector_2",d:"M17.8571 1.34184e-09H5.00008C3.82302 -4.05863e-05 2.86628 0.92069 2.85724 2.06214C2.85724 2.0677 2.85724 2.07253 2.85724 2.07809H14.2857C16.2572 2.08036 17.8548 3.62967 17.8571 5.54155V16.6247C17.8629 16.6247 17.8678 16.6247 17.8736 16.6247C19.0506 16.6159 20 15.6881 20 14.5466V2.07809C20 0.930391 19.0406 1.34184e-09 17.8571 1.34184e-09Z",fill:e.$q.dark.isActive?"#fff":"#455A64"},null,8,Nit)])])])),mt(aZ,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:Jt(()=>[zs(" Copy to clipboard ")]),_:1})]),_:1})}const Fit=pl(kit,[["render",Oit]]),xue=e=>(tV("data-v-75dd99ea"),e=e(),nV(),e),Uit=xue(()=>Lt("div",{class:"text-h6 text-center"}," Your wallet ",-1)),Rit={class:"q-gutter-md row justify-between"},Pit=xue(()=>Lt("div",{class:"text-h6"}," Connect to a wallet ",-1)),zit={class:"text-light-gray text-caption full-width text-no-wrap",style:{"text-overflow":"ellipsis",overflow:"hidden"}},jit=["src","alt"],Git=Di({__name:"ConnectWallet",setup(e){const t={solflare:10,phantom:20,sollet:5,nufi:5,blocto:1},n={close:Jf},r=o0(),{connected:i,connecting:o}=r,a=te(()=>r.publicKey.value?.toBase58()??""),s=te(()=>_ce(a.value)),u=te(()=>[...r.wallets.value].sort((g,b)=>{const y=t[g.adapter.name.toLowerCase()]??1;return(t[b.adapter.name.toLowerCase()]??1)-y+1})),l=Te(!1);async function c(g){await r.select(g.adapter.name),l.value=!1,await r.connect()}function d(){l.value=!1,r.disconnect()}function f(){l.value=!0}function h(){l.value=!1}return(g,b)=>{const y=Fit;return Ut(),Nn(qi,null,[It(i)?(Ut(),hi(_t,K5({key:0},g.$attrs,{class:[g.$style.btn,"connect-button"],ripple:!1,"text-color":"white",rounded:"",unelevated:"",onClick:f}),{default:Jt(()=>[zs(Ro(It(s)),1)]),_:1},16,["class"])):(Ut(),hi(_t,K5({key:1},g.$attrs,{"text-color":"white",rounded:"",unelevated:"",ripple:!1,loading:It(o),class:"connect-button",onClick:f}),{default:Jt(()=>[zs(" CONNECT WALLET ")]),_:1},16,["loading"])),mt(zh,{modelValue:It(l),"onUpdate:modelValue":b[0]||(b[0]=M=>Mr(l)?l.value=M:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[It(i)?(Ut(),hi(yd,{key:0},{default:Jt(()=>[mt(Sa,{class:"relative-position"},{default:Jt(()=>[Uit,mt(_t,{padding:"md",color:"transparent","text-color":"primary-gray",unelevated:"",class:"absolute-right",icon:n.close,size:"md",onClick:h},null,8,["icon"])]),_:1}),mt(rc),mt(Sa,null,{default:Jt(()=>[mt(y,{text:It(a)},null,8,["text"]),zs(" "+Ro(It(a)),1)]),_:1}),mt(rc),mt(Sa,null,{default:Jt(()=>[Lt("div",Rit,[mt(_t,{outline:"",rounded:"",onClick:d},{default:Jt(()=>[zs(" Disconnect ")]),_:1}),mt(_t,{outline:"",rounded:"",onClick:h},{default:Jt(()=>[zs(" Ok ")]),_:1})])]),_:1})]),_:1})):(Ut(),hi(yd,{key:1,class:"wallet-connect-card"},{default:Jt(()=>[mt(Sa,null,{default:Jt(()=>[Pit,mt(_t,{padding:"md",color:"transparent","text-color":"primary-gray",unelevated:"",class:"absolute-right",icon:n.close,size:"md",onClick:h},null,8,["icon"])]),_:1}),mt(rc),mt(Sa,{style:{"max-height":"80vh"},class:"scroll"},{default:Jt(()=>[mt(I1e,{grid:"",rows:It(u),"row-key":"name","hide-pagination":"","hide-header":"","rows-per-page-options":[100]},{item:Jt(({row:M})=>[(Ut(),Nn("div",{key:`wallet-${M.name}`,class:"col-12 col-md-6"},[mt(bd,{clickable:"",onClick:E=>c(M)},{default:Jt(()=>[mt(ds,null,{default:Jt(()=>[Lt("b",null,Ro(M.adapter.name),1),Lt("div",zit,Ro(M.adapter.url),1)]),_:2},1024),mt(ds,{avatar:""},{default:Jt(()=>[mt(cW,{square:""},{default:Jt(()=>[Lt("img",{src:M.adapter.icon,alt:M.adapter.name},null,8,jit)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])]))]),_:1},8,["rows"])]),_:1})]),_:1}))]),_:1},8,["modelValue"])],64)}}});const Hit="_btn_6n1iw_1",Kit={btn:Hit},Qit={$style:Kit},qit=pl(Git,[["__cssModules",Qit],["__scopeId","data-v-75dd99ea"]]),Yit=Di({__name:"ClusterSelector",setup(e){const t=$p(),{connected:n,connect:r,disconnect:i,autoConnect:o}=o0(),a=[gd.filter(l=>l.cluster==="mainnet-beta"),gd.filter(l=>l.cluster!=="mainnet-beta")],s=te(()=>t.endpoint);function u(l){n&&t.cluster!==l.cluster&&(i(),o.value&&r()),t.setRpc(l.id)}return(l,c)=>It(gd).length>1?(Ut(),hi(CW,{key:0,label:It(s).cluster,"model-value":!1,"auto-close":"",color:"warning","text-color":"black",rounded:"",unelevated:"",class:"cluster-selector","content-class":"cluster-selector__menu",ripple:!1},{default:Jt(()=>[mt(SO,null,{default:Jt(()=>[(Ut(),Nn(qi,null,F1(a,(d,f)=>(Ut(),Nn(qi,{key:`${f}-cluster-group`},[(Ut(!0),Nn(qi,null,F1(d,h=>(Ut(),hi(bd,{key:h.id,clickable:"",onClick:g=>u(h)},{default:Jt(()=>[(Ut(),hi(ds,{key:`${h.id}-item`},{default:Jt(()=>[mt(OM,null,{default:Jt(()=>[Lt("b",null,Ro(h.cluster),1)]),_:2},1024)]),_:2},1024))]),_:2},1032,["onClick"]))),128)),f!==a.length-1?(Ut(),hi(rc,{key:0})):Hf("",!0)],64))),64))]),_:1})]),_:1},8,["label"])):Hf("",!0)}}),Jit={},Vit={class:"app-header"},Wit={class:"app-header__buttons"};function Zit(e,t){const n=Yit,r=qit,i=Lit,o=Eit;return Ut(),Nn("header",Vit,[Lt("div",Wit,[mt(n,{class:"q-mr-sm"}),mt(r)]),mt(i),mt(o)])}const Xit=pl(Jit,[["render",Zit]]),_it={key:0,class:"text-h6 text-negative fixed-top-right q-pt-xs q-pr-sm"},$it={class:"q-ml-lg"},eot=Di({__name:"EnvironmentWarning",setup(e){const t="dev",n=$p();return(r,i)=>It(t)!=="prod"?(Ut(),Nn("div",_it,[Lt("span",null,"Environment: "+Ro(It(t)==="dev"&&It(n).cluster==="mainnet-beta"?"stage":It(t)),1),Lt("span",$it,"Cluster: "+Ro(It(n).cluster),1)])):Hf("",!0)}}),tot={width:"1.2em",height:"1.2em",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",version:"1.1"},not=Lt("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"},null,-1),rot=[not];function iot(e,t){return Ut(),Nn("svg",tot,rot)}const oot={name:"app-twitter-x",render:iot},aot={fill:"currentColor",width:"31",height:"26",viewBox:"0 0 31 26",xmlns:"http://www.w3.org/2000/svg"},sot=Lt("path",{d:"M28.501 0.279105L2.2675 10.4223C0.477168 11.1433 0.487525 12.1447 1.93903 12.5912L8.67422 14.6979L24.2575 4.8396C24.9944 4.39008 25.6676 4.6319 25.1142 5.12444L12.4887 16.5494H12.4857L12.4887 16.5509L12.0241 23.5118C12.7047 23.5118 13.005 23.1988 13.3868 22.8294L16.6582 19.6397L23.463 24.6794C24.7177 25.3722 25.6187 25.0161 25.9309 23.5148L30.3979 2.40654C30.8551 0.568401 29.698 -0.263881 28.501 0.279105Z",fill:"#23353D"},null,-1),cot=[sot];function uot(e,t){return Ut(),Nn("svg",aot,cot)}const lot={name:"app-telegram",render:uot},dot={class:"social-links"},fot=["href","title"],hot=["href","title"],Nue=Di({__name:"SocialLinks",setup(e){return(t,n)=>{const r=lot,i=oot;return Ut(),Nn("nav",dot,[Lt("a",{href:It(NY),target:"_blank",title:It(NY)},[mt(r)],8,fot),Lt("a",{href:It(OY),target:"_blank",title:It(OY)},[mt(i)],8,hot)])}}}),KR=U2("theme",()=>{const e=CO(),t=xa({isMobile:!1,isDark:!1}),n=gue("theme","");return nt(()=>e.dark.mode,r=>{n.value=String(r),t.isDark=!!r}),nt(()=>e.screen.xs,r=>{t.isMobile=r},{immediate:!0}),gp(()=>{n.value&&e.dark.set(JSON.parse(n.value))}),{state:t,toggle(){e.dark.toggle()}}}),got=Lt("span",null,"Dark Mode",-1),Oue=Di({__name:"DarkThemeToggle",props:{propClass:String},setup(e){const{state:t,toggle:n}=KR();return(r,i)=>(Ut(),Nn("div",{class:ss(e.propClass)},[got,mt(EZ,{modelValue:It(t).isDark,"onUpdate:modelValue":i[0]||(i[0]=o=>It(t).isDark=o),dense:"",dark:"",color:"secondary",class:"app-toggle",onClick:It(n)},null,8,["modelValue","onClick"])],2))}}),pot={class:"menu"},yot=Di({__name:"MobileMenu",setup(e){const t=Rb(),n=["swap","pools","liquidity","transfer","about"],r=Te(!1),i=te(()=>r.value?Jf:Gbe);function o(){r.value=!r.value}return nt(r,a=>{a?window.addEventListener("scroll",o):window.removeEventListener("scroll",o)}),(a,s)=>{const u=Ub("router-link"),l=Oue,c=Nue;return Ut(),Nn("div",pot,[mt(_t,{flat:"",ripple:!1,icon:It(i)},{default:Jt(()=>[mt(Gb,{"model-value":It(r),"transition-show":"jump-down","transition-hide":"jump-up",anchor:"center middle",self:"center middle","max-width":"250px",class:"menu-container","onUpdate:modelValue":o},{default:Jt(()=>[mt(SO,{class:"q-pt-lg"},{default:Jt(()=>[(Ut(),Nn(qi,null,F1(n,d=>mt(bd,{key:d,clickable:""},{default:Jt(()=>[mt(ds,null,{default:Jt(()=>[mt(u,{to:d,class:ss({"active-route":It(t).name===d})},{default:Jt(()=>[zs(Ro(d),1)]),_:2},1032,["to","class"])]),_:2},1024)]),_:2},1024)),64)),mt(l,{"prop-class":"sidebar-theme"}),mt(bd,{clickable:""},{default:Jt(()=>[mt(c)]),_:1})]),_:1})]),_:1},8,["model-value"])]),_:1},8,["icon"])])}}});const bot={class:"sidebar-copyrights"},mot=Di({__name:"SidebarCopyrights",setup(e){const t=new Date().getFullYear();return(n,r)=>(Ut(),Nn("div",bot," © Copyright "+Ro(It(t))+" albus.finance All rights reserved. ",1))}}),vot={},wot={class:"sidebar-footer"},Aot=Lt("nav",null,[Lt("a",{href:"https://albus.finance",target:"_blanc"}," about ")],-1),Iot=[Aot];function Eot(e,t){return Ut(),Nn("div",wot,Iot)}const Mot=pl(vot,[["render",Eot]]),Sot="/assets/swap-icon-cf158c2d.svg",Dot="/assets/liquidity-icon-ba7c6687.svg",Cot="/assets/transfer-icon-513b853b.svg",Lot="/assets/pools-icon-141ed515.svg",kot="/assets/converter-icon-efe03260.svg",Bot={class:"sidebar-navigation"},Tot=["src","alt"],xot={name:"route-name"},Not=Di({__name:"SidebarNavigation",setup(e){const t=Rb(),n=[{name:"swap",icon:Sot},{name:"pools",icon:Lot},{name:"liquidity",icon:Dot},{name:"transfer",icon:Cot},{name:"converter",icon:kot}],r=Te("");return nt(()=>t.path,i=>{r.value=i.slice(1)},{immediate:!0}),(i,o)=>{const a=Ub("router-link");return Ut(),Nn("nav",Bot,[(Ut(),Nn(qi,null,F1(n,s=>mt(a,{key:s.name,to:s.name,class:ss([{"active-route":It(r)===s.name},"sidebar-navigation__item"])},{default:Jt(()=>[Lt("img",{class:"sidebar-navigation__item--icon",src:s.icon,alt:`${s.name} icon`},null,8,Tot),Lt("span",xot,Ro(s.name),1)]),_:2},1032,["to","class"])),64))])}}}),Oot="/assets/albus-logo-0ecbff35.svg",Fot={class:"sidebar-header"},Uot={class:"sidebar-header__logo"},Rot=["href"],Pot=["src"],zot=Lt("div",{class:"sidebar-header__details"},[Lt("span",null,"defi"),Lt("span",null,"solana")],-1),jot={__name:"SidebarHeader",setup(e){return(t,n)=>(Ut(),Nn("div",Fot,[Lt("div",Uot,[Lt("a",{href:It(PR),target:"_blanc"},[Lt("img",{src:It(Oot),alt:"logo"},null,8,Pot)],8,Rot)]),zot]))}},Got="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAArBAMAAACUQoX1AAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAIN/vML/Pr4Bw2uW9lwAAAEhJREFUKM9jQADR5QIIDqPWKkUET2jVqqXIUqtWIUutWoQiZYIstdhhiEpxIEsxcCJ4CJVwU4aZJEZMIyQX4UohDGJLBRhQAACdVmY7YzOmoQAAAABJRU5ErkJggg==",Hot={class:"sidebar"},Kot=["src"],Qot=Di({__name:"Sidebar",setup(e){const{state:t}=KR(),n=Te(!1);function r(){n.value=!n.value}return(i,o)=>{const a=jot,s=Not,u=Mot,l=Oue,c=Nue,d=mot,f=yot;return It(t).isMobile?(Ut(),hi(f,{key:1})):(Ut(),Nn("aside",{key:0,class:ss({"sidebar-minimize":It(n)})},[Lt("div",Hot,[mt(a),mt(s),mt(u),mt(l,{"prop-class":"sidebar-theme"}),mt(c),mt(d)]),mt(_t,{padding:"0","text-color":"white",rounded:"",dense:"",ripple:!1,class:"sidebar-modify-button",onClick:r},{default:Jt(()=>[Lt("img",{src:It(Got),alt:"arrow icon"},null,8,Kot)]),_:1})],2))}}}),qot={},Yot={class:"container content"};function Jot(e,t){const n=Qot,r=eot,i=Xit,o=Ub("router-view");return Ut(),Nn("div",Yot,[mt(n),Lt("main",null,[mt(r),mt(i),mt(o)])])}const Vot=pl(qot,[["render",Jot]]),Wot={default:Vot,home:()=>Qo(()=>import("./home-31eeb8c2.js"),[])};function Zot(e){return e.map(t=>({path:t.path,meta:t.meta,component:Wot[t.meta?.layout||"default"],children:t.path==="/"?[t]:[{...t,path:""}]}))}const Xot={};function _ot(e,t){const n=Ub("transfer");return Ut(),hi(n)}const $ot=pl(Xot,[["render",_ot]]),eat=()=>Qo(()=>import("./transfer-ee9232a0.js"),["assets/transfer-ee9232a0.js","assets/AppDescriptionTop-ae09eb9e.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js","assets/associatedTokenAccount-50901cf8.js"]),tat=()=>Qo(()=>import("./swap-07e5e3f2.js"),["assets/swap-07e5e3f2.js","assets/index-12a77bbd.js","assets/internal-c2cc419b.js","assets/AppDescriptionTop-ae09eb9e.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js","assets/swap-a8389507.js","assets/associatedTokenAccount-50901cf8.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js","assets/swap-circle-a93e350f.js"]),nat=()=>Qo(()=>import("./support-b30dcf52.js"),[]),rat=()=>Qo(()=>import("./pools-5d8404c8.js"),["assets/pools-5d8404c8.js","assets/AppDescriptionTop-ae09eb9e.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js","assets/swap-a8389507.js","assets/associatedTokenAccount-50901cf8.js"]),iat=()=>Qo(()=>import("./liquidity-4edf7260.js"),["assets/liquidity-4edf7260.js","assets/AppDescriptionTop-ae09eb9e.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js","assets/swap-a8389507.js","assets/associatedTokenAccount-50901cf8.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js"]),oat=()=>Qo(()=>import("./liquidity-single-b7dcfc19.js"),["assets/liquidity-single-b7dcfc19.js","assets/AppDescriptionTop-ae09eb9e.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js","assets/swap-a8389507.js","assets/associatedTokenAccount-50901cf8.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js","assets/swap-circle-a93e350f.js"]),aat=()=>Qo(()=>import("./create-pool-416d2f29.js"),["assets/create-pool-416d2f29.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js","assets/swap-a8389507.js","assets/associatedTokenAccount-50901cf8.js","assets/setAuthority-3cfe3852.js","assets/internal-c2cc419b.js"]),sat=()=>Qo(()=>import("./converter-44eaa8a5.js"),["assets/converter-44eaa8a5.js","assets/AppDescriptionTop-ae09eb9e.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js","assets/setAuthority-3cfe3852.js","assets/internal-c2cc419b.js","assets/index-12a77bbd.js","assets/converter-98a7a240.css"]),cat=()=>Qo(()=>import("./about-83364729.js"),[]),uat=()=>Qo(()=>import("./_...all_-86a4f702.js"),["assets/_...all_-86a4f702.js","assets/_...all_-f6a7ef33.css"]),lat=[{name:"transfer",path:"/transfer",component:eat,props:!0},{name:"swap",path:"/swap",component:tat,props:!0},{name:"support",path:"/support",component:nat,props:!0},{name:"pools",path:"/pools",component:rat,props:!0},{name:"liquidity",path:"/liquidity",component:iat,props:!0},{name:"liquidity-single",path:"/liquidity-single",component:oat,props:!0},{name:"index",path:"/",component:$ot,props:!0},{name:"create-pool",path:"/create-pool",component:aat,props:!0},{name:"converter",path:"/converter",component:sat,props:!0},{name:"about",path:"/about",component:cat,props:!0},{name:"all",path:"/:all(.*)*",component:uat,props:!0,meta:{layout:404}}],dat=Zot(lat),fat=y0e({history:xhe(),routes:dat});function hat(e){e.use(fat)}function gat({app:e}){e.use(ghe()),hat(e)}const pat=Object.freeze(Object.defineProperty({__proto__:null,install:gat},Symbol.toStringTag,{value:"Module"}));function yat({app:e}){const t=Cet();e.use(t)}const bat=Object.freeze(Object.defineProperty({__proto__:null,install:yat},Symbol.toStringTag,{value:"Module"})),uJ="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z",mat="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z",vat="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z",lJ="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z",wat="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z",Aat="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z",Iat="M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z",Eat="M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z",Mat="M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z",Sat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z",Dat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z",Cat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z",Lat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z",kat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H20V6H15V10H17A4,4 0 0,1 21,14A4,4 0 0,1 17,18H15A2,2 0 0,1 13,16V15H15V16H17A2,2 0 0,0 19,14A2,2 0 0,0 17,12H15A2,2 0 0,1 13,10V6A2,2 0 0,1 15,4Z",Bat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V7H19V6H15V10H19A2,2 0 0,1 21,12V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V6A2,2 0 0,1 15,4M15,12V16H19V12H15Z",Tat="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z",xat="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z",Nat="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z",Oat="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",Fat="M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z",Uat="M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z",D5="M2 4V7H7V19H10V7H15V4H2M21 9H12V12H15V19H18V12H21V9Z",Rat="M23,12V14H18.61C19.61,16.14 19.56,22 12.38,22C4.05,22.05 4.37,15.5 4.37,15.5L8.34,15.55C8.37,18.92 11.5,18.92 12.12,18.88C12.76,18.83 15.15,18.84 15.34,16.5C15.42,15.41 14.32,14.58 13.12,14H1V12H23M19.41,7.89L15.43,7.86C15.43,7.86 15.6,5.09 12.15,5.08C8.7,5.06 9,7.28 9,7.56C9.04,7.84 9.34,9.22 12,9.88H5.71C5.71,9.88 2.22,3.15 10.74,2C19.45,0.8 19.43,7.91 19.41,7.89Z",Pat="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z",zat="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z",jat="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z",Gat="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z",Hat="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",Kat="M19,13H5V11H19V13Z",Qat="M14,17H12V9H10V7H14M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",qat="M15,11C15,12.11 14.1,13 13,13H11V15H15V17H9V13C9,11.89 9.9,11 11,11H13V9H9V7H13A2,2 0 0,1 15,9M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Yat="M15,10.5A1.5,1.5 0 0,1 13.5,12C14.34,12 15,12.67 15,13.5V15C15,16.11 14.11,17 13,17H9V15H13V13H11V11H13V9H9V7H13C14.11,7 15,7.89 15,9M19,3H5C3.91,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19C20.11,21 21,20.1 21,19V5A2,2 0 0,0 19,3Z",Jat="M15,17H13V13H9V7H11V11H13V7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Vat="M15,9H11V11H13A2,2 0 0,1 15,13V15C15,16.11 14.1,17 13,17H9V15H13V13H9V7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Wat="M15,9H11V11H13A2,2 0 0,1 15,13V15C15,16.11 14.1,17 13,17H11A2,2 0 0,1 9,15V9C9,7.89 9.9,7 11,7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M11,15H13V13H11V15Z",Zat="M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19M11,17L15,9V7H9V9H13L9,17H11Z",Xat="M18,3H6V7H18M19,12A1,1 0 0,1 18,11A1,1 0 0,1 19,10A1,1 0 0,1 20,11A1,1 0 0,1 19,12M16,19H8V14H16M19,8H5A3,3 0 0,0 2,11V17H6V21H18V17H22V11A3,3 0 0,0 19,8Z",_at="M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z",$at="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",est={name:"svg-eva-icons",type:{positive:Nbe,negative:o8,info:jbe,warning:Sbe},arrow:{up:Tbe,right:Lbe,down:Cbe,left:Dbe,dropdown:Lj},chevron:{left:y0,right:pf},colorPicker:{spectrum:Rbe,tune:Hbe,palette:Kbe},pullToRefresh:{icon:Jbe},carousel:{left:y0,right:pf,up:Sj,down:a8,navigationIcon:Vbe},chip:{remove:Jf,selected:AE},datetime:{arrowLeft:y0,arrowRight:pf,now:Obe,today:xbe},editor:{bold:Aat,italic:Nat,strikethrough:Rat,underline:jat,unorderedList:Oat,orderedList:Fat,subscript:Pat,superscript:zat,hyperlink:Hat,toggleFullscreen:Gat,quote:Uat,left:lJ,center:mat,right:wat,justify:vat,print:Xat,outdent:Tat,indent:xat,removeFormat:Iat,formatting:Eat,fontSize:D5,align:lJ,hr:Kat,undo:$at,redo:_at,heading:D5,heading1:Sat,heading2:Dat,heading3:Cat,heading4:Lat,heading5:kat,heading6:Bat,code:uJ,size:D5,size1:Qat,size2:qat,size3:Yat,size4:Jat,size5:Vat,size6:Wat,size7:Zat,font:Mat,viewSource:uJ},expansionItem:{icon:a8,denseIcon:Lj},fab:{icon:Qbe,activeIcon:Jf},field:{clear:Fbe,error:Mbe},pagination:{first:Dj,prev:y0,next:pf,last:Cj},rating:{icon:Zbe},stepper:{done:AE,active:zbe,error:o8},tabs:{left:y0,right:pf,up:Sj,down:a8},table:{arrowUp:Bbe,warning:o8,firstPage:Dj,prevPage:y0,nextPage:pf,lastPage:Cj},tree:{icon:kbe},uploader:{done:AE,clear:Jf,add:qbe,upload:Ube,removeQueue:Wbe,removeUploaded:Pbe}};function tst({app:e}){e.use(Ebe,{plugins:{Notify:ybe,LocalStorage:nX,Dark:io},iconSet:est})}const nst=Object.freeze(Object.defineProperty({__proto__:null,install:tst},Symbol.toStringTag,{value:"Module"})),rst="Avana";class ist extends eo{constructor(t={}){super(),this.name=rst,this.url="https://www.avanawallet.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4yLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyODkuNzg3ODEgMjg5Ljc4NzgxIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyODkuNzg3ODEgMjg5Ljc4NzgxIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiMxQzFDMUMiIGQ9Ik0yMTguNDM5MDEsMjg5Ljc4NzgxSDcxLjM0ODhDMzEuOTQzOTUsMjg5Ljc4NzgxLDAsMjU3Ljg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8L3N2Zz4NCg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.avana?.solana?.isAvana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.avana.solana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const ost="BitKeep";class ast extends eo{constructor(t={}){super(),this.name=ost,this.url="https://bitkeep.com",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiByeD0iNjQiIGZpbGw9IiM3NTI0RjkiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMDIgNDUuNjAyN1Y0OS44MjA0QzEwMi4wMDEgNTAuMjI4MyAxMDEuODkzIDUwLjYyOTIgMTAxLjY4NyA1MC45ODI3QzEwMS40ODEgNTEuMzM2MSAxMDEuMTg1IDUxLjYyOTYgMTAwLjgyOCA1MS44MzM1TDg3LjA5MDggNTkuNjgwMUw5OS4zNjMzIDY2LjY3MUMxMDAuMTY1IDY3LjEyOTUgMTAwLjgzMSA2Ny43ODkyIDEwMS4yOTQgNjguNTgzNkMxMDEuNzU3IDY5LjM3OCAxMDIuMDAxIDcwLjI3OTEgMTAyIDcxLjE5NjJWODIuNDQyNEMxMDIuMDAxIDgzLjM2IDEwMS43NTggODQuMjYxNyAxMDEuMjk1IDg1LjA1NjdDMTAwLjgzMiA4NS44NTE2IDEwMC4xNjYgODYuNTExNyA5OS4zNjMzIDg2Ljk3MDVMNjcuMDg2OSAxMDUuM0M2Ni4yODUzIDEwNS43NTkgNjUuMzc1OSAxMDYgNjQuNDUwMiAxMDZDNjMuNTI0NSAxMDYgNjIuNjE1MSAxMDUuNzU5IDYxLjgxMzUgMTA1LjNMNTEuMjUyIDk5LjI2MTFDNTEu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i4yMDAxIDEwMS4yOTMgNDIuOTkzNEMxMDEuNzU2IDQzLjc4NjcgMTAyIDQ0LjY4NjYgMTAyIDQ1LjYwMjdaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.bitkeep?.solana?.isBitKeep?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.bitkeep.solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const sst="Bitpie";class cst extends i0{constructor(t={}){super(),this.name=sst,this.url="https://bitpiecn.com",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiIHdpZHRoPSI2NCIgeG1sbnM9Imh0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0aDUuODE5di01LjgxOWgtNS44MTl6IiBmaWxsPSJ1cmwoI2QpIiB0cmFuc2Zvcm09Im1hdHJpeCguODY2MDI1NCAtLjUgLjUgLjg2NjAyNTQgLTExLjcxMjgxMyAyMC4yODcxODcpIi8+PC9nPjwvc3ZnPg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.bitpie?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.bitpie;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const ust="Clover";class lst extends eo{constructor(t={}){super(),this.name=ust,this.url="https://clv.org",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTM2LjQ4IDBIMTEuNTJDNS4xNTc2OCAwIDAgNS4xNTc2OCAwIDExLjUyVjM2LjQ4QzA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XJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.clover_solana?.isCloverWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.clover_solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return Uint8Array.from(r)}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const dst="Coin98";class fst extends eo{constructor(t={}){super(),this.name=dst,this.url="https://coin98.com",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NiA3NSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIxMDEuNjgxJSIgeDI9Ii0xLjU1NyUiIHkxPSIxNS4yNjglIiB5Mj0iODQuOTE3JSI+CiAgICAgIDx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SA3Ljk5aC0xLjYxN3YxLjc1YTIuNDE5IDIuNDE5IDAgMCAwLTEuNTgyIDIuNjg3IDIuNDE0IDIuNDE0IDAgMCAwIDIuMzkgMi4wMDYgMi40NSAyLjQ1IDAgMCAwIDEuNTU1LS41NzQgMi40MTQgMi40MTQgMCAwIDAtLjc0Ni00LjExOXYtMS43NVoiLz4KICA8L2c+Cjwvc3ZnPgo=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.coin98?.sol?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected()}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coin98.sol;let n;try{n=(await t.connect())[0]}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_sign",params:[t]}),i=new _e(r.publicKey),o=ln.decode(r.signature);return t.addSignature(i,o),t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_signAllTransactions",params:[t]}),i=new _e(r.publicKey),o=r.signatures;return t.map((a,s)=>{const u=ln.decode(o[s]);return a.addSignature(i,u),a})}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_signMessage",params:[t]});return ln.decode(r.signature)}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const hst="Coinbase Wallet";class gst extends eo{constructor(t={}){super(),this.name=hst,this.url="https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4SDYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window?.coinbaseSolana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coinbaseSolana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const pst="Coinhub";class yst extends i0{constructor(t={}){super(),this.name=pst,this.url="https://coinhub.org",this.icon="data:image/svg+xml;base64,PD94bWwgdmVy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IuNzg2MTA1MyBDNDkuOTUzNzUsOTEuMTc5NDIxMSA0OC4yMzcyOTE3LDg5LjE3MDQyMTEgNDYuOTY0MTY2Nyw4Ni44Nzg0NzM3IEM0NS40OTM4MDIxLDg0LjIzOCA0NC4yODE5MjcxLDgxLjQ1OSA0My4zNDY0MDYzLDc4LjU4MDE1NzkgTDQzLjM0NjQwNjMsNzguNTgwMTU3OSBaIiBpZD0i6Lev5b6EIiBmaWxsPSIjMUI4MDYxIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.coinhub?.isCoinhubWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coinhub;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const bst="HuobiWallet";class mst extends eo{constructor(t={}){super(),this.name=bst,this.url="https://www.huobiwallet.io",this.icon="data:image/svg+xml;base64,P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MTYyLjAyIDE2My42NDMgMTQ1LjI3QzE2NS4yMzMgMTI2Ljc1OCAxNTcuNzk4IDEwOC42IDE0My41OTcgOTYuMzE3NFoiIGZpbGw9InVybCgjcGFpbnQxX2xpbmVhcl8xMTAxXzEyNSkiLz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xMTAxXzEyNSIgeDE9IjEyMi40MDEiIHkxPSIyMDkuMjk1IiB4Mj0iMTc4LjY2MiIgeTI9IjExMC40NDciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y3RjZGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhcl8xMTAxXzEyNSIgeDE9IjE1Ny44NjEiIHkxPSIyMDMuMTc3IiB4Mj0iMTg5LjAxNCIgeTI9IjE0MC4wMjIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y3RjZGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.huobiWallet?.isHuobiWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.huobiWallet;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const vst="HyperPay";class wst extends eo{constructor(t={}){super(),this.name=vst,this.url="https://hyperpay.io",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTIwcHgiIGhlaWdodD0iNTIwcHgiIHZpZXdCb3g9IjAgMCA1MjAgNTIwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkh5cGVyUGF5PC90aXRsZT4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZ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MTguMDUyMDY5IEwxODcuMiwzMTguMDUyMDY5IEwxNjguNDgsMzkxLjUwMjAwMyBMMjQ4LjkwNjY2NywzOTEuNTAyMDAzIEwyNjguMzIsMzE2LjY2NjIyMiBDMjY4LjMyLDMxNi42NjYyMjIgMjgzLjc5NTIsMzE2LjQxNjc2OSAyOTkuOTE5MzYsMzE2LjIxNzIwNyBMMzAyLjM0MDk5OCwzMTYuMTg3Njg0IEMzMTIuMzAxMzkyLDMxNi4wNjgxNTkgMzIyLjIyNjY2NywzMTUuOTczMjk4IDMyOC42NCwzMTUuOTczMjk4IEMzNTkuODQsMzE1Ljk3MzI5OCA0NDIuMzQ2NjY3LDI5NS44Nzg1MDUgNDQyLjM0NjY2NywyMDkuOTU1OTQxIEM0NDIuMzQ2NjY3LDEzMS42NTU1NDEgMzU3LjA2NjY2NywxMjMuMzQwNDU0IDMyNS4xNzMzMzMsMTIzLjM0MDQ1NCBDMjkzLjI4LDEyMy4zNDA0NTQgMTIzLjQxMzMzMywxMjIuNjQ3NTMgMTIzLjQxMzMzMywxMjIuNjQ3NTMgWiIgaWQ9IuW9oueKtue7k+WQiCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.hyperPay?.solana?.isHyperPay?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.hyperPay.solana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Ast="Krystal";class Ist extends eo{constructor(t={}){super(),this.name=Ast,this.url="https://krystal.app",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSIjMDEwMTAxIi8+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiByeD0iMTAwIiBmaWxsPSIjMDEwMTAxIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjkxLjg4NyA4MC44NDA3QzI5MS44ODcgNzUuMDgyNiAyOTcuNTg1IDcxLjA1NzYgMzAzLjAxMiA3Mi45ODJMMzc3LjYxOCA5OS40Mzc2QzM4My4wMyAxMDEuMzU3IDM4NC45MjggMTA4LjA0MyAzOD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this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.krystal?.solana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected()}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.krystal.solana;let n;try{n=(await t.connect())[0]}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Fue={},Uue={},QR=(e,t)=>{Uue[e]=t},ft=e=>{class t extends Error{constructor(r,i,o){if(super(r||e,o),Object.setPrototypeOf(this,t.prototype),this.name=e,i)for(const a in i)this[a]=i[a];if(o&&Est(o)&&"cause"in o&&!("cause"in this)){const a=o.cause;this.cause=a,"stack"in a&&(this.stack=this.stack+` -CAUSE: `+a.stack)}}}return Fue[e]=t,t};function Est(e){return typeof e=="object"}const Rue=e=>{if(e&&typeof e=="object"){try{if(typeof e.message=="string"){const n=JSON.parse(e.message);n.message&&n.name&&(e=n)}}catch{}let t;if(typeof e.name=="string"){const{name:n}=e,r=Uue[n];if(r)t=r(e);else{let i=n==="Error"?Error:Fue[n];i||(console.warn("deserializing an unknown class '"+n+"'"),i=ft(n)),t=Object.create(i.prototype);try{for(const o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}catch{}}}else typeof e.message=="string"&&(t=new Error(e.message));return t&&!t.stack&&Error.captureStackTrace&&Error.captureStackTrace(t,Rue),t}return new Error(String(e))},Mst=e=>e&&(typeof e=="object"?Pue(e,[]):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e);function Pue(e,t){const n={};t.push(e);for(const r of Object.keys(e)){const i=e[r];if(typeof i!="function"){if(!i||typeof i!="object"){n[r]=i;continue}if(t.indexOf(e[r])===-1){n[r]=Pue(e[r],t.slice(0));continue}n[r]="[Circular]"}}return typeof e.name=="string"&&(n.name=e.name),typeof e.message=="string"&&(n.message=e.message),typeof e.stack=="string"&&(n.stack=e.stack),n}const Sst=ft("AccountNameRequired"),Dst=ft("AccountNotSupported"),Cst=ft("AmountRequired"),Lst=ft("BluetoothRequired"),kst=ft("BtcUnmatchedApp"),Bst=ft("CantOpenDevice"),Tst=ft("CashAddrNotSupported"),xst=ft("ClaimRewardsFeesWarning"),Nst=ft("CurrencyNotSupported"),Ost=ft("DeviceAppVerifyNotSupported"),Fst=ft("DeviceGenuineSocketEarlyClose"),Ust=ft("DeviceNotGenuine"),Rst=ft("DeviceOnDashboardExpected"),Pst=ft("DeviceOnDashboardUnexpected"),zst=ft("DeviceInOSUExpected"),jst=ft("DeviceHalted"),Gst=ft("DeviceNameInvalid"),Hst=ft("DeviceSocketFail"),Kst=ft("DeviceSocketNoBulkStatus"),zue=ft("LockedDeviceError"),Qst=ft("UnresponsiveDeviceError"),qst=ft("DisconnectedDevice"),Yst=ft("DisconnectedDeviceDuringOperation"),Jst=ft("DeviceExtractOnboardingStateError"),Vst=ft("DeviceOnboardingStatePollingError"),Wst=ft("EnpointConfig"),Zst=ft("EthAppPleaseEnableContractData"),Xst=ft("FeeEstimationFailed"),_st=ft("FirmwareNotRecognized"),$st=ft("HardResetFail"),ect=ft("InvalidXRPTag"),tct=ft("InvalidAddress"),nct=ft("InvalidNonce"),rct=ft("InvalidAddressBecauseDestinationIsAlsoSource"),ict=ft("LatestMCUInstalledError"),oct=ft("UnknownMCU"),act=ft("LedgerAPIError"),sct=ft("LedgerAPIErrorWithMessage"),cct=ft("LedgerAPINotAvailable"),uct=ft("ManagerAppAlreadyInstalled"),lct=ft("ManagerAppRelyOnBTC"),dct=ft("ManagerAppDepInstallRequired"),fct=ft("ManagerAppDepUninstallRequired"),hct=ft("ManagerDeviceLocked"),gct=ft("ManagerFirmwareNotEnoughSpace"),pct=ft("ManagerNotEnoughSpace"),yct=ft("ManagerUninstallBTCDep"),bct=ft("NetworkDown"),mct=ft("NoAddressesFound"),vct=ft("NotEnoughBalance"),wct=ft("NotEnoughBalanceToDelegate"),Act=ft("NotEnoughBalanceInParentAccount"),Ict=ft("NotEnoughSpendableBalance"),Ect=ft("NotEnoughBalanceBecauseDestinationNotCreated"),Mct=ft("NoAccessToCamera"),Sct=ft("NotEnoughGas"),Dct=ft("NotEnoughGasSwap"),Cct=ft("NotSupportedLegacyAddress"),Lct=ft("GasLessThanEstimate"),kct=ft("PriorityFeeTooLow"),Bct=ft("PriorityFeeTooHigh"),Tct=ft("PriorityFeeHigherThanMaxFee"),xct=ft("MaxFeeTooLow"),Nct=ft("PasswordsDontMatch"),Oct=ft("PasswordIncorrect"),Fct=ft("RecommendSubAccountsToEmpty"),Uct=ft("RecommendUndelegation"),Rct=ft("TimeoutTagged"),Pct=ft("UnexpectedBootloader"),zct=ft("MCUNotGenuineToDashboard"),jct=ft("RecipientRequired"),Gct=ft("UnavailableTezosOriginatedAccountReceive"),Hct=ft("UnavailableTezosOriginatedAccountSend"),Kct=ft("UpdateFetchFileFail"),Qct=ft("UpdateIncorrectHash"),qct=ft("UpdateIncorrectSig"),Yct=ft("UpdateYourApp"),Jct=ft("UserRefusedDeviceNameChange"),Vct=ft("UserRefusedAddress"),Wct=ft("UserRefusedFirmwareUpdate"),Zct=ft("UserRefusedAllowManager"),Xct=ft("UserRefusedOnDevice"),_ct=ft("TransportOpenUserCancelled"),$ct=ft("TransportInterfaceNotAvailable"),jue=ft("TransportRaceCondition"),eut=ft("TransportWebUSBGestureRequired"),tut=ft("TransactionHasBeenValidatedError"),nut=ft("DeviceShouldStayInApp"),rut=ft("WebsocketConnectionError"),iut=ft("WebsocketConnectionFailed"),out=ft("WrongDeviceForAccount"),aut=ft("WrongAppForCurrency"),sut=ft("ETHAddressNonEIP"),cut=ft("CantScanQRCode"),uut=ft("FeeNotLoaded"),lut=ft("FeeRequired"),dut=ft("FeeTooHigh"),fut=ft("PendingOperation"),hut=ft("SyncError"),gut=ft("PairingFailed"),put=ft("PeerRemovedPairing"),yut=ft("GenuineCheckFailed"),but=ft("LedgerAPI4xx"),mut=ft("LedgerAPI5xx"),vut=ft("FirmwareOrAppUpdateRequired"),wut=ft("OpReturnSizeLimit"),Aut=ft("DustLimit"),Iut=ft("LanguageNotFound"),Eut=ft("NoDBPathGiven"),Mut=ft("DBWrongPassword"),Sut=ft("DBNotReset");var lN;(function(e){e.Unknown="Unknown",e.LocationServicesDisabled="LocationServicesDisabled",e.LocationServicesUnauthorized="LocationServicesUnauthorized",e.BluetoothScanStartFailed="BluetoothScanStartFailed"})(lN||(lN={}));class qR extends Error{constructor(t,n){super(n),this.name="HwTransportError",this.type=t,Object.setPrototypeOf(this,qR.prototype)}}class eg extends Error{constructor(t,n){const r="TransportError";super(t||r),this.name=r,this.message=t,this.stack=new Error(t).stack,this.id=n}}QR("TransportError",e=>new eg(e.message,e.id));const vg={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};function Gue(e){switch(e){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=e&&e<=28671)return"Internal error, please report"}function R2(e){const t=Object.keys(vg).find(o=>vg[o]===e)||"UNKNOWN_ERROR",n=Gue(e)||t,r=e.toString(16),i=`Ledger device: ${n} (0x${r})`;if(e===vg.LOCKED_DEVICE)throw new zue(i);this.name="TransportStatusError",this.message=i,this.stack=new Error(i).stack,this.statusCode=e,this.statusText=t}R2.prototype=new Error;QR("TransportStatusError",e=>new R2(e.statusCode));const cht=Object.freeze(Object.defineProperty({__proto__:null,AccountNameRequiredError:Sst,AccountNotSupported:Dst,AmountRequired:Cst,BluetoothRequired:Lst,BtcUnmatchedApp:kst,CantOpenDevice:Bst,CantScanQRCode:cut,CashAddrNotSupported:Tst,ClaimRewardsFeesWarning:xst,CurrencyNotSupported:Nst,DBNotReset:Sut,DBWrongPassword:Mut,DeviceAppVerifyNotSupported:Ost,DeviceExtractOnboardingStateError:Jst,DeviceGenuineSocketEarlyClose:Fst,DeviceHalted:jst,DeviceInOSUExpected:zst,DeviceNameInvalid:Gst,DeviceNotGenuineError:Ust,DeviceOnDashboardExpected:Rst,DeviceOnDashboardUnexpected:Pst,DeviceOnboardingStatePollingError:Vst,DeviceShouldStayInApp:nut,DeviceSocketFail:Hst,DeviceSocketNoBulkStatus:Kst,DisconnectedDevice:qst,DisconnectedDeviceDuringOperation:Yst,DustLimit:Aut,ETHAddressNonEIP:sut,EnpointConfigError:Wst,EthAppPleaseEnableContractData:Zst,FeeEstimationFailed:Xst,FeeNotLoaded:uut,FeeRequired:lut,FeeTooHigh:dut,FirmwareNotRecognized:_st,FirmwareOrAppUpdateRequired:vut,GasLessThanEstimate:Lct,GenuineCheckFailed:yut,HardResetFail:$st,HwTransportError:qR,get HwTransportErrorType(){return lN},InvalidAddress:tct,InvalidAddressBecauseDestinationIsAlsoSource:rct,InvalidNonce:nct,InvalidXRPTag:ect,LanguageNotFound:Iut,LatestMCUInstalledError:ict,LedgerAPI4xx:but,LedgerAPI5xx:mut,LedgerAPIError:act,LedgerAPIErrorWithMessage:sct,LedgerAPINotAvailable:cct,LockedDeviceError:zue,MCUNotGenuineToDashboard:zct,ManagerAppAlreadyInstalledError:uct,ManagerAppDepInstallRequired:dct,ManagerAppDepUninstallRequired:fct,ManagerAppRelyOnBTCError:lct,ManagerDeviceLockedError:hct,ManagerFirmwareNotEnoughSpaceError:gct,ManagerNotEnoughSpaceError:pct,ManagerUninstallBTCDep:yct,MaxFeeTooLow:xct,NetworkDown:bct,NoAccessToCamera:Mct,NoAddressesFound:mct,NoDBPathGiven:Eut,NotEnoughBalance:vct,NotEnoughBalanceBecauseDestinationNotCreated:Ect,NotEnoughBalanceInParentAccount:Act,NotEnoughBalanceToDelegate:wct,NotEnoughGas:Sct,NotEnoughGasSwap:Dct,NotEnoughSpendableBalance:Ict,NotSupportedLegacyAddress:Cct,OpReturnDataSizeLimit:wut,PairingFailed:gut,PasswordIncorrectError:Oct,PasswordsDontMatchError:Nct,PeerRemovedPairing:put,PendingOperation:fut,PriorityFeeHigherThanMaxFee:Tct,PriorityFeeTooHigh:Bct,PriorityFeeTooLow:kct,RecipientRequired:jct,RecommendSubAccountsToEmpty:Fct,RecommendUndelegation:Uct,StatusCodes:vg,SyncError:hut,TimeoutTagged:Rct,TransactionHasBeenValidatedError:tut,TransportError:eg,TransportInterfaceNotAvailable:$ct,TransportOpenUserCancelled:_ct,TransportRaceCondition:jue,TransportStatusError:R2,TransportWebUSBGestureRequired:eut,UnavailableTezosOriginatedAccountReceive:Gct,UnavailableTezosOriginatedAccountSend:Hct,UnexpectedBootloader:Pct,UnknownMCU:oct,UnresponsiveDeviceError:Qst,UpdateFetchFileFail:Kct,UpdateIncorrectHash:Qct,UpdateIncorrectSig:qct,UpdateYourApp:Yct,UserRefusedAddress:Vct,UserRefusedAllowManager:Zct,UserRefusedDeviceNameChange:Jct,UserRefusedFirmwareUpdate:Wct,UserRefusedOnDevice:Xct,WebsocketConnectionError:rut,WebsocketConnectionFailed:iut,WrongAppForCurrency:aut,WrongDeviceForAccount:out,addCustomErrorDeserializer:QR,createCustomErrorClass:ft,deserializeError:Rue,getAltStatusMessage:Gue,serializeError:Mst},Symbol.toStringTag,{value:"Module"}));var C5=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{l(r.next(c))}catch(d){a(d)}}function u(c){try{l(r.throw(c))}catch(d){a(d)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},L5=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cut=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},kut=function(){function e(){var t=this;this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new m8e,this.send=function(n,r,i,o,a,s){return a===void 0&&(a=Be.Buffer.alloc(0)),s===void 0&&(s=[vg.OK]),C5(t,void 0,void 0,function(){var u,l;return L5(this,function(c){switch(c.label){case 0:if(a.length>=256)throw new eg("data.length exceed 256 bytes limit. Got: "+a.length,"DataLengthTooBig");return[4,this.exchange(Be.Buffer.concat([Be.Buffer.from([n,r,i,o]),Be.Buffer.from([a.length]),a]))];case 1:if(u=c.sent(),l=u.readUInt16BE(u.length-2),!s.some(function(d){return d===l}))throw new R2(l);return[2,u]}})})},this.exchangeAtomicImpl=function(n){return C5(t,void 0,void 0,function(){var r,i,o,a,s,u=this;return L5(this,function(l){switch(l.label){case 0:if(this.exchangeBusyPromise)throw new jue("An action was already pending on the Ledger device. Please deny or reconnect.");i=new Promise(function(c){r=c}),this.exchangeBusyPromise=i,o=!1,a=setTimeout(function(){o=!0,u.emit("unresponsive")},this.unresponsiveTimeout),l.label=1;case 1:return l.trys.push([1,,3,4]),[4,n()];case 2:return s=l.sent(),o&&this.emit("responsive"),[2,s];case 3:return clearTimeout(a),r&&r(),this.exchangeBusyPromise=null,[7];case 4:return[2]}})})},this._appAPIlock=null}return e.prototype.exchange=function(t){throw new Error("exchange not implemented")},e.prototype.setScrambleKey=function(t){},e.prototype.close=function(){return Promise.resolve()},e.prototype.on=function(t,n){this._events.on(t,n)},e.prototype.off=function(t,n){this._events.removeListener(t,n)},e.prototype.emit=function(t){for(var n,r=[],i=1;i>>0;function cE(e){return(e|Tut)>>>0}const xut=5,Nut=6,Out=0,Fut=1,Uut=1,Rut=2,uE=255,dJ=224;async function Put(e,t){const n=await Hue(e,xut,Out,t);return new _e(n)}async function zut(e,t,n){const r=Be.Buffer.alloc(1);r.writeUInt8(1,0);const i=up(t)?t.message.serialize():t.serializeMessage(),o=Be.Buffer.concat([r,n,i]);return await Hue(e,Nut,Fut,o)}async function Hue(e,t,n,r){let i=0,o=0;if(r.length>uE)for(;r.length-o>uE;){const u=r.slice(o,o+uE);if((await e.send(dJ,t,n,i|Rut,u)).length!==2)throw new R2(vg.INCORRECT_DATA);i|=Uut,o+=uE}const a=r.slice(o),s=await e.send(dJ,t,n,i,a);return s.slice(0,s.length-2)}const jut="Ledger";class Gut extends i0{constructor(t={}){super(),this.name=jut,this.url="https://ledger.com",this.icon="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzUgMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0ibTIzLjU4OCAwaC0xNnYyMS41ODNoMjEuNnYtMTZhNS41ODUgNS41ODUgMCAwIDAgLTUuNi01LjU4M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5KSIvPjxwYXRoIGQ9Im04LjM0MiAwaC0yLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCAtNS41ODUgNS41ODV2Mi43NTdoOC4zNDJ6Ii8+PHBhdGggZD0ibTAgNy41OWg4LjM0MnY4LjM0MmgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUuNzM5KSIvPjxwYXRoIGQ9Im0xNS4xOCAyMy40NTFoMi43NTdhNS41ODUgNS41ODUgMCAwIDAgNS41ODUtNS42di0yLjY3MWgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMS40NzggMTEuNDc4KSIvPjxwYXRoIGQ9Im03LjU5IDE1LjE4aDguMzQydjguMzQyaC04LjM0MnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5IDExLjQ3OCkiLz48cGF0aCBkPSJtMCAxNS4xOHYyLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCA1LjU4NSA1LjU4NWgyLjc1N3YtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDExLjQ3OCkiLz48L2c+PC9zdmc+",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"||typeof navigator>"u"||!navigator.hid?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._transport;n&&(n.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._derivationPath=t.derivationPath||But(0,0),this._connecting=!1,this._transport=null,this._publicKey=null}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable)throw new vr;this._connecting=!0;let t;try{t=(await Qo(()=>import("./TransportWebHID-ae61659d.js"),[])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=await t.create()}catch(i){throw new Zi(i?.message,i)}let r;try{r=await Put(n,this._derivationPath)}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),this._transport=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._transport;if(t){t.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null;try{await t.close()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._transport,r=this._publicKey;if(!n||!r)throw new vt;try{const i=await zut(n,t,this._derivationPath);t.addSignature(r,i)}catch(i){throw new jt(i?.message,i)}return t}catch(n){throw this.emit("error",n),n}}}const Hut="MathWallet";class Kut extends i0{constructor(t={}){super(),this.name=Hut,this.url="https://mathwallet.org",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHdpZHRoPSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMCAwaDEyOHYxMjhoLTEyOHoiIG9wYWNpdHk9IjAiLz48cGF0aCBkPSJtOTAuODQ3MDA4NiA1Ny43NjEwMDIzYy0yLjI3NzAzNjMtMi4yNzcwMzYzLTIuMjc3MDM2My01Ljk2ODg0MTYgMC04LjI0NTg3NzggMi4yNzcwMzYyLTIuMjc3MDM2MyA1Ljk2ODg0MTUtMi4yNzcwMzYzIDguMjQ1ODc3OCAwIDIuMjc3MDM2NiAyLjI3NzAzNjIgMi4yNzcwMzY2IDUuOTY4ODQxNSAwIDguMjQ1ODc3OC0yLjI3NzAzNjMgMi4yNzcwMzYyLTUuOTY4ODQxNiAyLjI3NzAzNjItOC4yNDU4Nzc4IDB6bS0xOS41ODM5NTk4IDE5LjU4Mzk1OTdjLTEuNzA3Nzc3Mi0xLjcwNzc3NzItMS43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S0yLjI3NzAzNjMgOC4yNDU4Nzc4IDAgMi4yNzcwMzYzIDUuOTY4ODQxNSAwIDguMjQ1ODc3OC01Ljk2ODg0MTUgMi4yNzcwMzYzLTguMjQ1ODc3OCAwem0wLTIwLjYxNDY5NDVjLTIuMjc3MDM2My0yLjI3NzAzNjMtMi4yNzcwMzYzLTUuOTY4ODQxNSAwLTguMjQ1ODc3OHM1Ljk2ODg0MTUtMi4yNzcwMzYzIDguMjQ1ODc3OCAwIDIuMjc3MDM2MyA1Ljk2ODg0MTUgMCA4LjI0NTg3NzgtNS45Njg4NDE1IDIuMjc3MDM2My04LjI0NTg3NzggMHptLTEwLjMwNzM0NzMgMTAuMzA3MzQ3M2MtMi4yNzcwMzYyLTIuMjc3MDM2My0yLjI3NzAzNjItNS45Njg4NDE2IDAtOC4yNDU4Nzc4IDIuMjc3MDM2My0yLjI3NzAzNjMgNS45Njg4NDE2LTIuMjc3MDM2MyA4LjI0NTg3NzggMCAyLjI3NzAzNjMgMi4yNzcwMzYyIDIuMjc3MDM2MyA1Ljk2ODg0MTUgMCA4LjI0NTg3NzgtMi4yNzcwMzYyIDIuMjc3MDM2Mi01Ljk2ODg0MTUgMi4yNzcwMzYyLTguMjQ1ODc3OCAweiIvPjwvZz48L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._messaged=n=>{const r=n.data;r&&r.origin==="mathwallet_internal"&&r.type==="lockStatusChanged"&&!r.payload&&this._disconnected()},this._disconnected=()=>{this._wallet&&(window.removeEventListener("message",this._messaged),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solana?.isMathWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}window.addEventListener("message",this._messaged),this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(window.removeEventListener("message",this._messaged),this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Qut="Neko";class qut extends eo{constructor(t={}){super(),this.name=Qut,this.url="https://nekowallet.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNDRweCIgaGVpZ2h0PSIyNjBweCIgdmlld0JveD0iMCAwIDI0NCAyNjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0NCAyNjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiAgPGltYWdlIGlkPSJpbWFnZTAiIHdpZHRoPSIyNDQi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EZUa1N1UW1DQyIgLz4KPC9zdmc+Cg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.neko?.isNeko?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.neko;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Yut="NuFi";class Jut extends eo{constructor(t={}){super(),this.name=Yut,this.url="https://nu.fi",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIi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DU5NEMyMS4yNzI1IDEzLjYzMjcgMjEuNDMxNyAxMy44MjkxIDIxLjM3OTQgMTQuMDM1N0MyMC4yMTk1IDE4LjYyMTIgMTYuMDY2IDIyLjAxNDUgMTEuMTIgMjIuMDE0NUM2LjE3MzkxIDIyLjAxNDUgMi4wMjA0MiAxOC42MjEyIDAuODYwNDY4IDE0LjAzNTdDMC44MDgyMTMgMTMuODI5MSAwLjk2NzQzNCAxMy42MzI3IDEuMTgwNTIgMTMuNjMyN0gzLjk4NjU5WiIgZmlsbD0iI0M2RkYwMCIvPgo8cGF0aCBkPSJNOS4yNTQ5OSA5LjIzMjE4QzkuMDY5ODMgOS4yMzIxOCA4LjkxOTcyIDkuMzgyMjkgOC45MTk3MiA5LjU2NzQ2VjEzLjI5NzRDOC45MTk3MiAxMy40ODI1IDkuMDY5ODMgMTMuNjMyNyA5LjI1NDk5IDEzLjYzMjdIMTIuOTg0OUMxMy4xNzAxIDEzLjYzMjcgMTMuMzIwMiAxMy40ODI1IDEzLjMyMDIgMTMuMjk3NFY5LjU2NzQ2QzEzLjMyMDIgOS4zODIyOSAxMy4xNzAxIDkuMjMyMTggMTIuOTg0OSA5LjIzMjE4SDkuMjU0OTlaIiBmaWxsPSIjQzZGRjAwIi8+Cjwvc3ZnPgo=",this.supportedTransactionVersions=new Set(["legacy",0]),this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._readyState!==rt.Unsupported&&li(()=>window.nufiSolana?.isNufi?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.nufiSolana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Vut="Phantom";class Wut extends eo{constructor(t={}){super(),this.name=Vut,this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNB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43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),n.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._accountChanged=n=>{const r=this._publicKey;if(r){try{n=new _e(n.toBytes())}catch(i){this.emit("error",new wr(i?.message,i));return}r.equals(n)||(this._publicKey=n,this.emit("connect",n))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&(eN()?(this._readyState=rt.Loadable,this.emit("readyStateChange",this._readyState)):li(()=>window.phantom?.solana?.isPhantom||window.solana?.isPhantom?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===rt.Installed&&await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this.readyState===rt.Loadable){const r=encodeURIComponent(window.location.href),i=encodeURIComponent(window.location.origin);window.location.href=`https://phantom.app/ul/browse/${r}?ref=${i}`;return}if(this.readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.phantom?.solana||window.solana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Zut="SafePal";class Xut extends i0{constructor(t={}){super(),this.name=Zut,this.url="https://safepal.io",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIHdpZHRoPSIyNTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMjU2IDEyOGMwIDcwLjY5Mzg3My01Ny4zMDc5MzMgMTI4LTEyOCAxMjgtNzAuNjkyMDY2NyAwLTEyOC01Ny4zMDYxMjctMTI4LTEyOCAwLTcwLjY5MjA2NjcgNTcuMzA3O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3IDkuMTU1OCA2LjcxODY5NjMgMTMuOTgyOTQ0bC40MTE1NTY2LjQzOTIwOXYtMzQuNDg0MTczaC0yNi42Mzc4MjMydi02NS42NDY0OTh6bTUyLjU1MjYtLjQ5OTE2NjIgNDcuMjgxNzcyIDE0LjYzMzkxMDZ2NjUuNzU2NDE3OGgtMjcuNzU4MDM3djI4LjQ3NTc1MWwtLjI4NTQ4OS4zNTQyMDZjLTEuMzU1MjUgMS42MzQ0NTUtNy41NjM1NzUgOC42MjI2NTUtMTkuMjIwNDY1IDE0LjU5NDkxNnptMTkuNTIzNzM1IDI3LjA3NzUwMzN2MzMuODAyMDIyMWg4LjI1MDQ2N3YtMzEuMjU0NDY0eiIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.safepal?.isSafePalWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.safepal;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const _ut="Saifu";class $ut extends e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zIyLjkxOTg0OCBDMTk5LjEzMDUwNiwzMjMuNTAyMDYyIDE3OS4xMDU0OTcsMzIzLjkyNjY4NCAxNjEuMzI1MTQ3LDMyMy44NjM0MjEgWiIgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.saifu?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.saifu;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;if(i.signAndSendTransaction)try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}return await super.sendTransaction(t,n,r)}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const elt="Salmon";class tlt extends eo{constructor({network:t=tN.Mainnet}={}){super(),this.name=elt,this.url="https://salmonwallet.io",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4OCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9Ijg4IiBoZWlnaHQ9Ijg4IiByeD0iMzAiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl84NTVfNTgwKSIvPgo8cGF0aCBkPSJNNTkuODA1NSAyNy42M0M1Ni43OTU1IDI1LjgyMzkgNTMuNjIyMiAyNC41Mzg4IDUwLjM1OTcgMjMuODE0NEw0Ni45MDQyIDE2LjEyODdDNDYuNDkzMyAxNC44NTg1IDQ1LjMwMDIgMTQuMDAwMSA0My45NTM3IDE0LjAwMDFINDMuODE1QzQyLjQ2ODUgMTQuMDAwMSA0MS4yNzU0IDE0Ljg2MzUgNDAuODY0NSAxNi4xMjg3TDM3LjQwOSAyMy44MDk1QzM0LjE0MTYgMjQuNTM4OCAzMC45NTgzIDI1LjgyODkgMjcuOTQzNCAyNy42MzQ5QzIxLjk1MzIgMzkuMjYwMyAyMC4zMjk0IDUwLjU5MjggMjEuMTQxMyA2MS43NjY2QzI0LjY1MTMgNjU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NjYxIDY4Ljg1NTUgMzkuMzA1MSA2Ny4wNjMzIDM5LjMwNTFDNjYuNTI4NyAzOS4zMDUxIDY2LjAwODkgMzkuNDA5MiA2NS41Mjg3IDM5LjYwMjhDNjcuNTQ4NSA0Ni4zMjU5IDY4LjM2MDQgNTMuNTc5OSA2Ny43MjY3IDYxLjQ4NEg3MS40ODQyQzc0LjI2NjUgNjEuNDg0IDc2LjI0MTcgNTguNzc0OSA3NS40MDAxIDU2LjEyMDNINzUuNDA1MVoiIGZpbGw9IiNGQ0ZDRkMiLz4KPHBhdGggZD0iTTEyLjE5MDggNTYuMzgzNUwxNi42MTY2IDQyLjQzNjFDMTcuMTYxMiA0MC43MjkyIDE4Ljc0MDUgMzkuNTY4MiAyMC41MzI2IDM5LjU2ODJDMjEuMDY3MiAzOS41NjgyIDIxLjU4NyAzOS42NzI0IDIyLjA2NzMgMzkuODY1OUMyMC4wNDc0IDQ2LjU4OSAxOS4yMzU1IDUzLjg0MzEgMTkuODY5MiA2MS43NDcxSDE2LjExMTdDMTMuMzI5NSA2MS43NDcxIDExLjM1NDIgNTkuMDM4IDEyLjE5NTggNTYuMzgzNUgxMi4xOTA4WiIgZmlsbD0iI0ZDRkNGQyIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzg1NV81ODAiIHgxPSI0NCIgeTE9IjAiIHgyPSI0NCIgeTI9Ijg4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRjgxNzAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY1QzQ1Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._network=t,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.salmon?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable&&this._readyState!==rt.Installed)throw new vr;this._connecting=!0;let t;try{t=(await Qo(()=>import("./index-62c88c7a.js"),[])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=new t({network:this._network})}catch(i){throw new mg(i?.message,i)}if(!n.connected)try{await n.connect()}catch(i){throw new Zi(i?.message,i)}if(!n.publicKey)throw new Rr;let r;try{r=new _e(n.publicKey.toBytes())}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),this._wallet=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signMessage(t,"utf8")}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const nlt="SKY Wallet";class rlt extends eo{constructor(t={}){super(),this.name=nlt,this.url="https://getsky.app",this.icon="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI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"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.skySolana?.isSkyWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.skySolana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}var ilt=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},olt=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},sM;function alt(e){const t=({register:n})=>n(e);try{window.dispatchEvent(new slt(t))}catch(n){console.error(`wallet-standard:register-wallet event could not be dispatched +`,t)}return Aa}function iJ(...e){var t;return e=e.filter(n=>!oM.has(n)),e.length?(e.forEach(n=>oM.add(n)),(t=$0.register)==null||t.forEach(n=>sN(()=>n(...e))),function(){var r;e.forEach(i=>oM.delete(i)),(r=$0.unregister)==null||r.forEach(i=>sN(()=>i(...e)))}):()=>{}}function nrt(){return[...oM]}function rrt(e,t){var n;return(n=$0[e])!=null&&n.push(t)||($0[e]=[t]),function(){var i;$0[e]=(i=$0[e])==null?void 0:i.filter(o=>t!==o)}}function sN(e){try{e()}catch(t){console.error(t)}}class irt extends Event{constructor(t){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),iM.set(this,void 0),$nt(this,iM,t,"f")}get detail(){return ert(this,iM,"f")}get type(){return"wallet-standard:app-ready"}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}iM=new WeakMap;function ort(){if(Aa||(Aa=trt(),typeof window>"u"))return Aa;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),Aa;const{register:t}=Aa,n=(...r)=>r.forEach(i=>sN(()=>i({register:t})));try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch{return console.error("window.navigator.wallets could not be set"),Aa}return n(...e),Aa}function art(e){const t=new Set,{get:n,on:r}=ort(),i=Uh(oJ(n()));return Fd(o=>{const a=[r("register",(...s)=>i.value=[...i.value,...oJ(s)]),r("unregister",(...s)=>i.value=i.value.filter(u=>s.some(l=>l===u.wallet)))];o(()=>a.forEach(s=>s()))}),te(()=>[...i.value,...e.value.filter(({name:o})=>i.value.some(a=>a.name===o)?(t.has(o)||(t.add(o),console.warn(`${o} was registered as a Standard Wallet. The Wallet Adapter for ${o} can be removed from your app.`)),!1):!0)])}function oJ(e){return e.filter(Xnt).map(t=>new _nt({wallet:t}))}function srt(e,t){const n=async(a,s,u)=>{var l;const c=(l=e.value)==null?void 0:l.adapter;if(!c)throw t(new Aue);if(!c.connected)throw t(new vt,c);return await c.sendTransaction(a,s,u)},r=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signTransaction"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signTransaction(u)}}),i=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signAllTransactions"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signAllTransactions(u)}}),o=te(()=>{var a;const s=(a=e.value)==null?void 0:a.adapter;if(s&&"signMessage"in s)return async u=>{if(!s.connected)throw t(new vt);return await s.signMessage(u)}});return{sendTransaction:n,signTransaction:r,signAllTransactions:i,signMessage:o}}function crt(e){const t=Te(!1);return typeof window>"u"||Fd(n=>{if(e.value)return;const r=()=>t.value=!0;window.addEventListener("beforeunload",r),n(()=>window.removeEventListener("beforeunload",r))}),t}function urt(e,t){const n=Uh(null),r=Te(null),i=Te(!1),o=Te(rt.Unsupported),a=te(()=>o.value===rt.Installed||o.value===rt.Loadable),s=()=>{var u,l,c,d,f,h;r.value=(l=(u=n.value)==null?void 0:u.adapter.publicKey)!=null?l:null,i.value=(d=(c=n.value)==null?void 0:c.adapter.connected)!=null?d:!1,o.value=(h=(f=n.value)==null?void 0:f.readyState)!=null?h:rt.Unsupported};return Fd(()=>{var u;n.value=t.value&&(u=e.value.find(({adapter:l})=>l.name===t.value))!=null?u:null,s()}),{wallet:n,publicKey:r,connected:i,readyState:o,ready:a,refreshWalletState:s}}function lrt(e){const t=Uh([]);return Fd(()=>{t.value=e.value.map(n=>({adapter:n,readyState:n.readyState}))}),t}const drt=({wallets:e=[],autoConnect:t=!1,cluster:n="mainnet-beta",onError:r,localStorageKey:i="walletName"})=>{const o=Te(n),a=Te(!1),s=Te(!1),u=Uh(e),l=art(u),{isMobile:c,uriForAppIdentity:d}=Int(l),f=knt(l,c,d,o),h=lrt(f),{name:g,isUsingMwaAdapterOnMobile:b,select:y,deselect:M}=Tnt(i,c),{wallet:E,publicKey:k,connected:C,readyState:H,ready:R,refreshWalletState:m}=urt(h,g),w=crt(b),G=Lnt(w,r);Bnt(h),wnt(E,w,b,M,m,G);const Y=Ant(t,E,b,a,C,R,M),{sendTransaction:K,signTransaction:D,signAllTransactions:v,signMessage:p}=srt(E,G);return{wallets:h,autoConnect:Y,cluster:o,wallet:E,publicKey:k,readyState:H,ready:R,connected:C,connecting:a,disconnecting:s,select:y,connect:async()=>{if(C.value||a.value||s.value)return;if(!E.value)throw G(new Aue);const O=E.value.adapter;if(!R.value)throw G(new vr,O);try{a.value=!0,await O.connect()}catch(j){throw M(),j}finally{a.value=!1}},disconnect:async()=>{if(!(s.value||!E.value))try{s.value=!0,await E.value.adapter.disconnect()}finally{s.value=!1}},sendTransaction:K,signTransaction:D,signAllTransactions:v,signMessage:p}};let cN=null;const o0=()=>{if(cN)return cN;throw new Ott("Wallet not initialized. Please use the `initWallet` method to initialize the wallet.")},frt=e=>{cN=drt(e)};function hrt(){const e=o0();return te(()=>{if(!e)return;const{signTransaction:t,signAllTransactions:n,publicKey:r}=e;if(!(!r.value||!t.value||!n.value))return{publicKey:r.value,signTransaction:t.value,signAllTransactions:n.value}})}const grt={install:(e,t={})=>{frt(t),e.config.globalProperties.$wallet=o0()}};function uN(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var prt=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi;const yrt=prt;var brt=typeof self=="object"&&self&&self.Object===Object&&self,mrt=yrt||brt||Function("return this")();const Lue=mrt;var vrt=function(){return Lue.Date.now()};const M5=vrt;var wrt=/\s/;function Art(e){for(var t=e.length;t--&&wrt.test(e.charAt(t)););return t}var Irt=/^\s+/;function Ert(e){return e&&e.slice(0,Art(e)+1).replace(Irt,"")}var Mrt=Lue.Symbol;const W3=Mrt;var kue=Object.prototype,Srt=kue.hasOwnProperty,Drt=kue.toString,Hy=W3?W3.toStringTag:void 0;function Crt(e){var t=Srt.call(e,Hy),n=e[Hy];try{e[Hy]=void 0;var r=!0}catch{}var i=Drt.call(e);return r&&(t?e[Hy]=n:delete e[Hy]),i}var Lrt=Object.prototype,krt=Lrt.toString;function Brt(e){return krt.call(e)}var Trt="[object Null]",xrt="[object Undefined]",aJ=W3?W3.toStringTag:void 0;function Nrt(e){return e==null?e===void 0?xrt:Trt:aJ&&aJ in Object(e)?Crt(e):Brt(e)}function Ort(e){return e!=null&&typeof e=="object"}var Frt="[object Symbol]";function Urt(e){return typeof e=="symbol"||Ort(e)&&Nrt(e)==Frt}var sJ=0/0,Rrt=/^[-+]0x[0-9a-f]+$/i,Prt=/^0b[01]+$/i,zrt=/^0o[0-7]+$/i,jrt=parseInt;function cJ(e){if(typeof e=="number")return e;if(Urt(e))return sJ;if(uN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=uN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ert(e);var n=Prt.test(e);return n||zrt.test(e)?jrt(e.slice(2),n?2:8):Rrt.test(e)?sJ:+e}var Grt="Expected a function",Hrt=Math.max,Krt=Math.min;function aM(e,t,n){var r,i,o,a,s,u,l=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Grt);t=cJ(t)||0,uN(n)&&(c=!!n.leading,d="maxWait"in n,o=d?Hrt(cJ(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function h(R){var m=r,w=i;return r=i=void 0,l=R,a=e.apply(w,m),a}function g(R){return l=R,s=setTimeout(M,t),c?h(R):a}function b(R){var m=R-u,w=R-l,G=t-m;return d?Krt(G,o-w):G}function y(R){var m=R-u,w=R-l;return u===void 0||m>=t||m<0||d&&w>=o}function M(){var R=M5();if(y(R))return E(R);s=setTimeout(M,b(R))}function E(R){return s=void 0,f&&r?h(R):(r=i=void 0,a)}function k(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function C(){return s===void 0?a:E(M5())}function H(){var R=M5(),m=y(R);if(r=arguments,i=this,u=R,m){if(s===void 0)return g(u);if(d)return clearTimeout(s),s=setTimeout(M,t),h(u)}return s===void 0&&(s=setTimeout(M,t)),a}return H.cancel=k,H.flush=C,H}async function Qrt(){const{data:e}=await sC.get("https://token.jup.ag/all");return e}const qrt=U2("token",()=>{const e=$p(),t=Te([]),n=Te(!1);async function r(){if(!n.value){console.log("getTokenList..."),n.value=!0;try{t.value=await Qrt(),console.log("Tokens: ",t.value)}catch(a){console.error("getTokenList error: ",a)}finally{n.value=!1}}}const i=te(()=>(e.cluster==="mainnet-beta"?Eet:Iet).map(s=>({name:s.name,symbol:s.symbol,image:s.image,mint:s.mint,decimals:s.decimals})));return{tokens:i,loading:n,getTokenList:r,tokenByMint:a=>i.value.find(s=>s.mint===a)}});function Yrt(){const e=qrt(),t=te(()=>e.tokens),n=Te("");function r(s){n.value=s}const i=Te("");function o(s){i.value=s}return{tokens:te(()=>t.value.filter(s=>s.symbol.toLowerCase().includes(n.value.toLocaleLowerCase())).filter(s=>!i.value||s.mint!==i.value)),handleSearchToken:r,handleFilterToken:o}}const Jrt=Symbol("WALLET_CONNECT_EVENT"),Vrt=Symbol("WALLET_DISCONNECT_EVENT"),Bue=Symbol("ACCOUNT_CHANGE_EVENT"),S5=5e3;function Wrt(){const{connection:e}=$p(),{emit:t}=F2(),{notify:n}=CO(),{wallet:r,publicKey:i}=o0(),o=Te(),a=Te(),s=async()=>{o.value!==void 0&&(await e.removeAccountChangeListener(o.value),o.value=void 0),a.value!==void 0&&(await e.removeOnLogsListener(a.value),a.value=void 0)},u=async l=>{l||(l=i.value),await s(),l&&(console.log("onConnect subscript: ",l?.toBase58()),await Promise.all([o.value=e.onAccountChange(l,c=>{console.log("ACCOUNT_CHANGE_EVENT",c),t(Bue,c)}),a.value=e.onLogs(l,c=>{console.log(c)})]))};nt([r,i],aM(([l,c],[d,f])=>{if(!l)return;u();const h=()=>{const y=l.adapter.publicKey;n({message:"Wallet update",caption:`Connected to wallet ${_ce(y?.toBase58()??"",7)}`,timeout:S5}),t(Jrt,l)},g=()=>{n({message:"Wallet update",caption:"Disconnected from wallet",timeout:S5}),s(),t(Vrt,l)},b=y=>{y?.message&&n({type:"negative",message:"Wallet update",caption:y.message,timeout:S5})};l.adapter.once("connect",h),l.adapter.once("disconnect",g),l.adapter.removeAllListeners("error"),l.adapter.on("error",b)},200),{immediate:!0})}const HR=U2("user",()=>{const e=$p(),t=o0(),n=hrt(),{publicKey:r}=t,i=Rb(),o=F2(),a=te(()=>UR.fromWallet(e.connection,n.value).env(eue).configure("debug",!0));nt(a,()=>console.log("AlbusClient: ",a.value),{immediate:!0});const{tokens:s}=Yrt(),u=Te(!1),l=Te(""),c=te(()=>Met[e.cluster]),d=te(()=>{if(i.name){const K=c.value?.policy[i.name];if(K)return K[l.value]??K.default}return""}),f=Te({}),h=te(()=>i.name?f.value[String(i.name)]??d.value:"");function g(K,D){f.value[D??i.name]=K,console.log("[swap] policies = ",f.value)}const b=Te([]),y=Te([]),M=Te();nt([c,a],aM(async()=>{console.log("[debug] service Code === ",c.value.serviceCode),c.value?(u.value=!0,y.value=await a.value?.policy.find({serviceCode:c.value.serviceCode}),M.value=(await a.value?.service.find({code:c.value.serviceCode}))?.[0]?.data??void 0,u.value=!1):(y.value=[],M.value=void 0),console.log("[debug] serviceData === ",M.value),console.log("[debug] required Policy pk === ",h.value),console.log("[debug] service Policy === ",y.value)},200),{immediate:!0});const E=te(()=>h.value?y.value?.find(K=>K.pubkey.toBase58()===h.value)?.data:null),k=xa({tokens:[],loading:!1,certificateLoading:!0,certificates:void 0}),C=te(()=>s.value.map(K=>K.mint).filter(K=>!!K)),H=aM(async()=>{if(r.value)try{k.loading=!0;const K=await iet(r.value?.toBase58(),e.connection),D=s.value.find(B=>B.mint===eM),v=D?{name:D.name,symbol:D.symbol,balance:K,decimals:9,mint:eM}:null,A=(await oet(e.connection,r.value,C.value)).map(B=>{const O=B.mint.toBase58(),j=s.value.find(U=>U.mint===O);return j?{name:j.name,symbol:j.symbol,balance:B?.balance??0,decimals:B?.decimals??0,mint:O}:null});k.tokens=[v,...A].filter(B=>!!B),console.log("[debug] user tokens === ",k.tokens)}finally{k.loading=!1}},2e3),R=K=>{let D=k.tokens.find(v=>v.mint===K)?.balance??0;return K===rue&&(D+=k.tokens.find(v=>v.mint===eM)?.balance??0),D},m=async K=>{try{const D=Ba.fromAccountInfo(K)[0],v=k.certificates?.findIndex(p=>p.data?.policy.toBase58()===D.policy.toBase58())??-1;if(k.certificates&&v>-1){const p=k.certificates[v];p.data=D,k.certificates=[...k.certificates.slice(0,v),p,...k.certificates.slice(v+1)]}}catch(D){console.log("reload cert error: ",D),setTimeout(w,0)}},w=aM(async()=>{if(b.value=[],!r.value){b.value.forEach(K=>{try{e.connection.removeAccountChangeListener(K)}catch{}}),b.value=[];return}try{k.certificateLoading=!0,k.certificates=await a.value?.proofRequest.find({user:r.value,serviceProviderCode:c.value?.serviceCode}),console.log("[debug] certificates === ",k.certificates);const K=[];k.certificates.forEach(D=>{K.push(e.connection.onAccountChange(D.pubkey,m))}),b.value=K}catch(K){console.error("getCertificates error:",K)}finally{k.certificateLoading=!1}},1500),G=te(()=>h.value?k.certificates?.find(K=>K.data.policy.toBase58()===h.value):null),Y=te(()=>(console.log("========== requiredPolicy.value = ",h.value),!h.value||G.value&&G.value.data?.status===dl.Verified));return nt([a,r],async()=>{a.value&&r.value?w():k.certificates=[]},{immediate:!0}),nt(r,K=>{K?H():k.tokens=[]},{immediate:!0}),o.on(Bue,()=>{H(),w()}),{state:k,certificate:G,certificateValid:Y,serviceLoading:u,contractPolicy:f,setContractPolicy:g,requiredPolicy:h,requiredPolicyData:E,policySpec:l,serviceData:M,servicePolicy:y,tokenBalance:R,getUserTokens:H,getCertificates:w}});function Tue(e){const t=$p(),n=te(()=>t.cluster),r=Rb(),i=HR(),o=te(()=>e?i.state.certificates?.find(l=>l.data.policy.toBase58()===e):i.certificate),a=te(()=>e??i.requiredPolicy),s=te(()=>!a.value||o.value&&o.value.data?.status===dl.Verified),u=te(()=>{let l=PR;if(eue!==zce.PROD&&n.value==="mainnet-beta"&&(l="https://stage.app.albus.finance"),o.value&&o.value.data?.status!==dl.Rejected)return`${l}/holder?certificate=${o.value.pubkey?.toBase58()}`;const c=encodeURIComponent(`${location.origin}${r.fullPath}`);return`${l}/wizard/${a.value}?cluster=${n.value}&redirect=${c}`});return{certificate:o,certificateLink:u,certificateValid:s}}const Zrt=["href"],Xrt={key:0,class:"certificate-card__info__date certificate-card__info__date--positive"},_rt=["innerHTML"],$rt={key:1,class:"certificate-card__info__date certificate-card__info__date--warning"},eit=Lt("span",null,"please wait...",-1),tit=[eit],nit={key:2,class:"certificate-card__info__date certificate-card__info__date--negative"},rit={key:0},iit={key:1},oit={key:2},ait=Di({__name:"CertificateStatus",props:{certificate:Object,certificateValid:Boolean},setup(e){const t=e,n=te(()=>{if(!t.certificate)return;const i=new Date(Number(t.certificate.data?.expiredAt)*1e3);return Number(t.certificate?.data?.expiredAt)===0?"∞":Zx(i)}),{certificateLink:r}=Tue();return(i,o)=>(Ut(),Nn("a",{href:It(r),class:"certificate-card__status",target:"_blank"},[e.certificateValid?(Ut(),Nn("div",Xrt,[zs(" valid until "),Lt("span",{innerHTML:It(n)},null,8,_rt)])):e.certificate?.data?.status===It(dl).Proved?(Ut(),Nn("div",$rt,tit)):(Ut(),Nn("div",nit,[e.certificate?e.certificate.data?.status===It(dl).Rejected?(Ut(),Nn("span",iit,"invalid certificate")):(Ut(),Nn("span",oit,"action required")):(Ut(),Nn("span",rit,"no certificate"))]))],8,Zrt))}}),sit={key:0,class:"q-px-md q-pt-md"},cit=Lt("div",{class:"policy-card__title q-mb-xs"}," Your certificate ",-1),uit={key:0},lit={class:"row"},dit=Lt("span",{class:"q-mx-auto"},"reload",-1),fit=["href"],hit={class:"certificate-card__modal-text q-ml-md"},git=["innerHTML"],pit={key:1,class:"policy-card__policy q-pa-md"},yit=Lt("div",{class:"policy-card__policy__title"}," Required certificate ",-1),bit={class:"policy-card__policy__info"},mit={class:"policy-card__policy__subtitle"},vit=Lt("div",{class:"policy-card__policy__subtitle"}," Rules: ",-1),wit={class:"q-ml-xs"},Ait={key:0},Iit=Di({__name:"PolicyInfoView",props:{requiredPolicyData:Object,certificate:Object,certificateLink:String,certificateValid:Boolean,certificateLoading:Boolean},emits:["closeDialog"],setup(e){const t=e,n=HR(),r=te(()=>n.serviceData),i=te(()=>n.serviceLoading),{connected:o}=o0(),a=te(()=>{const u=new Date(Number(t.certificate?.data?.createdAt)*1e3);return Zx(u)}),s=te(()=>{const u=new Date(Number(t.certificate?.data?.expiredAt)*1e3);return Number(t.certificate?.data?.expiredAt)===0?"∞":Zx(u)});return(u,l)=>{const c=ait,d=a$e,f=L0e;return Ut(),hi(yd,{class:"policy-card"},{default:Jt(()=>[mt(pn,{size:"20px",name:It(Jf),class:"cursor-pointer absolute-right q-pa-xs",onClick:l[0]||(l[0]=h=>u.$emit("closeDialog"))},null,8,["name"]),Lt("div",null,[mt(qz,{showing:It(i),"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),It(o)?(Ut(),Nn("div",sit,[mt(qz,{showing:e.certificateLoading,"label-class":"text-teal","label-style":"font-size: 1.1em"},null,8,["showing"]),cit,e.certificateValid?(Ut(),hi(yd,{key:1,flat:"",class:"certificate-card row items-center q-mt-sm"},{default:Jt(()=>[Lt("a",{href:`${It(PR)}/holder`,class:"certificate",target:"_blank"},[mt(f)],8,fit),Lt("div",hit,[Lt("div",null,"Created: "+Ro(It(a)),1),Lt("div",null,[zs("Expired: "),Lt("span",{innerHTML:It(s)},null,8,git)])])]),_:1})):(Ut(),Nn("div",uit,[mt(c,{class:"q-mb-sm",certificate:e.certificate,"certificate-valid":!!e.certificateValid},null,8,["certificate","certificate-valid"]),Lt("div",lit,[mt(d,{certificate:e.certificate,"certificate-link":e.certificateLink},null,8,["certificate","certificate-link"]),mt(_t,{loading:e.certificateLoading,unelevated:"",class:"create-certificate-btn q-ml-md",onClick:It(n).getCertificates},{default:Jt(()=>[dit,mt(pn,{name:It(Ybe),size:"8px",color:"primary"},null,8,["name"])]),_:1},8,["loading","onClick"])])]))])):Hf("",!0),e.requiredPolicyData?(Ut(),Nn("div",pit,[yit,Lt("div",bit,[Lt("div",mit," Name: "+Ro(It(r)?.name)+" "+Ro(e.requiredPolicyData.name),1),vit,Lt("div",wit,[(Ut(!0),Nn(qi,null,F1(e.requiredPolicyData.rules,(h,g)=>(Ut(),Nn("div",{key:g},[h.key!=="maxAge"&&h.key!=="expectedDateTo"||h.label!=="0"?(Ut(),Nn("span",Ait,Ro(It(ret)(h.key,h.label,h.value)),1)):Hf("",!0)]))),128))])])])):Hf("",!0)])]),_:1})}}}),Eit=Di({__name:"PolicyInfoDialog",setup(e){const t=F2(),n=Te(!1);t.on($ce,()=>{n.value=!0});const r=HR(),i=te(()=>r.requiredPolicyData),o=te(()=>r.state?.certificateLoading),{certificateLink:a,certificateValid:s,certificate:u}=Tue();return(l,c)=>{const d=Iit;return Ut(),hi(zh,{modelValue:It(n),"onUpdate:modelValue":c[1]||(c[1]=f=>Mr(n)?n.value=f:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[mt(d,{"required-policy-data":It(i),certificate:It(u),"certificate-valid":!!It(s),"certificate-loading":It(o),"certificate-link":It(a),onCloseDialog:c[0]||(c[0]=f=>n.value=!1)},null,8,["required-policy-data","certificate","certificate-valid","certificate-loading","certificate-link"])]),_:1},8,["modelValue"])}}}),Mit=e=>(tV("data-v-3326cf22"),e=e(),nV(),e),Sit={class:"column"},Dit=Mit(()=>Lt("span",{class:"q-mx-auto"},"Explore transaction",-1)),Cit=Di({__name:"TransactionSuccessDialog",setup(e){const t=F2(),n=Te(!1),r=Te("");return t.on(fet,(i="")=>{n.value=!0,r.value=i}),(i,o)=>(Ut(),hi(zh,{modelValue:It(n),"onUpdate:modelValue":o[1]||(o[1]=a=>Mr(n)?n.value=a:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[mt(yd,{class:ss(["transaction-result",{"q-py-md q-px-lg":i.$q.screen.gt.sm,"q-pa-md":!i.$q.screen.gt.sm}])},{default:Jt(()=>[mt(pn,{size:"20px",name:It(Jf),class:"cursor-pointer absolute-right q-pa-xs",onClick:o[0]||(o[0]=a=>n.value=!1)},null,8,["name"]),Lt("div",Sit,[Lt("div",{class:ss(["row q-py-sm",{"text-positive":!i.$q.dark.isActive}])},[mt(pn,{size:i.$q.screen.gt.sm?"32px":"20px",name:It(AE),class:"q-mr-sm"},null,8,["size","name"]),Lt("span",{class:ss({"text-h5":i.$q.screen.gt.sm,"policy-card__title":!i.$q.screen.gt.sm})}," The transaction was successful ",2)],2),It(r)?(Ut(),hi(_t,{key:0,href:It(r),target:"_blank",color:"primary",class:"q-mt-sm",type:"a"},{default:Jt(()=>[Dit]),_:1},8,["href"])):Hf("",!0)])]),_:1},8,["class"])]),_:1},8,["modelValue"]))}});const Lit=pl(Cit,[["__scopeId","data-v-3326cf22"]]),kit=Di({props:{text:{type:String,required:!0}},setup(e){const{notify:t}=CO();return{copy(){Ibe(e.text),t({message:"Copied to clipboard"})}}}}),Bit={id:"Group 3731"},Tit={id:"Group 3646"},xit=["fill"],Nit=["fill"];function Oit(e,t,n,r,i,o){return Ut(),hi(_t,{flat:"",round:"",dense:""},{default:Jt(()=>[(Ut(),Nn("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:t[0]||(t[0]=(...a)=>e.copy&&e.copy(...a))},[Lt("g",Bit,[Lt("g",Tit,[Lt("path",{id:"Vector",d:"M14.2856 3.46362H2.14284C0.959381 3.46362 0 4.39401 0 5.54171V17.3175C0 18.4652 0.959381 19.3956 2.14284 19.3956H14.2856C15.469 19.3956 16.4284 18.4652 16.4284 17.3175V5.54171C16.4284 4.39401 15.469 3.46362 14.2856 3.46362Z",fill:e.$q.dark.isActive?"#fff":"#455A64"},null,8,xit),Lt("path",{id:"Vector_2",d:"M17.8571 1.34184e-09H5.00008C3.82302 -4.05863e-05 2.86628 0.92069 2.85724 2.06214C2.85724 2.0677 2.85724 2.07253 2.85724 2.07809H14.2857C16.2572 2.08036 17.8548 3.62967 17.8571 5.54155V16.6247C17.8629 16.6247 17.8678 16.6247 17.8736 16.6247C19.0506 16.6159 20 15.6881 20 14.5466V2.07809C20 0.930391 19.0406 1.34184e-09 17.8571 1.34184e-09Z",fill:e.$q.dark.isActive?"#fff":"#455A64"},null,8,Nit)])])])),mt(aZ,{anchor:"top middle",self:"bottom middle",offset:[10,10]},{default:Jt(()=>[zs(" Copy to clipboard ")]),_:1})]),_:1})}const Fit=pl(kit,[["render",Oit]]),xue=e=>(tV("data-v-75dd99ea"),e=e(),nV(),e),Uit=xue(()=>Lt("div",{class:"text-h6 text-center"}," Your wallet ",-1)),Rit={class:"q-gutter-md row justify-between"},Pit=xue(()=>Lt("div",{class:"text-h6"}," Connect to a wallet ",-1)),zit={class:"text-light-gray text-caption full-width text-no-wrap",style:{"text-overflow":"ellipsis",overflow:"hidden"}},jit=["src","alt"],Git=Di({__name:"ConnectWallet",setup(e){const t={solflare:10,phantom:20,sollet:5,nufi:5,blocto:1},n={close:Jf},r=o0(),{connected:i,connecting:o}=r,a=te(()=>r.publicKey.value?.toBase58()??""),s=te(()=>_ce(a.value)),u=te(()=>[...r.wallets.value].sort((g,b)=>{const y=t[g.adapter.name.toLowerCase()]??1;return(t[b.adapter.name.toLowerCase()]??1)-y+1})),l=Te(!1);async function c(g){await r.select(g.adapter.name),l.value=!1,await r.connect()}function d(){l.value=!1,r.disconnect()}function f(){l.value=!0}function h(){l.value=!1}return(g,b)=>{const y=Fit;return Ut(),Nn(qi,null,[It(i)?(Ut(),hi(_t,K5({key:0},g.$attrs,{class:[g.$style.btn,"connect-button"],ripple:!1,"text-color":"white",rounded:"",unelevated:"",onClick:f}),{default:Jt(()=>[zs(Ro(It(s)),1)]),_:1},16,["class"])):(Ut(),hi(_t,K5({key:1},g.$attrs,{"text-color":"white",rounded:"",unelevated:"",ripple:!1,loading:It(o),class:"connect-button",onClick:f}),{default:Jt(()=>[zs(" CONNECT WALLET ")]),_:1},16,["loading"])),mt(zh,{modelValue:It(l),"onUpdate:modelValue":b[0]||(b[0]=M=>Mr(l)?l.value=M:null),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:Jt(()=>[It(i)?(Ut(),hi(yd,{key:0},{default:Jt(()=>[mt(Sa,{class:"relative-position"},{default:Jt(()=>[Uit,mt(_t,{padding:"md",color:"transparent","text-color":"primary-gray",unelevated:"",class:"absolute-right",icon:n.close,size:"md",onClick:h},null,8,["icon"])]),_:1}),mt(rc),mt(Sa,null,{default:Jt(()=>[mt(y,{text:It(a)},null,8,["text"]),zs(" "+Ro(It(a)),1)]),_:1}),mt(rc),mt(Sa,null,{default:Jt(()=>[Lt("div",Rit,[mt(_t,{outline:"",rounded:"",onClick:d},{default:Jt(()=>[zs(" Disconnect ")]),_:1}),mt(_t,{outline:"",rounded:"",onClick:h},{default:Jt(()=>[zs(" Ok ")]),_:1})])]),_:1})]),_:1})):(Ut(),hi(yd,{key:1,class:"wallet-connect-card"},{default:Jt(()=>[mt(Sa,null,{default:Jt(()=>[Pit,mt(_t,{padding:"md",color:"transparent","text-color":"primary-gray",unelevated:"",class:"absolute-right",icon:n.close,size:"md",onClick:h},null,8,["icon"])]),_:1}),mt(rc),mt(Sa,{style:{"max-height":"80vh"},class:"scroll"},{default:Jt(()=>[mt(I1e,{grid:"",rows:It(u),"row-key":"name","hide-pagination":"","hide-header":"","rows-per-page-options":[100]},{item:Jt(({row:M})=>[(Ut(),Nn("div",{key:`wallet-${M.name}`,class:"col-12 col-md-6"},[mt(bd,{clickable:"",onClick:E=>c(M)},{default:Jt(()=>[mt(ds,null,{default:Jt(()=>[Lt("b",null,Ro(M.adapter.name),1),Lt("div",zit,Ro(M.adapter.url),1)]),_:2},1024),mt(ds,{avatar:""},{default:Jt(()=>[mt(cW,{square:""},{default:Jt(()=>[Lt("img",{src:M.adapter.icon,alt:M.adapter.name},null,8,jit)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])]))]),_:1},8,["rows"])]),_:1})]),_:1}))]),_:1},8,["modelValue"])],64)}}});const Hit="_btn_6n1iw_1",Kit={btn:Hit},Qit={$style:Kit},qit=pl(Git,[["__cssModules",Qit],["__scopeId","data-v-75dd99ea"]]),Yit=Di({__name:"ClusterSelector",setup(e){const t=$p(),{connected:n,connect:r,disconnect:i,autoConnect:o}=o0(),a=[gd.filter(l=>l.cluster==="mainnet-beta"),gd.filter(l=>l.cluster!=="mainnet-beta")],s=te(()=>t.endpoint);function u(l){n&&t.cluster!==l.cluster&&(i(),o.value&&r()),t.setRpc(l.id)}return(l,c)=>It(gd).length>1?(Ut(),hi(CW,{key:0,label:It(s).cluster,"model-value":!1,"auto-close":"",color:"warning","text-color":"black",rounded:"",unelevated:"",class:"cluster-selector","content-class":"cluster-selector__menu",ripple:!1},{default:Jt(()=>[mt(SO,null,{default:Jt(()=>[(Ut(),Nn(qi,null,F1(a,(d,f)=>(Ut(),Nn(qi,{key:`${f}-cluster-group`},[(Ut(!0),Nn(qi,null,F1(d,h=>(Ut(),hi(bd,{key:h.id,clickable:"",onClick:g=>u(h)},{default:Jt(()=>[(Ut(),hi(ds,{key:`${h.id}-item`},{default:Jt(()=>[mt(OM,null,{default:Jt(()=>[Lt("b",null,Ro(h.cluster),1)]),_:2},1024)]),_:2},1024))]),_:2},1032,["onClick"]))),128)),f!==a.length-1?(Ut(),hi(rc,{key:0})):Hf("",!0)],64))),64))]),_:1})]),_:1},8,["label"])):Hf("",!0)}}),Jit={},Vit={class:"app-header"},Wit={class:"app-header__buttons"};function Zit(e,t){const n=Yit,r=qit,i=Lit,o=Eit;return Ut(),Nn("header",Vit,[Lt("div",Wit,[mt(n,{class:"q-mr-sm"}),mt(r)]),mt(i),mt(o)])}const Xit=pl(Jit,[["render",Zit]]),_it={key:0,class:"text-h6 text-negative fixed-top-right q-pt-xs q-pr-sm"},$it={class:"q-ml-lg"},eot=Di({__name:"EnvironmentWarning",setup(e){const t="dev",n=$p();return(r,i)=>It(t)!=="prod"?(Ut(),Nn("div",_it,[Lt("span",null,"Environment: "+Ro(It(t)==="dev"&&It(n).cluster==="mainnet-beta"?"stage":It(t)),1),Lt("span",$it,"Cluster: "+Ro(It(n).cluster),1)])):Hf("",!0)}}),tot={width:"1.2em",height:"1.2em",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",version:"1.1"},not=Lt("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"},null,-1),rot=[not];function iot(e,t){return Ut(),Nn("svg",tot,rot)}const oot={name:"app-twitter-x",render:iot},aot={fill:"currentColor",width:"31",height:"26",viewBox:"0 0 31 26",xmlns:"http://www.w3.org/2000/svg"},sot=Lt("path",{d:"M28.501 0.279105L2.2675 10.4223C0.477168 11.1433 0.487525 12.1447 1.93903 12.5912L8.67422 14.6979L24.2575 4.8396C24.9944 4.39008 25.6676 4.6319 25.1142 5.12444L12.4887 16.5494H12.4857L12.4887 16.5509L12.0241 23.5118C12.7047 23.5118 13.005 23.1988 13.3868 22.8294L16.6582 19.6397L23.463 24.6794C24.7177 25.3722 25.6187 25.0161 25.9309 23.5148L30.3979 2.40654C30.8551 0.568401 29.698 -0.263881 28.501 0.279105Z",fill:"#23353D"},null,-1),cot=[sot];function uot(e,t){return Ut(),Nn("svg",aot,cot)}const lot={name:"app-telegram",render:uot},dot={class:"social-links"},fot=["href","title"],hot=["href","title"],Nue=Di({__name:"SocialLinks",setup(e){return(t,n)=>{const r=lot,i=oot;return Ut(),Nn("nav",dot,[Lt("a",{href:It(NY),target:"_blank",title:It(NY)},[mt(r)],8,fot),Lt("a",{href:It(OY),target:"_blank",title:It(OY)},[mt(i)],8,hot)])}}}),KR=U2("theme",()=>{const e=CO(),t=xa({isMobile:!1,isDark:!1}),n=gue("theme","");return nt(()=>e.dark.mode,r=>{n.value=String(r),t.isDark=!!r}),nt(()=>e.screen.xs,r=>{t.isMobile=r},{immediate:!0}),gp(()=>{n.value&&e.dark.set(JSON.parse(n.value))}),{state:t,toggle(){e.dark.toggle()}}}),got=Lt("span",null,"Dark Mode",-1),Oue=Di({__name:"DarkThemeToggle",props:{propClass:String},setup(e){const{state:t,toggle:n}=KR();return(r,i)=>(Ut(),Nn("div",{class:ss(e.propClass)},[got,mt(EZ,{modelValue:It(t).isDark,"onUpdate:modelValue":i[0]||(i[0]=o=>It(t).isDark=o),dense:"",dark:"",color:"secondary",class:"app-toggle",onClick:It(n)},null,8,["modelValue","onClick"])],2))}}),pot={class:"menu"},yot=Di({__name:"MobileMenu",setup(e){const t=Rb(),n=["swap","pools","liquidity","transfer","about"],r=Te(!1),i=te(()=>r.value?Jf:Gbe);function o(){r.value=!r.value}return nt(r,a=>{a?window.addEventListener("scroll",o):window.removeEventListener("scroll",o)}),(a,s)=>{const u=Ub("router-link"),l=Oue,c=Nue;return Ut(),Nn("div",pot,[mt(_t,{flat:"",ripple:!1,icon:It(i)},{default:Jt(()=>[mt(Gb,{"model-value":It(r),"transition-show":"jump-down","transition-hide":"jump-up",anchor:"center middle",self:"center middle","max-width":"250px",class:"menu-container","onUpdate:modelValue":o},{default:Jt(()=>[mt(SO,{class:"q-pt-lg"},{default:Jt(()=>[(Ut(),Nn(qi,null,F1(n,d=>mt(bd,{key:d,clickable:""},{default:Jt(()=>[mt(ds,null,{default:Jt(()=>[mt(u,{to:d,class:ss({"active-route":It(t).name===d})},{default:Jt(()=>[zs(Ro(d),1)]),_:2},1032,["to","class"])]),_:2},1024)]),_:2},1024)),64)),mt(l,{"prop-class":"sidebar-theme"}),mt(bd,{clickable:""},{default:Jt(()=>[mt(c)]),_:1})]),_:1})]),_:1},8,["model-value"])]),_:1},8,["icon"])])}}});const bot={class:"sidebar-copyrights"},mot=Di({__name:"SidebarCopyrights",setup(e){const t=new Date().getFullYear();return(n,r)=>(Ut(),Nn("div",bot," © Copyright "+Ro(It(t))+" albus.finance All rights reserved. ",1))}}),vot={},wot={class:"sidebar-footer"},Aot=Lt("nav",null,[Lt("a",{href:"https://albus.finance",target:"_blanc"}," about ")],-1),Iot=[Aot];function Eot(e,t){return Ut(),Nn("div",wot,Iot)}const Mot=pl(vot,[["render",Eot]]),Sot="/assets/swap-icon-cf158c2d.svg",Dot="/assets/liquidity-icon-ba7c6687.svg",Cot="/assets/transfer-icon-513b853b.svg",Lot="/assets/pools-icon-141ed515.svg",kot="/assets/converter-icon-efe03260.svg",Bot={class:"sidebar-navigation"},Tot=["src","alt"],xot={name:"route-name"},Not=Di({__name:"SidebarNavigation",setup(e){const t=Rb(),n=[{name:"swap",icon:Sot},{name:"pools",icon:Lot},{name:"liquidity",icon:Dot},{name:"transfer",icon:Cot},{name:"converter",icon:kot}],r=Te("");return nt(()=>t.path,i=>{r.value=i.slice(1)},{immediate:!0}),(i,o)=>{const a=Ub("router-link");return Ut(),Nn("nav",Bot,[(Ut(),Nn(qi,null,F1(n,s=>mt(a,{key:s.name,to:s.name,class:ss([{"active-route":It(r)===s.name},"sidebar-navigation__item"])},{default:Jt(()=>[Lt("img",{class:"sidebar-navigation__item--icon",src:s.icon,alt:`${s.name} icon`},null,8,Tot),Lt("span",xot,Ro(s.name),1)]),_:2},1032,["to","class"])),64))])}}}),Oot="/assets/albus-logo-0ecbff35.svg",Fot={class:"sidebar-header"},Uot={class:"sidebar-header__logo"},Rot=["href"],Pot=["src"],zot=Lt("div",{class:"sidebar-header__details"},[Lt("span",null,"defi"),Lt("span",null,"solana")],-1),jot={__name:"SidebarHeader",setup(e){return(t,n)=>(Ut(),Nn("div",Fot,[Lt("div",Uot,[Lt("a",{href:It(PR),target:"_blanc"},[Lt("img",{src:It(Oot),alt:"logo"},null,8,Pot)],8,Rot)]),zot]))}},Got="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAArBAMAAACUQoX1AAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAIN/vML/Pr4Bw2uW9lwAAAEhJREFUKM9jQADR5QIIDqPWKkUET2jVqqXIUqtWIUutWoQiZYIstdhhiEpxIEsxcCJ4CJVwU4aZJEZMIyQX4UohDGJLBRhQAACdVmY7YzOmoQAAAABJRU5ErkJggg==",Hot={class:"sidebar"},Kot=["src"],Qot=Di({__name:"Sidebar",setup(e){const{state:t}=KR(),n=Te(!1);function r(){n.value=!n.value}return(i,o)=>{const a=jot,s=Not,u=Mot,l=Oue,c=Nue,d=mot,f=yot;return It(t).isMobile?(Ut(),hi(f,{key:1})):(Ut(),Nn("aside",{key:0,class:ss({"sidebar-minimize":It(n)})},[Lt("div",Hot,[mt(a),mt(s),mt(u),mt(l,{"prop-class":"sidebar-theme"}),mt(c),mt(d)]),mt(_t,{padding:"0","text-color":"white",rounded:"",dense:"",ripple:!1,class:"sidebar-modify-button",onClick:r},{default:Jt(()=>[Lt("img",{src:It(Got),alt:"arrow icon"},null,8,Kot)]),_:1})],2))}}}),qot={},Yot={class:"container content"};function Jot(e,t){const n=Qot,r=eot,i=Xit,o=Ub("router-view");return Ut(),Nn("div",Yot,[mt(n),Lt("main",null,[mt(r),mt(i),mt(o)])])}const Vot=pl(qot,[["render",Jot]]),Wot={default:Vot,home:()=>Qo(()=>import("./home-bd7c8724.js"),[])};function Zot(e){return e.map(t=>({path:t.path,meta:t.meta,component:Wot[t.meta?.layout||"default"],children:t.path==="/"?[t]:[{...t,path:""}]}))}const Xot={};function _ot(e,t){const n=Ub("transfer");return Ut(),hi(n)}const $ot=pl(Xot,[["render",_ot]]),eat=()=>Qo(()=>import("./transfer-a0398881.js"),["assets/transfer-a0398881.js","assets/AppDescriptionTop-8f9fdf69.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js","assets/associatedTokenAccount-56e3fa33.js"]),tat=()=>Qo(()=>import("./swap-24dcf843.js"),["assets/swap-24dcf843.js","assets/index-6f941dc9.js","assets/internal-446163cd.js","assets/AppDescriptionTop-8f9fdf69.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js","assets/swap-6005a05e.js","assets/associatedTokenAccount-56e3fa33.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js","assets/swap-circle-a93e350f.js"]),nat=()=>Qo(()=>import("./support-f2c49812.js"),[]),rat=()=>Qo(()=>import("./pools-501444fd.js"),["assets/pools-501444fd.js","assets/AppDescriptionTop-8f9fdf69.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js","assets/swap-6005a05e.js","assets/associatedTokenAccount-56e3fa33.js"]),iat=()=>Qo(()=>import("./liquidity-dcbbac31.js"),["assets/liquidity-dcbbac31.js","assets/AppDescriptionTop-8f9fdf69.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js","assets/swap-6005a05e.js","assets/associatedTokenAccount-56e3fa33.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js"]),oat=()=>Qo(()=>import("./liquidity-single-814c9e3f.js"),["assets/liquidity-single-814c9e3f.js","assets/AppDescriptionTop-8f9fdf69.js","assets/SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js","assets/PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js","assets/swap-6005a05e.js","assets/associatedTokenAccount-56e3fa33.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js","assets/swap-circle-a93e350f.js"]),aat=()=>Qo(()=>import("./create-pool-cad715b8.js"),["assets/create-pool-cad715b8.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js","assets/swap-6005a05e.js","assets/associatedTokenAccount-56e3fa33.js","assets/setAuthority-d61ee5de.js","assets/internal-446163cd.js"]),sat=()=>Qo(()=>import("./converter-44519e3e.js"),["assets/converter-44519e3e.js","assets/AppDescriptionTop-8f9fdf69.js","assets/PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js","assets/SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js","assets/setAuthority-d61ee5de.js","assets/internal-446163cd.js","assets/index-6f941dc9.js","assets/converter-98a7a240.css"]),cat=()=>Qo(()=>import("./about-dd228918.js"),[]),uat=()=>Qo(()=>import("./_...all_-fa61e49e.js"),["assets/_...all_-fa61e49e.js","assets/_...all_-f6a7ef33.css"]),lat=[{name:"transfer",path:"/transfer",component:eat,props:!0},{name:"swap",path:"/swap",component:tat,props:!0},{name:"support",path:"/support",component:nat,props:!0},{name:"pools",path:"/pools",component:rat,props:!0},{name:"liquidity",path:"/liquidity",component:iat,props:!0},{name:"liquidity-single",path:"/liquidity-single",component:oat,props:!0},{name:"index",path:"/",component:$ot,props:!0},{name:"create-pool",path:"/create-pool",component:aat,props:!0},{name:"converter",path:"/converter",component:sat,props:!0},{name:"about",path:"/about",component:cat,props:!0},{name:"all",path:"/:all(.*)*",component:uat,props:!0,meta:{layout:404}}],dat=Zot(lat),fat=y0e({history:xhe(),routes:dat});function hat(e){e.use(fat)}function gat({app:e}){e.use(ghe()),hat(e)}const pat=Object.freeze(Object.defineProperty({__proto__:null,install:gat},Symbol.toStringTag,{value:"Module"}));function yat({app:e}){const t=Cet();e.use(t)}const bat=Object.freeze(Object.defineProperty({__proto__:null,install:yat},Symbol.toStringTag,{value:"Module"})),uJ="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z",mat="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z",vat="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z",lJ="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z",wat="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z",Aat="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z",Iat="M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z",Eat="M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z",Mat="M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z",Sat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z",Dat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z",Cat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z",Lat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z",kat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H20V6H15V10H17A4,4 0 0,1 21,14A4,4 0 0,1 17,18H15A2,2 0 0,1 13,16V15H15V16H17A2,2 0 0,0 19,14A2,2 0 0,0 17,12H15A2,2 0 0,1 13,10V6A2,2 0 0,1 15,4Z",Bat="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V7H19V6H15V10H19A2,2 0 0,1 21,12V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V6A2,2 0 0,1 15,4M15,12V16H19V12H15Z",Tat="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z",xat="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z",Nat="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z",Oat="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",Fat="M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z",Uat="M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z",D5="M2 4V7H7V19H10V7H15V4H2M21 9H12V12H15V19H18V12H21V9Z",Rat="M23,12V14H18.61C19.61,16.14 19.56,22 12.38,22C4.05,22.05 4.37,15.5 4.37,15.5L8.34,15.55C8.37,18.92 11.5,18.92 12.12,18.88C12.76,18.83 15.15,18.84 15.34,16.5C15.42,15.41 14.32,14.58 13.12,14H1V12H23M19.41,7.89L15.43,7.86C15.43,7.86 15.6,5.09 12.15,5.08C8.7,5.06 9,7.28 9,7.56C9.04,7.84 9.34,9.22 12,9.88H5.71C5.71,9.88 2.22,3.15 10.74,2C19.45,0.8 19.43,7.91 19.41,7.89Z",Pat="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z",zat="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z",jat="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z",Gat="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z",Hat="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",Kat="M19,13H5V11H19V13Z",Qat="M14,17H12V9H10V7H14M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",qat="M15,11C15,12.11 14.1,13 13,13H11V15H15V17H9V13C9,11.89 9.9,11 11,11H13V9H9V7H13A2,2 0 0,1 15,9M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Yat="M15,10.5A1.5,1.5 0 0,1 13.5,12C14.34,12 15,12.67 15,13.5V15C15,16.11 14.11,17 13,17H9V15H13V13H11V11H13V9H9V7H13C14.11,7 15,7.89 15,9M19,3H5C3.91,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19C20.11,21 21,20.1 21,19V5A2,2 0 0,0 19,3Z",Jat="M15,17H13V13H9V7H11V11H13V7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Vat="M15,9H11V11H13A2,2 0 0,1 15,13V15C15,16.11 14.1,17 13,17H9V15H13V13H9V7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z",Wat="M15,9H11V11H13A2,2 0 0,1 15,13V15C15,16.11 14.1,17 13,17H11A2,2 0 0,1 9,15V9C9,7.89 9.9,7 11,7H15M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M11,15H13V13H11V15Z",Zat="M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19M11,17L15,9V7H9V9H13L9,17H11Z",Xat="M18,3H6V7H18M19,12A1,1 0 0,1 18,11A1,1 0 0,1 19,10A1,1 0 0,1 20,11A1,1 0 0,1 19,12M16,19H8V14H16M19,8H5A3,3 0 0,0 2,11V17H6V21H18V17H22V11A3,3 0 0,0 19,8Z",_at="M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z",$at="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",est={name:"svg-eva-icons",type:{positive:Nbe,negative:o8,info:jbe,warning:Sbe},arrow:{up:Tbe,right:Lbe,down:Cbe,left:Dbe,dropdown:Lj},chevron:{left:y0,right:pf},colorPicker:{spectrum:Rbe,tune:Hbe,palette:Kbe},pullToRefresh:{icon:Jbe},carousel:{left:y0,right:pf,up:Sj,down:a8,navigationIcon:Vbe},chip:{remove:Jf,selected:AE},datetime:{arrowLeft:y0,arrowRight:pf,now:Obe,today:xbe},editor:{bold:Aat,italic:Nat,strikethrough:Rat,underline:jat,unorderedList:Oat,orderedList:Fat,subscript:Pat,superscript:zat,hyperlink:Hat,toggleFullscreen:Gat,quote:Uat,left:lJ,center:mat,right:wat,justify:vat,print:Xat,outdent:Tat,indent:xat,removeFormat:Iat,formatting:Eat,fontSize:D5,align:lJ,hr:Kat,undo:$at,redo:_at,heading:D5,heading1:Sat,heading2:Dat,heading3:Cat,heading4:Lat,heading5:kat,heading6:Bat,code:uJ,size:D5,size1:Qat,size2:qat,size3:Yat,size4:Jat,size5:Vat,size6:Wat,size7:Zat,font:Mat,viewSource:uJ},expansionItem:{icon:a8,denseIcon:Lj},fab:{icon:Qbe,activeIcon:Jf},field:{clear:Fbe,error:Mbe},pagination:{first:Dj,prev:y0,next:pf,last:Cj},rating:{icon:Zbe},stepper:{done:AE,active:zbe,error:o8},tabs:{left:y0,right:pf,up:Sj,down:a8},table:{arrowUp:Bbe,warning:o8,firstPage:Dj,prevPage:y0,nextPage:pf,lastPage:Cj},tree:{icon:kbe},uploader:{done:AE,clear:Jf,add:qbe,upload:Ube,removeQueue:Wbe,removeUploaded:Pbe}};function tst({app:e}){e.use(Ebe,{plugins:{Notify:ybe,LocalStorage:nX,Dark:io},iconSet:est})}const nst=Object.freeze(Object.defineProperty({__proto__:null,install:tst},Symbol.toStringTag,{value:"Module"})),rst="Avana";class ist extends eo{constructor(t={}){super(),this.name=rst,this.url="https://www.avanawallet.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4yLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyODkuNzg3ODEgMjg5Ljc4NzgxIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyODkuNzg3ODEgMjg5Ljc4NzgxIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiMxQzFDMUMiIGQ9Ik0yMTguNDM5MDEsMjg5Ljc4NzgxSDcxLjM0ODhDMzEuOTQzOTUsMjg5Ljc4NzgxLDAsMjU3Ljg0Mzg3LDAsMjE4LjQzOTAxVjcxLjM0ODgNCglDMCwzMS45NDM5NSwzMS45NDM5NSwwLDcxLjM0ODgsMGgxNDcuMDkwMjFjMzkuNDA0ODYsMCw3MS4zNDg4LDMxLjk0Mzk1LDcxLjM0ODgsNzEuMzQ4OHYxNDcuMDkwMjENCglDMjg5Ljc4NzgxLDI1Ny44NDM4NywyNT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glsMTYuNDQ4MiwzNS41NTM0M2MyLjQxMjAyLDUuMjEzNjctMS43MDg5MiwxMS4wMjA4My03LjQzNzA5LDEwLjU4NzAxYy02Ny42NzI1LTUuMTI0OTQtMTA1LjA3MzAzLDM4LjcwMzA5LTEwNi4xNjQ3Niw0MC4wMDc3NA0KCWMtMC4wMjgxNCwwLjAyODMxLTAuMDI4MTQsMC4wMjgzMS0wLjAyODE0LDAuMDI4MzFjLTMuMDI3MjMsMy4xOTY5OS00Ljg5NDU4LDcuNDY5MDYtNC44OTQ1OCwxMi4yNTAxOA0KCWMwLDkuODE3MzEsNy45NDk5NCwxNy43NjcyNiwxNy43Mzg5MywxNy43NjcyNmM1LjE3NzQzLDAsOS44NDU0NS0yLjIzNDk5LDEzLjA5OTA1LTUuNzcxNDRjMCwwLDAuMDg0NzktMC4xMTMzLDAuMjU0NTMtMC4zMTEzNg0KCWMwLjExMzI4LTAuMTEzMTEsMC4yNTQ3MS0wLjI1NDUzLDAuMzk2MTMtMC40MjQyNmM0Ljk0NjEtNS4zMDEyNSwzNy42MTI0LTM3LjM5MDI3LDkyLjA2NjE1LTI2LjM1OTA3DQoJYzEyLjAxNzc4LDIuNDM0NTQsMjIuMDQ5NjgsMTAuNjgxNywyNy4yMTE2MiwyMS44MDQxNGwwLDBjMy4wMjcyMiw2LjUzNTM3LDkuNTA1OTcsMTEuMDYxOTgsMTYuNzIwMjksMTAuOTc3MDENCglDMjMyLjcyNTY2LDI0Mi4yMjQ4MiwyNDEuMjEzMTcsMjI4Ljc4NjI1LDIzNS43ODEyMiwyMTcuMDQ1MzN6Ii8+DQo8L3N2Zz4NCg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.avana?.solana?.isAvana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.avana.solana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const ost="BitKeep";class ast extends eo{constructor(t={}){super(),this.name=ost,this.url="https://bitkeep.com",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEy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NDIzIDQ2Ljc2NTggNzguOTE1NCA0Ni42NjU5IDc4Ljg2NDEgNDYuNTc3OUM3OC44MTI5IDQ2LjQ4OTggNzguNzM5MiA0Ni40MTY2IDc4LjY1MDQgNDYuMzY1Nkw2NS42ODY1IDM4LjkzNjdDNjUuMzMwMiAzOC43MzMxIDY0LjkyNjEgMzguNjI1OCA2NC41MTQ2IDM4LjYyNThDNjQuMTAzMiAzOC42MjU4IDYzLjY5OTEgMzguNzMzMSA2My4zNDI4IDM4LjkzNjdMMjguNzU3OCA1OC42M0MyOC41Nzk4IDU4LjczMTggMjguMzc3OCA1OC43ODU0IDI4LjE3MjIgNTguNzg1NUMyNy45NjY2IDU4Ljc4NTUgMjcuNzY0NiA1OC43MzIgMjcuNTg2NSA1OC42MzAzQzI3LjQwODQgNTguNTI4NiAyNy4yNjA0IDU4LjM4MjMgMjcuMTU3NSA1OC4yMDYxQzI3LjA1NDUgNTguMDI5OSAyNy4wMDAyIDU3LjgzIDI3IDU3LjYyNjRWNDUuNTQ3NkMyNi45OTg5IDQ0LjYzIDI3LjI0MiA0My43MjgzIDI3LjcwNDkgNDIuOTMzNEMyOC4xNjc4IDQyLjEzODQgMjguODM0MSA0MS40NzgzIDI5LjYzNjcgNDEuMDE5NUw2MS45MDcyIDIyLjY5NTRDNjIuNzA3MSAyMi4yMzk4IDYzLjYxMzggMjIgNjQuNTM2NiAyMkM2NS40NTk0IDIyIDY2LjM2NjEgMjIuMjM5OCA2Ny4xNjYgMjIuNjk1NEw5OS4zNjMzIDQxLjA4MzNDMTAwLjE2NSA0MS41NDE0IDEwMC44MyA0Mi4yMDAxIDEwMS4yOTMgNDIuOTkzNEMxMDEuNzU2IDQzLjc4NjcgMTAyIDQ0LjY4NjYgMTAyIDQ1LjYwMjdaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.bitkeep?.solana?.isBitKeep?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.bitkeep.solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const sst="Bitpie";class cst extends i0{constructor(t={}){super(),this.name=sst,this.url="https://bitpiecn.com",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiIHdpZHRoPSI2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMxZTNkYTAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3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:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.bitpie?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.bitpie;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const ust="Clover";class lst extends eo{constructor(t={}){super(),this.name=ust,this.url="https://clv.org",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTM2LjQ4IDBIMTEuNTJDNS4xNTc2OCAwIDAgNS4xNTc2OCAwIDExLjUyVjM2LjQ4QzAgNDIuODQyMyA1LjE1NzY4IDQ4IDExLjUyIDQ4SDM2LjQ4QzQyLjg0MjMgNDggNDggNDIuODQyMyA0OCAzNi40OFYxMS41MkM0OCA1LjE1NzY4IDQyLjg0MjMgMCAzNi40OCAwWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzc5MTBfMTYzMzUxKSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTI0LjAwMDYgMzkuMzYwNkMzMi40ODM3IDM5LjM2MDYgMzkuMzYwNiAzMi40ODM3IDM5LjM2MDYgMjQuMDAwNkMzOS4zNjA2IDE1LjUxNzUgMzIuNDgzNyA4LjY0MDYyIDI0LjAwMDYgOC42NDA2MkMxNS41MTc1IDguNjQwNjIgOC42NDA2MiAxNS41MTc1IDguNjQwNjIgMjQuMDAwNkM4LjY0MDYyIDMyLjQ4MzcgMTUuNTE3NSAzOS4zNjA2IDI0LjAwMDYgMzkuMzYwNlpNMjEuMjg5OSAxNS44Njg4SDI2LjcxMVYyMS4zNDdIMjEuMjkwNFYyNi42NTRIMjYuNzExVjMyLjEzMjJIMjEuMjg5OVYyNi44MjUySDE1Ljg2OTNWMjEuMzQ3SDIxLjI4OTlWMTUuODY4OFpNMjYuNzEyIDIxLjM0N0gzMi4xMzMxVjI2LjgyNTJIMjYuNzEyVjIxLjM0N1oiIGZpbGw9ImJsYWNrIi8+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfNzkxMF8xNjMzNTEiIHgxPSI0OCIgeTE9Ii0xLjQzMDUxZS0wNiIgeDI9IjEuNDMwNTFlLTA2IiB5Mj0iNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0E5RkZFMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NkQ1RkYiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.clover_solana?.isCloverWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.clover_solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return Uint8Array.from(r)}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const dst="Coin98";class fst extends eo{constructor(t={}){super(),this.name=dst,this.url="https://coin98.com",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NiA3NSI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIxMDEuNjgxJSIgeDI9Ii0xLjU1NyUiIHkxPSIxNS4yNjglIiB5Mj0iODQuOTE3JSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNGMUQ5NjEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjQ0RBMTQ2Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2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wvc3ZnPgo=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.coin98?.sol?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected()}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coin98.sol;let n;try{n=(await t.connect())[0]}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_sign",params:[t]}),i=new _e(r.publicKey),o=ln.decode(r.signature);return t.addSignature(i,o),t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_signAllTransactions",params:[t]}),i=new _e(r.publicKey),o=r.signatures;return t.map((a,s)=>{const u=ln.decode(o[s]);return a.addSignature(i,u),a})}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const r=await n.request({method:"sol_signMessage",params:[t]});return ln.decode(r.signature)}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const hst="Coinbase Wallet";class gst extends eo{constructor(t={}){super(),this.name=hst,this.url="https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4SDYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window?.coinbaseSolana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coinbaseSolana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const pst="Coinhub";class yst extends i0{constructor(t={}){super(),this.name=pst,this.url="https://coinhub.org",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAwcHgiIGhlaWdodD0iMTAwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh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NTgwMTU3OSBaIiBpZD0i6Lev5b6EIiBmaWxsPSIjMUI4MDYxIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.coinhub?.isCoinhubWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.coinhub;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const bst="HuobiWallet";class mst extends eo{constructor(t={}){super(),this.name=bst,this.url="https://www.huobiwallet.io",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjI0IiBoZWlnaHQ9IjIyNCIgdmlld0JveD0iMCAwIDIyNCAyMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNM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XzEyNSIgeDE9IjEyMi40MDEiIHkxPSIyMDkuMjk1IiB4Mj0iMTc4LjY2MiIgeTI9IjExMC40NDciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y3RjZGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQxX2xpbmVhcl8xMTAxXzEyNSIgeDE9IjE1Ny44NjEiIHkxPSIyMDMuMTc3IiB4Mj0iMTg5LjAxNCIgeTI9IjE0MC4wMjIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y3RjZGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.huobiWallet?.isHuobiWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.huobiWallet;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const vst="HyperPay";class wst extends eo{constructor(t={}){super(),this.name=vst,this.url="https://hyperpay.io",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTIwcHgiIGhlaWdodD0iNTIwcHgiIHZpZXdCb3g9IjAgMCA1MjAgNTIwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPkh5cGVyUGF5PC90aXRsZT4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Iue8lue7hC0zMyIgZmlsbD0iIzFBNzJGRSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPHBhdGggZD0iTTI2MCwwIEM0MDMuNTIsMCA1MjAsMTE1Ljk0MTI1NSA1MjAsMjU5LjY1Mjg3IEM1MjAsNDAzLjM2NDQ4NiA0MDMu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yLjM0MDk5OCwzMTYuMTg3Njg0IEMzMTIuMzAxMzkyLDMxNi4wNjgxNTkgMzIyLjIyNjY2NywzMTUuOTczMjk4IDMyOC42NCwzMTUuOTczMjk4IEMzNTkuODQsMzE1Ljk3MzI5OCA0NDIuMzQ2NjY3LDI5NS44Nzg1MDUgNDQyLjM0NjY2NywyMDkuOTU1OTQxIEM0NDIuMzQ2NjY3LDEzMS42NTU1NDEgMzU3LjA2NjY2NywxMjMuMzQwNDU0IDMyNS4xNzMzMzMsMTIzLjM0MDQ1NCBDMjkzLjI4LDEyMy4zNDA0NTQgMTIzLjQxMzMzMywxMjIuNjQ3NTMgMTIzLjQxMzMzMywxMjIuNjQ3NTMgWiIgaWQ9IuW9oueKtue7k+WQiCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.hyperPay?.solana?.isHyperPay?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.hyperPay.solana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Ast="Krystal";class Ist extends eo{constructor(t={}){super(),this.name=Ast,this.url="https://krystal.app",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSIjMDEwMTAxIi8+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiByeD0iMTAwIiBmaWxsPSIjMDEwMTAxIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjkxLjg4NyA4MC44NDA3QzI5MS44ODcgNzUuMDgyNiAyOTcuNTg1IDcxLjA1NzYgMzAzLjAxMiA3Mi45ODJMMzc3LjYxOCA5OS40Mzc2QzM4My4wMyAxMDEuMzU3IDM4NC45MjggMTA4LjA0MyAzODEuMzMxIDExMi41MTlMMzA2LjcyNSAyMDUuMzcyQzMwMS43OTQgMjExLjUxIDI5MS44ODcgMjA4LjAyMyAyOTEuODg3IDIwMC4xNVY4MC44NDA3Wk0xNTIuMzUzIDE3Mi4zM0MxNDYuMjg1IDE3NS44NDYgMTQ3LjAwNiAxODQuODI4IDE1My41NTcgMTg3LjMzM0wyNjYuMTEy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jIuNDQyIDMwNy45MjEgMjcxLjg5MiAzMTMuMzY4IDI3Ny44NThMNDE1Ljc3OSAzOTAuMDMxQzQyMC41NDMgMzk1LjI0OSA0MjkuMjMxIDM5Mi41NDggNDMwLjE5NyAzODUuNTQ5TDQ0Mi40MjIgMjk2LjkzMkM0NDMuMDIyIDI5Mi41OCA0NDAuMTQzIDI4OC41MDkgNDM1Ljg0IDI4Ny42MjVMMzIxLjIwNCAyNjQuMDY4Wk0yNzYuMjQ3IDMwMi44MDhDMjc2LjA3NSAyOTMuNTM3IDI2My4xNzEgMjkxLjQyOCAyNjAuMDU2IDMwMC4xNjFMMjE1LjA1MiA0MjYuMzYyQzIxMi44NzUgNDMyLjQ2NSAyMTguMTg4IDQzOC42MTEgMjI0LjU0MyA0MzcuMzM4TDI3MS43MDcgNDI3Ljg5M0MyNzUuNjYgNDI3LjEwMiAyNzguNDgxIDQyMy41OTUgMjc4LjQwNiA0MTkuNTYzTDI3Ni4yNDcgMzAyLjgwOFpNMjkyLjI5NiAzMDQuMDM2QzI5Mi4xNTMgMjk2LjM2OSAzMDEuNTYzIDI5Mi41OTEgMzA2Ljc2MiAyOTguMjI4TDM4MS43NjUgMzc5LjU2QzM4Ni4yMTggMzg0LjM4OCAzODMuNTk5IDM5Mi4yMyAzNzcuMTM5IDM5My40MTRMMzAzLjkgNDA2LjgzM0MyOTguODQxIDQwNy43NiAyOTQuMTU3IDQwMy45MyAyOTQuMDYxIDM5OC43ODdMMjkyLjI5NiAzMDQuMDM2WiIgZmlsbD0iIzFERTlCNiIvPgo8L3N2Zz4K",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.krystal?.solana?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected()}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.krystal.solana;let n;try{n=(await t.connect())[0]}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Fue={},Uue={},QR=(e,t)=>{Uue[e]=t},ft=e=>{class t extends Error{constructor(r,i,o){if(super(r||e,o),Object.setPrototypeOf(this,t.prototype),this.name=e,i)for(const a in i)this[a]=i[a];if(o&&Est(o)&&"cause"in o&&!("cause"in this)){const a=o.cause;this.cause=a,"stack"in a&&(this.stack=this.stack+` +CAUSE: `+a.stack)}}}return Fue[e]=t,t};function Est(e){return typeof e=="object"}const Rue=e=>{if(e&&typeof e=="object"){try{if(typeof e.message=="string"){const n=JSON.parse(e.message);n.message&&n.name&&(e=n)}}catch{}let t;if(typeof e.name=="string"){const{name:n}=e,r=Uue[n];if(r)t=r(e);else{let i=n==="Error"?Error:Fue[n];i||(console.warn("deserializing an unknown class '"+n+"'"),i=ft(n)),t=Object.create(i.prototype);try{for(const o in e)e.hasOwnProperty(o)&&(t[o]=e[o])}catch{}}}else typeof e.message=="string"&&(t=new Error(e.message));return t&&!t.stack&&Error.captureStackTrace&&Error.captureStackTrace(t,Rue),t}return new Error(String(e))},Mst=e=>e&&(typeof e=="object"?Pue(e,[]):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e);function Pue(e,t){const n={};t.push(e);for(const r of Object.keys(e)){const i=e[r];if(typeof i!="function"){if(!i||typeof i!="object"){n[r]=i;continue}if(t.indexOf(e[r])===-1){n[r]=Pue(e[r],t.slice(0));continue}n[r]="[Circular]"}}return typeof e.name=="string"&&(n.name=e.name),typeof e.message=="string"&&(n.message=e.message),typeof e.stack=="string"&&(n.stack=e.stack),n}const Sst=ft("AccountNameRequired"),Dst=ft("AccountNotSupported"),Cst=ft("AmountRequired"),Lst=ft("BluetoothRequired"),kst=ft("BtcUnmatchedApp"),Bst=ft("CantOpenDevice"),Tst=ft("CashAddrNotSupported"),xst=ft("ClaimRewardsFeesWarning"),Nst=ft("CurrencyNotSupported"),Ost=ft("DeviceAppVerifyNotSupported"),Fst=ft("DeviceGenuineSocketEarlyClose"),Ust=ft("DeviceNotGenuine"),Rst=ft("DeviceOnDashboardExpected"),Pst=ft("DeviceOnDashboardUnexpected"),zst=ft("DeviceInOSUExpected"),jst=ft("DeviceHalted"),Gst=ft("DeviceNameInvalid"),Hst=ft("DeviceSocketFail"),Kst=ft("DeviceSocketNoBulkStatus"),zue=ft("LockedDeviceError"),Qst=ft("UnresponsiveDeviceError"),qst=ft("DisconnectedDevice"),Yst=ft("DisconnectedDeviceDuringOperation"),Jst=ft("DeviceExtractOnboardingStateError"),Vst=ft("DeviceOnboardingStatePollingError"),Wst=ft("EnpointConfig"),Zst=ft("EthAppPleaseEnableContractData"),Xst=ft("FeeEstimationFailed"),_st=ft("FirmwareNotRecognized"),$st=ft("HardResetFail"),ect=ft("InvalidXRPTag"),tct=ft("InvalidAddress"),nct=ft("InvalidNonce"),rct=ft("InvalidAddressBecauseDestinationIsAlsoSource"),ict=ft("LatestMCUInstalledError"),oct=ft("UnknownMCU"),act=ft("LedgerAPIError"),sct=ft("LedgerAPIErrorWithMessage"),cct=ft("LedgerAPINotAvailable"),uct=ft("ManagerAppAlreadyInstalled"),lct=ft("ManagerAppRelyOnBTC"),dct=ft("ManagerAppDepInstallRequired"),fct=ft("ManagerAppDepUninstallRequired"),hct=ft("ManagerDeviceLocked"),gct=ft("ManagerFirmwareNotEnoughSpace"),pct=ft("ManagerNotEnoughSpace"),yct=ft("ManagerUninstallBTCDep"),bct=ft("NetworkDown"),mct=ft("NoAddressesFound"),vct=ft("NotEnoughBalance"),wct=ft("NotEnoughBalanceToDelegate"),Act=ft("NotEnoughBalanceInParentAccount"),Ict=ft("NotEnoughSpendableBalance"),Ect=ft("NotEnoughBalanceBecauseDestinationNotCreated"),Mct=ft("NoAccessToCamera"),Sct=ft("NotEnoughGas"),Dct=ft("NotEnoughGasSwap"),Cct=ft("NotSupportedLegacyAddress"),Lct=ft("GasLessThanEstimate"),kct=ft("PriorityFeeTooLow"),Bct=ft("PriorityFeeTooHigh"),Tct=ft("PriorityFeeHigherThanMaxFee"),xct=ft("MaxFeeTooLow"),Nct=ft("PasswordsDontMatch"),Oct=ft("PasswordIncorrect"),Fct=ft("RecommendSubAccountsToEmpty"),Uct=ft("RecommendUndelegation"),Rct=ft("TimeoutTagged"),Pct=ft("UnexpectedBootloader"),zct=ft("MCUNotGenuineToDashboard"),jct=ft("RecipientRequired"),Gct=ft("UnavailableTezosOriginatedAccountReceive"),Hct=ft("UnavailableTezosOriginatedAccountSend"),Kct=ft("UpdateFetchFileFail"),Qct=ft("UpdateIncorrectHash"),qct=ft("UpdateIncorrectSig"),Yct=ft("UpdateYourApp"),Jct=ft("UserRefusedDeviceNameChange"),Vct=ft("UserRefusedAddress"),Wct=ft("UserRefusedFirmwareUpdate"),Zct=ft("UserRefusedAllowManager"),Xct=ft("UserRefusedOnDevice"),_ct=ft("TransportOpenUserCancelled"),$ct=ft("TransportInterfaceNotAvailable"),jue=ft("TransportRaceCondition"),eut=ft("TransportWebUSBGestureRequired"),tut=ft("TransactionHasBeenValidatedError"),nut=ft("DeviceShouldStayInApp"),rut=ft("WebsocketConnectionError"),iut=ft("WebsocketConnectionFailed"),out=ft("WrongDeviceForAccount"),aut=ft("WrongAppForCurrency"),sut=ft("ETHAddressNonEIP"),cut=ft("CantScanQRCode"),uut=ft("FeeNotLoaded"),lut=ft("FeeRequired"),dut=ft("FeeTooHigh"),fut=ft("PendingOperation"),hut=ft("SyncError"),gut=ft("PairingFailed"),put=ft("PeerRemovedPairing"),yut=ft("GenuineCheckFailed"),but=ft("LedgerAPI4xx"),mut=ft("LedgerAPI5xx"),vut=ft("FirmwareOrAppUpdateRequired"),wut=ft("OpReturnSizeLimit"),Aut=ft("DustLimit"),Iut=ft("LanguageNotFound"),Eut=ft("NoDBPathGiven"),Mut=ft("DBWrongPassword"),Sut=ft("DBNotReset");var lN;(function(e){e.Unknown="Unknown",e.LocationServicesDisabled="LocationServicesDisabled",e.LocationServicesUnauthorized="LocationServicesUnauthorized",e.BluetoothScanStartFailed="BluetoothScanStartFailed"})(lN||(lN={}));class qR extends Error{constructor(t,n){super(n),this.name="HwTransportError",this.type=t,Object.setPrototypeOf(this,qR.prototype)}}class eg extends Error{constructor(t,n){const r="TransportError";super(t||r),this.name=r,this.message=t,this.stack=new Error(t).stack,this.id=n}}QR("TransportError",e=>new eg(e.message,e.id));const vg={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};function Gue(e){switch(e){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=e&&e<=28671)return"Internal error, please report"}function R2(e){const t=Object.keys(vg).find(o=>vg[o]===e)||"UNKNOWN_ERROR",n=Gue(e)||t,r=e.toString(16),i=`Ledger device: ${n} (0x${r})`;if(e===vg.LOCKED_DEVICE)throw new zue(i);this.name="TransportStatusError",this.message=i,this.stack=new Error(i).stack,this.statusCode=e,this.statusText=t}R2.prototype=new Error;QR("TransportStatusError",e=>new R2(e.statusCode));const cht=Object.freeze(Object.defineProperty({__proto__:null,AccountNameRequiredError:Sst,AccountNotSupported:Dst,AmountRequired:Cst,BluetoothRequired:Lst,BtcUnmatchedApp:kst,CantOpenDevice:Bst,CantScanQRCode:cut,CashAddrNotSupported:Tst,ClaimRewardsFeesWarning:xst,CurrencyNotSupported:Nst,DBNotReset:Sut,DBWrongPassword:Mut,DeviceAppVerifyNotSupported:Ost,DeviceExtractOnboardingStateError:Jst,DeviceGenuineSocketEarlyClose:Fst,DeviceHalted:jst,DeviceInOSUExpected:zst,DeviceNameInvalid:Gst,DeviceNotGenuineError:Ust,DeviceOnDashboardExpected:Rst,DeviceOnDashboardUnexpected:Pst,DeviceOnboardingStatePollingError:Vst,DeviceShouldStayInApp:nut,DeviceSocketFail:Hst,DeviceSocketNoBulkStatus:Kst,DisconnectedDevice:qst,DisconnectedDeviceDuringOperation:Yst,DustLimit:Aut,ETHAddressNonEIP:sut,EnpointConfigError:Wst,EthAppPleaseEnableContractData:Zst,FeeEstimationFailed:Xst,FeeNotLoaded:uut,FeeRequired:lut,FeeTooHigh:dut,FirmwareNotRecognized:_st,FirmwareOrAppUpdateRequired:vut,GasLessThanEstimate:Lct,GenuineCheckFailed:yut,HardResetFail:$st,HwTransportError:qR,get HwTransportErrorType(){return lN},InvalidAddress:tct,InvalidAddressBecauseDestinationIsAlsoSource:rct,InvalidNonce:nct,InvalidXRPTag:ect,LanguageNotFound:Iut,LatestMCUInstalledError:ict,LedgerAPI4xx:but,LedgerAPI5xx:mut,LedgerAPIError:act,LedgerAPIErrorWithMessage:sct,LedgerAPINotAvailable:cct,LockedDeviceError:zue,MCUNotGenuineToDashboard:zct,ManagerAppAlreadyInstalledError:uct,ManagerAppDepInstallRequired:dct,ManagerAppDepUninstallRequired:fct,ManagerAppRelyOnBTCError:lct,ManagerDeviceLockedError:hct,ManagerFirmwareNotEnoughSpaceError:gct,ManagerNotEnoughSpaceError:pct,ManagerUninstallBTCDep:yct,MaxFeeTooLow:xct,NetworkDown:bct,NoAccessToCamera:Mct,NoAddressesFound:mct,NoDBPathGiven:Eut,NotEnoughBalance:vct,NotEnoughBalanceBecauseDestinationNotCreated:Ect,NotEnoughBalanceInParentAccount:Act,NotEnoughBalanceToDelegate:wct,NotEnoughGas:Sct,NotEnoughGasSwap:Dct,NotEnoughSpendableBalance:Ict,NotSupportedLegacyAddress:Cct,OpReturnDataSizeLimit:wut,PairingFailed:gut,PasswordIncorrectError:Oct,PasswordsDontMatchError:Nct,PeerRemovedPairing:put,PendingOperation:fut,PriorityFeeHigherThanMaxFee:Tct,PriorityFeeTooHigh:Bct,PriorityFeeTooLow:kct,RecipientRequired:jct,RecommendSubAccountsToEmpty:Fct,RecommendUndelegation:Uct,StatusCodes:vg,SyncError:hut,TimeoutTagged:Rct,TransactionHasBeenValidatedError:tut,TransportError:eg,TransportInterfaceNotAvailable:$ct,TransportOpenUserCancelled:_ct,TransportRaceCondition:jue,TransportStatusError:R2,TransportWebUSBGestureRequired:eut,UnavailableTezosOriginatedAccountReceive:Gct,UnavailableTezosOriginatedAccountSend:Hct,UnexpectedBootloader:Pct,UnknownMCU:oct,UnresponsiveDeviceError:Qst,UpdateFetchFileFail:Kct,UpdateIncorrectHash:Qct,UpdateIncorrectSig:qct,UpdateYourApp:Yct,UserRefusedAddress:Vct,UserRefusedAllowManager:Zct,UserRefusedDeviceNameChange:Jct,UserRefusedFirmwareUpdate:Wct,UserRefusedOnDevice:Xct,WebsocketConnectionError:rut,WebsocketConnectionFailed:iut,WrongAppForCurrency:aut,WrongDeviceForAccount:out,addCustomErrorDeserializer:QR,createCustomErrorClass:ft,deserializeError:Rue,getAltStatusMessage:Gue,serializeError:Mst},Symbol.toStringTag,{value:"Module"}));var C5=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{l(r.next(c))}catch(d){a(d)}}function u(c){try{l(r.throw(c))}catch(d){a(d)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},L5=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cut=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},kut=function(){function e(){var t=this;this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new m8e,this.send=function(n,r,i,o,a,s){return a===void 0&&(a=Be.Buffer.alloc(0)),s===void 0&&(s=[vg.OK]),C5(t,void 0,void 0,function(){var u,l;return L5(this,function(c){switch(c.label){case 0:if(a.length>=256)throw new eg("data.length exceed 256 bytes limit. Got: "+a.length,"DataLengthTooBig");return[4,this.exchange(Be.Buffer.concat([Be.Buffer.from([n,r,i,o]),Be.Buffer.from([a.length]),a]))];case 1:if(u=c.sent(),l=u.readUInt16BE(u.length-2),!s.some(function(d){return d===l}))throw new R2(l);return[2,u]}})})},this.exchangeAtomicImpl=function(n){return C5(t,void 0,void 0,function(){var r,i,o,a,s,u=this;return L5(this,function(l){switch(l.label){case 0:if(this.exchangeBusyPromise)throw new jue("An action was already pending on the Ledger device. Please deny or reconnect.");i=new Promise(function(c){r=c}),this.exchangeBusyPromise=i,o=!1,a=setTimeout(function(){o=!0,u.emit("unresponsive")},this.unresponsiveTimeout),l.label=1;case 1:return l.trys.push([1,,3,4]),[4,n()];case 2:return s=l.sent(),o&&this.emit("responsive"),[2,s];case 3:return clearTimeout(a),r&&r(),this.exchangeBusyPromise=null,[7];case 4:return[2]}})})},this._appAPIlock=null}return e.prototype.exchange=function(t){throw new Error("exchange not implemented")},e.prototype.setScrambleKey=function(t){},e.prototype.close=function(){return Promise.resolve()},e.prototype.on=function(t,n){this._events.on(t,n)},e.prototype.off=function(t,n){this._events.removeListener(t,n)},e.prototype.emit=function(t){for(var n,r=[],i=1;i>>0;function cE(e){return(e|Tut)>>>0}const xut=5,Nut=6,Out=0,Fut=1,Uut=1,Rut=2,uE=255,dJ=224;async function Put(e,t){const n=await Hue(e,xut,Out,t);return new _e(n)}async function zut(e,t,n){const r=Be.Buffer.alloc(1);r.writeUInt8(1,0);const i=up(t)?t.message.serialize():t.serializeMessage(),o=Be.Buffer.concat([r,n,i]);return await Hue(e,Nut,Fut,o)}async function Hue(e,t,n,r){let i=0,o=0;if(r.length>uE)for(;r.length-o>uE;){const u=r.slice(o,o+uE);if((await e.send(dJ,t,n,i|Rut,u)).length!==2)throw new R2(vg.INCORRECT_DATA);i|=Uut,o+=uE}const a=r.slice(o),s=await e.send(dJ,t,n,i,a);return s.slice(0,s.length-2)}const jut="Ledger";class Gut extends i0{constructor(t={}){super(),this.name=jut,this.url="https://ledger.com",this.icon="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzUgMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0ibTIzLjU4OCAwaC0xNnYyMS41ODNoMjEuNnYtMTZhNS41ODUgNS41ODUgMCAwIDAgLTUuNi01LjU4M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5KSIvPjxwYXRoIGQ9Im04LjM0MiAwaC0yLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCAtNS41ODUgNS41ODV2Mi43NTdoOC4zNDJ6Ii8+PHBhdGggZD0ibTAgNy41OWg4LjM0MnY4LjM0MmgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUuNzM5KSIvPjxwYXRoIGQ9Im0xNS4xOCAyMy40NTFoMi43NTdhNS41ODUgNS41ODUgMCAwIDAgNS41ODUtNS42di0yLjY3MWgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMS40NzggMTEuNDc4KSIvPjxwYXRoIGQ9Im03LjU5IDE1LjE4aDguMzQydjguMzQyaC04LjM0MnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5IDExLjQ3OCkiLz48cGF0aCBkPSJtMCAxNS4xOHYyLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCA1LjU4NSA1LjU4NWgyLjc1N3YtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDExLjQ3OCkiLz48L2c+PC9zdmc+",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"||typeof navigator>"u"||!navigator.hid?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._transport;n&&(n.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._derivationPath=t.derivationPath||But(0,0),this._connecting=!1,this._transport=null,this._publicKey=null}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable)throw new vr;this._connecting=!0;let t;try{t=(await Qo(()=>import("./TransportWebHID-cf6557f6.js"),[])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=await t.create()}catch(i){throw new Zi(i?.message,i)}let r;try{r=await Put(n,this._derivationPath)}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),this._transport=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._transport;if(t){t.off("disconnect",this._disconnected),this._transport=null,this._publicKey=null;try{await t.close()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._transport,r=this._publicKey;if(!n||!r)throw new vt;try{const i=await zut(n,t,this._derivationPath);t.addSignature(r,i)}catch(i){throw new jt(i?.message,i)}return t}catch(n){throw this.emit("error",n),n}}}const Hut="MathWallet";class Kut extends i0{constructor(t={}){super(),this.name=Hut,this.url="https://mathwallet.org",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHdpZHRoPSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMCAwaDEyOHYxMjhoLTEyOHoiIG9wYWNpdHk9IjAiLz48cGF0aCBkPSJtOTAuODQ3MDA4NiA1Ny43NjEwMDIzYy0yLjI3NzAzNjMtMi4yNzcwMzYzLTIuMjc3MDM2My01Ljk2ODg0MTYgMC04LjI0NTg3NzggMi4yNzcwMzYyLTIuMjc3MDM2MyA1Ljk2ODg0MTUtMi4yNzcwMzYzIDguMjQ1ODc3OCAwIDIuMjc3MDM2NiAyLjI3NzAzNjIgMi4yNzcwMzY2IDUuOTY4ODQxNSAwIDguMjQ1ODc3OC0yLjI3NzAzNjMgMi4yNzcwMzYyLTUuOTY4ODQxNiAyLjI3NzAzNjItOC4yNDU4Nzc4IDB6bS0xOS41ODM5NTk4IDE5LjU4Mzk1OTdjLTEuNzA3Nzc3Mi0xLjcwNzc3NzItMS43MDc3NzcyLTQuNDc2NjMxMSAwLTYuMTg0NDA4M3M0LjQ3NjYzMTEtMS43MDc3NzcyIDYuMTg0NDA4MyAwIDEuNzA3Nzc3MiA0LjQ3NjYzMTEgMCA2LjE4NDQwODMtNC40NzY2MzExIDEuNzA3Nzc3Mi02LjE4NDQwODMgMHptMzAuOTIyMDQyMi0xMC4zMDczNDcyYy0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1ODc3OHM1Ljk2ODg0MTUtMi4yNzcwMzYzIDguMjQ1ODc3OCAwIDIuMjc3MDM2MyA1Ljk2ODg0MTUgMCA4LjI0NTg3NzgtNS45Njg4NDE1IDIuMjc3MDM2My04LjI0NTg3NzggMHptLTEwLjMwNzM0NzMgMTAuMzA3MzQ3M2MtMi4yNzcwMzYyLTIuMjc3MDM2My0yLjI3NzAzNjItNS45Njg4NDE2IDAtOC4yNDU4Nzc4IDIuMjc3MDM2My0yLjI3NzAzNjMgNS45Njg4NDE2LTIuMjc3MDM2MyA4LjI0NTg3NzggMCAyLjI3NzAzNjMgMi4yNzcwMzYyIDIuMjc3MDM2MyA1Ljk2ODg0MTUgMCA4LjI0NTg3NzgtMi4yNzcwMzYyIDIuMjc3MDM2Mi01Ljk2ODg0MTUgMi4yNzcwMzYyLTguMjQ1ODc3OCAweiIvPjwvZz48L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._messaged=n=>{const r=n.data;r&&r.origin==="mathwallet_internal"&&r.type==="lockStatusChanged"&&!r.payload&&this._disconnected()},this._disconnected=()=>{this._wallet&&(window.removeEventListener("message",this._messaged),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solana?.isMathWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solana;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}window.addEventListener("message",this._messaged),this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(window.removeEventListener("message",this._messaged),this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Qut="Neko";class qut extends eo{constructor(t={}){super(),this.name=Qut,this.url="https://nekowallet.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNDRweCIgaGVpZ2h0PSIyNjBweCIgdmlld0JveD0iMCAwIDI0NCAyNjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0NCAyNjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiAgPGltYWdlIGlkPSJpbWFnZTAiIHdpZHRoPSIyNDQiIGhlaWdodD0iMjYwIiB4PSIwIiB5PSIwIgogICAgaHJlZj0iZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFQUUFBQUVFQ0FNQUFBQW9GT2xoQUFBQUJHZEJUVUVBQUxHUEMveGhCUUFBQUNCalNGSk4KQUFCNkpnQUFnSVFBQVBvQ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tXSlFqc2JhbEVyMmpua1g0VzlYRWVZdVNmYm5NSS9kc2lDaGwxV1Y1RDRKM094RCtZeWpKZkZ2NHptUXFQdAp1MmVTbW9jZDVjaW03RS94RDVqeW9OR1BvL204anBpRGQ4dWJqNkljZ21GL1YxNzRFNDhlTkdoRmZWZTZMYytSaDE5WXhQZWlIUU5oCkplOFUvajA0SGpUYVZRZk4yRzQrS3BvQnAyQ1VaL0tQTnFNZmRETEIrUHkwSGkzMEtNNnhMcmFzUnpxVk9nYTM3OEZRcHZIOWFielQKR2doTk5LRHhiNWdPZ3R4dnlqTStlRGdBdXVBdzc2aFFlNEZPcFM3b3JrcHltdkNZVTJNN0pvRm5tb0ZPcFU3cnJreEN5cDVPdFdtSAo1TEkzMnBsVHg1N1VYWjhrZFBGUUIzVHEzQTU0ckROZHpEdWgzOHFlUy9Yb2pPNUtxV1kra2ZKUmVxQmJlQ2FkOHRYWUFHZXppK2RTCkFSb2JXR3QyYWlnVnJOTUQyY1F6cDFPaEdvTm5qL3BIYnh4S1VYcmxUZDJWbE5XYmFSTFppZmJBTlBKWG44S1FiUTJkZVN1VHplcXUKY1R4bHM1bUp0NGRnWkVmbnpyeHo2bWNXZWovcTRzVzMzbms3c0pOSy9SOXZRRFNYcURYRjdRQUFBQ1YwUlZoMFpHRjBaVHBqY21WaApkR1VBTWpBeU1pMHdOaTB5T0ZRd05Eb3lNRG96T0Nzd01qb3dNSmVEK2JFQUFBQWxkRVZZZEdSaGRHVTZiVzlrYVdaNUFESXdNakl0Ck1EWXRNamhVTURRNk1qQTZNemdyTURJNk1ERG0za0VOQUFBQUFFbEZUa1N1UW1DQyIgLz4KPC9zdmc+Cg==",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.neko?.isNeko?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.neko;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Yut="NuFi";class Jut extends eo{constructor(t={}){super(),this.name=Yut,this.url="https://nu.fi",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjMiIHZpZXdCb3g9IjAgMCAyMiAyMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iIzIxMjEyMSIgLz4KPHBhdGggZD0iTTQuMzA5OTkgOS4wMDAwOEM1LjM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DgyMTMgMTMuODI5MSAwLjk2NzQzNCAxMy42MzI3IDEuMTgwNTIgMTMuNjMyN0gzLjk4NjU5WiIgZmlsbD0iI0M2RkYwMCIvPgo8cGF0aCBkPSJNOS4yNTQ5OSA5LjIzMjE4QzkuMDY5ODMgOS4yMzIxOCA4LjkxOTcyIDkuMzgyMjkgOC45MTk3MiA5LjU2NzQ2VjEzLjI5NzRDOC45MTk3MiAxMy40ODI1IDkuMDY5ODMgMTMuNjMyNyA5LjI1NDk5IDEzLjYzMjdIMTIuOTg0OUMxMy4xNzAxIDEzLjYzMjcgMTMuMzIwMiAxMy40ODI1IDEzLjMyMDIgMTMuMjk3NFY5LjU2NzQ2QzEzLjMyMDIgOS4zODIyOSAxMy4xNzAxIDkuMjMyMTggMTIuOTg0OSA5LjIzMjE4SDkuMjU0OTlaIiBmaWxsPSIjQzZGRjAwIi8+Cjwvc3ZnPgo=",this.supportedTransactionVersions=new Set(["legacy",0]),this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._readyState!==rt.Unsupported&&li(()=>window.nufiSolana?.isNufi?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.nufiSolana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Vut="Phantom";class Wut extends eo{constructor(t={}){super(),this.name=Vut,this.url="https://phantom.app",this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNS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LjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),n.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._accountChanged=n=>{const r=this._publicKey;if(r){try{n=new _e(n.toBytes())}catch(i){this.emit("error",new wr(i?.message,i));return}r.equals(n)||(this._publicKey=n,this.emit("connect",n))}},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&(eN()?(this._readyState=rt.Loadable,this.emit("readyStateChange",this._readyState)):li(()=>window.phantom?.solana?.isPhantom||window.solana?.isPhantom?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1))}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async autoConnect(){this.readyState===rt.Installed&&await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this.readyState===rt.Loadable){const r=encodeURIComponent(window.location.href),i=encodeURIComponent(window.location.origin);window.location.href=`https://phantom.app/ul/browse/${r}?ref=${i}`;return}if(this.readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.phantom?.solana||window.solana;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),t.on("accountChanged",this._accountChanged),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Zut="SafePal";class Xut extends i0{constructor(t={}){super(),this.name=Zut,this.url="https://safepal.io",this.icon="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIHdpZHRoPSIyNTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMjU2IDEyOGMwIDcwLjY5Mzg3My01Ny4zMDc5MzMgMTI4LTEyOCAxMjgtNzAuNjkyMDY2NyAwLTEyOC01Ny4zMDYxMjctMTI4LTEyOCAwLTcwLjY5MjA2NjcgNTcuMzA3OTMzMy0xMjggMTI4LTEyOCA3MC42OTIwNjcgMCAxMjggNTcuMzA3OTMzMyAxMjggMTI4IiBmaWxsPSIjMDAwIi8+PHBhdGggZD0ibTIwMC45OTE0OTkgMTQxLjM4NDM3OXYxMS45MzQ0MDRjMCAzMi40OTcwNzgtNDYuMjA1ODI2IDUxLjQ3NTM0Ni02MS45MzUzOTggNTYuO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wtLjI4NTQ4OS4zNTQyMDZjLTEuMzU1MjUgMS42MzQ0NTUtNy41NjM1NzUgOC42MjI2NTUtMTkuMjIwNDY1IDE0LjU5NDkxNnptMTkuNTIzNzM1IDI3LjA3NzUwMzN2MzMuODAyMDIyMWg4LjI1MDQ2N3YtMzEuMjU0NDY0eiIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.safepal?.isSafePalWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.safepal;let n;try{n=await t.getAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const _ut="Saifu";class $ut extends eo{constructor(t={}){super(),this.name=_ut,this.url="https://saifuwallet.com",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTQxcHgiIGhlaWdodD0iNTQxcHgiIHZpZXdCb3g9IjAgMCA1NDEgNTQxIiB2ZXJzaW9uPSIxLjE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u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.saifu?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.saifu;if(!t.isConnected)try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;if(i.signAndSendTransaction)try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}return await super.sendTransaction(t,n,r)}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const elt="Salmon";class tlt extends eo{constructor({network:t=tN.Mainnet}={}){super(),this.name=elt,this.url="https://salmonwallet.io",this.icon="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4OCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9Ijg4IiBoZWlnaHQ9Ijg4IiByeD0iMzAiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl84NTVfNTgwKSIvPgo8cGF0aCBkPSJNNTkuODA1NSAyNy42M0M1Ni43OTU1IDI1LjgyMzkgNTMuNjIyMiAyNC41Mzg4IDUwLjM1OTcgMjMuODE0NEw0Ni45MDQyIDE2LjEyODdDNDYuNDkzMyAxNC44NTg1IDQ1LjMwMDIgMTQuMDAwMSA0My45NTM3IDE0LjAwMDFINDMuODE1QzQyLjQ2ODUgMTQuMDAwMSA0MS4yNzU0IDE0Ljg2MzUgNDAuODY0NSAxNi4xMjg3TDM3LjQwOSAyMy44MDk1QzM0LjE0MTYgMjQuNTM4OCAzMC45NTgzIDI1LjgyODkgMjcuOTQzNCAyNy42MzQ5QzIxLjk1MzIgMzkuMjYwMyAyMC4zMjk0IDUwLjU5MjggMjEuMTQxMyA2MS43NjY2QzI0LjY1MTMgNjUuMTY1NCAzMi40MzM2IDY5LjM2OCAzNi42MDcgNzEuMDMwMkMzOS4wNTI2IDcyLjAwMjcgMzkuODAwMSA3Mi40OTM5IDQyLjI1MDYgNzIuOTAwN0M0NC40Mjg5IDczLjUxNiA0NS4wODczIDczLjI3NzggNDYuNzU1NyA3My4xMDQyQzQ5LjMyNTEgNzIuNDE5NSA1MC4zOTQ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jUgNjEuNDg0IDc2LjI0MTcgNTguNzc0OSA3NS40MDAxIDU2LjEyMDNINzUuNDA1MVoiIGZpbGw9IiNGQ0ZDRkMiLz4KPHBhdGggZD0iTTEyLjE5MDggNTYuMzgzNUwxNi42MTY2IDQyLjQzNjFDMTcuMTYxMiA0MC43MjkyIDE4Ljc0MDUgMzkuNTY4MiAyMC41MzI2IDM5LjU2ODJDMjEuMDY3MiAzOS41NjgyIDIxLjU4NyAzOS42NzI0IDIyLjA2NzMgMzkuODY1OUMyMC4wNDc0IDQ2LjU4OSAxOS4yMzU1IDUzLjg0MzEgMTkuODY5MiA2MS43NDcxSDE2LjExMTdDMTMuMzI5NSA2MS43NDcxIDExLjM1NDIgNTkuMDM4IDEyLjE5NTggNTYuMzgzNUgxMi4xOTA4WiIgZmlsbD0iI0ZDRkNGQyIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzg1NV81ODAiIHgxPSI0NCIgeTE9IjAiIHgyPSI0NCIgeTI9Ijg4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRjgxNzAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY1QzQ1Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._network=t,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.salmon?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable&&this._readyState!==rt.Installed)throw new vr;this._connecting=!0;let t;try{t=(await Qo(()=>import("./index-cf21008a.js"),[])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=new t({network:this._network})}catch(i){throw new mg(i?.message,i)}if(!n.connected)try{await n.connect()}catch(i){throw new Zi(i?.message,i)}if(!n.publicKey)throw new Rr;let r;try{r=new _e(n.publicKey.toBytes())}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),this._wallet=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signMessage(t,"utf8")}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const nlt="SKY Wallet";class rlt extends eo{constructor(t={}){super(),this.name=nlt,this.url="https://getsky.app",this.icon="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDY2IDY2IiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxkZWZzPjxpbWFnZSAgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBpZD0iaW1nMSIgaHJlZj0iZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFFQUFBQUJ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2bGRMajFBZmJxVXYrbWVmUG1Tcm1NTzVmNmt3YXNnc0xuUS9qNmxTSzhvWVJHd0JiR2hFdjRuUUpiVmVQR2pWTnJEUFQvQm9KRzJxTFF1cGxpbnpvbitEOEJMbnljTkdtU3Fnc3U5VHdxNWtCSkZ6b1hDRldxOFBwakJjWnMxQXkvc0Q2bzZOOWFhTEt6Wjg5VzNWbitYYVpyMTY1cXNxSlZxMWJTdW5WcnRVOWh5VFJwNHFTeUZWR3lNZXBzZFA2MGMrZk9xWERGS3BHOTlHT2x5QjdBMzBpS0x1ZEY3U05tVG5MOG5udnd0MlIrRVBvcjFDU2RnZXI3QzUzRkdHY0RQNUtwVmVkZjV5ZzRGUStCdjBjdE1nV0ZVVnkxQ1c1VEF0Y1gzZ0Rrd0MxK295SllobGFWSW1qcWRDY0kvRDg4YXpFWWFUcFE0Nm9JYjFORWhLV0lPY0EzREpRTVhGUkdSZU9FMjBnenNKSG1zdnlGeTUzRnZWOUROa2pIOW1xTDdmeXhyS0lQRzYzc05uTUZHcXRMS29TQzBIUXBGRGtGbGFOQlFrVTNZdjNCZVQrVzJSRHlsN3k4dkZOY3h3amNRVVZmYmZrdTYyTzEzRG52TUFSWUFod0F6a0VwUDNPMnhnU08vUVQ4QmVmM0FXOEREd0xwWE1kWWxlLzRmLzRNQmw2a1JRUjRBQUFBQUVsRlRrU3VRbUNDIi8+PC9kZWZzPjxzdHlsZT48L3N0eWxlPjx1c2UgIGhyZWY9IiNpbWcxIiB4PSIxIiB5PSIxIi8+PC9zdmc+",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.skySolana?.isSkyWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.skySolana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o),a.preflightCommitment=a.preflightCommitment||n.commitment;const{signature:s}=await i.signAndSendTransaction(t,a);return s}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}var ilt=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},olt=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},sM;function alt(e){const t=({register:n})=>n(e);try{window.dispatchEvent(new slt(t))}catch(n){console.error(`wallet-standard:register-wallet event could not be dispatched `,n)}try{window.addEventListener("wallet-standard:app-ready",({detail:n})=>t(n))}catch(n){console.error(`wallet-standard:app-ready event listener could not be added -`,n)}}class slt extends Event{constructor(t){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),sM.set(this,void 0),ilt(this,sM,t,"f")}get detail(){return olt(this,sM,"f")}get type(){return"wallet-standard:register-wallet"}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}sM=new WeakMap;const clt="solana:mainnet",ult="solana:devnet",llt="solana:testnet",dlt="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9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TUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=";var cr=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},flt=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},cM,jf,dN,fN,hN,So,gN,Kue,Que,pN,yN,bN,mN,vN;class hlt{constructor(){cM.add(this),jf.set(this,{}),dN.set(this,"1.0.0"),fN.set(this,"MetaMask"),hN.set(this,dlt),So.set(this,null),gN.set(this,(t,n)=>(cr(this,jf,"f")[t]?.push(n)||(cr(this,jf,"f")[t]=[n]),()=>cr(this,cM,"m",Que).call(this,t,n))),pN.set(this,async()=>{if(!cr(this,So,"f")){let t;try{t=(await Qo(()=>import("./index-ba0213e3.js"),["assets/index-ba0213e3.js","assets/v4-84582c03.js"])).default}catch{throw new Error("Unable to load Solflare MetaMask SDK")}flt(this,So,new t,"f"),cr(this,So,"f").on("standard_change",n=>cr(this,cM,"m",Kue).call(this,"change",n))}return this.accounts.length||await cr(this,So,"f").connect(),{accounts:this.accounts}}),yN.set(this,async()=>{cr(this,So,"f")&&await cr(this,So,"f").disconnect()}),bN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignAndSendTransaction(...t)}),mN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignTransaction(...t)}),vN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignMessage(...t)})}get version(){return cr(this,dN,"f")}get name(){return cr(this,fN,"f")}get icon(){return cr(this,hN,"f")}get chains(){return[clt,ult,llt]}get features(){return{[Zet]:{version:"1.0.0",connect:cr(this,pN,"f")},[Xet]:{version:"1.0.0",disconnect:cr(this,yN,"f")},[_et]:{version:"1.0.0",on:cr(this,gN,"f")},[Jet]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:cr(this,bN,"f")},[Wet]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:cr(this,mN,"f")},[Vet]:{version:"1.0.0",signMessage:cr(this,vN,"f")}}}get accounts(){return cr(this,So,"f")?cr(this,So,"f").standardAccounts:[]}}jf=new WeakMap,dN=new WeakMap,fN=new WeakMap,hN=new WeakMap,So=new WeakMap,gN=new WeakMap,pN=new WeakMap,yN=new WeakMap,bN=new WeakMap,mN=new WeakMap,vN=new WeakMap,cM=new WeakSet,Kue=function(t,...n){cr(this,jf,"f")[t]?.forEach(r=>r.apply(null,n))},Que=function(t,n){cr(this,jf,"f")[t]=cr(this,jf,"f")[t]?.filter(r=>n!==r)};let fJ=!1;function glt(){fJ||(alt(new hlt),fJ=!0)}async function plt(){const e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function n(r){const i=r.data;i?.target==="metamask-inpage"&&i.data?.name==="metamask-provider"&&(i.data.data?.id===e?(window.removeEventListener("message",n),i.data.data.error||glt()):t())}window.addEventListener("message",n),window.setTimeout(()=>window.removeEventListener("message",n),5e3),t()}const ylt="Solflare";class blt extends eo{constructor(t={}){super(),this.name=ylt,this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmMxMGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmYjNmMmUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2LjQ3ODM1IiB4Mj0iMzQuOTEwNyIgeGxpbms6aHJlZj0iI2EiIHkxPSI3LjkyIiB5Mj0iMzMuNjU5MyIvPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDQuOTkyMTg4MzIgMTIuMDYzODc5NjMgLTEyLjE4MTEzNjU1IDUuMDQwNzEwNzQgMjIuNTIwMiAyMC42MTgzKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHI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40MjU2Ljk0MDI3LS45NTA2Ljk0MDI3LS41MjUxIDAtLjk1MDctLjQyMDk3LS45NTA3LS45NDAyNyAwLS41MTkyOTcuNDI1Ni0uOTQwMjcuOTUwNy0uOTQwMjd6IiBmaWxsPSJ1cmwoI2IpIi8+PHBhdGggZD0ibTI0LjU3MSAzMi43NzkyYzQuOTU5NiAwIDguOTgwMi0zLjk3NjUgOC45ODAyLTguODgxOSAwLTQuOTA1My00LjAyMDYtOC44ODE5LTguOTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._accountChanged=n=>{if(!n)return;const r=this._publicKey;if(r){try{n=new _e(n.toBytes())}catch(i){this.emit("error",new wr(i?.message,i));return}r.equals(n)||(this._publicKey=n,this.emit("connect",n))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=t,this._readyState!==rt.Unsupported&&(li(()=>window.solflare?.isSolflare||window.SolflareApp?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1),plt())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async autoConnect(){this.readyState===rt.Loadable&&eN()||await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable&&this._readyState!==rt.Installed)throw new vr;if(this.readyState===rt.Loadable&&eN()){const i=encodeURIComponent(window.location.href),o=encodeURIComponent(window.location.origin);window.location.href=`https://solflare.com/ul/v1/browse/${i}?ref=${o}`;return}let t;try{t=(await Qo(()=>import("./index-f1224978.js"),["assets/index-f1224978.js","assets/v4-84582c03.js"])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=new t({network:this._config.network})}catch(i){throw new mg(i?.message,i)}if(this._connecting=!0,!n.connected)try{await n.connect()}catch(i){throw new Zi(i?.message,i)}if(!n.publicKey)throw new Zi;let r;try{r=new _e(n.publicKey.toBytes())}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),n.on("accountChanged",this._accountChanged),this._wallet=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;return up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment,await i.signAndSendTransaction(t,a)}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signMessage(t,"utf8")}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const mlt="Solong";class vlt extends i0{constructor(t={}){super(),this.name=mlt,this.url="https://solongwallet.io",this.icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAGlklEQVR4Ae3bA5DsyhfH8TNr49r2/du2bdu2bdu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PI4xiiE5JcLrd6PxcLwM78SH8EG8Fc/H/UUXVUByGh8SSYBJgEmASYCJJMAkwBi6A3xCqZhiBz8+AAAAAElFTkSuQmCC",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solong?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.currentAccount}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solong;let n;try{n=await t.selectAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const wlt="Spot";class Alt extends eo{constructor(t={}){super(),this.name=wlt,this.url="https://spot-wallet.com",this.icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAVqADAAQAAAABAAAAVgAAAAA6XCzdAAAmhUlEQVR4Aa2dC8xmR3nf57yX79tdr9d3e218JQRwguKAcGMVtw0tqtQgimhap4oUxQ1JS6kaqZIVpVJFBVJviKYlEa6KQgIFkcShTiOD6AVCiG3VsY3bdc1N0GKvCWvA1/Xuer/L+779//7PPOfM++77re0kA/PNzDPPzJn5nec8Z86c86678qcIf2exGP+XY+WG2U65sXTltYtSr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actionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.spotSolWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.spotSolWallet;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Ilt="TokenPocket";class Elt extends eo{constructor(t={}){super(),this.name=Ilt,this.url="https://tokenpocket.pro",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEwMj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zdaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNzA5Ljc4IDY1MC4wNjZWNTA1LjU4MUM3MDguNzMzIDUwNS41ODEgNzA3LjgxNiA1MDUuNTgxIDcwNi43NjggNTA1LjQ1VjY1MC4wNjZDNzA3LjgxNiA2NTAuMDY2IDcwOC44NjQgNjUwLjA2NiA3MDkuNzggNjUwLjA2NloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzQwOF8yMjUiIHgxPSI3MDkuODQ0IiB5MT0iNTU2LjgyNyIgeDI9IjY2Ny43NTMiIHkyPSI1NTYuODI3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIi8+CjxzdG9wIG9mZnNldD0iMC45NjY3IiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjMyMzMiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjMiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF80MDhfMjI1Ij4KPHJlY3Qgd2lkdGg9IjcyOC40NDgiIGhlaWdodD0iNDcwIiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTY4IDI3NykiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solana?.isTokenPocket?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}function Mlt({app:e}){e.use(grt,{wallets:[new Wut,new blt,new gst,new vlt,new lst,new ast,new cst,new fst,new yst,new Xut,new Elt,new Kut,new Gut,new wst,new rlt,new Jut,new $ut,new qut,new Alt,new ist,new Ist,new mst,new tlt],autoConnect:!0})}const Slt=Object.freeze(Object.defineProperty({__proto__:null,install:Mlt},Symbol.toStringTag,{value:"Module"})),que=U2("auth",()=>{const e=gue("password",null),t=te(()=>e.value===String(FY));return{isEnabled:te(()=>String(FY).length>0),isAuthenticated:t,password:e,login:r=>(e.value=r,t.value)}}),Dlt={class:"column"},Clt={class:"row"},Llt=Di({__name:"PasswordProtect",setup(e){const t=que(),n=Te(!1),r=Te("");function i(){t.login(r.value)||(r.value="",n.value=!0)}return(o,a)=>(Ut(),hi(fye,{class:ss(o.$style.layout)},{default:Jt(()=>[mt(wye,null,{default:Jt(()=>[mt(vye,{class:"window-height window-width row justify-center items-center"},{default:Jt(()=>[Lt("div",Dlt,[Lt("div",Clt,[mt(yd,{class:"q-pa-lg shadow-1"},{default:Jt(()=>[mt(Sa,null,{default:Jt(()=>[mt(eye,{class:"q-gutter-md"},{default:Jt(()=>[mt(MO,{modelValue:It(r),"onUpdate:modelValue":a[0]||(a[0]=s=>Mr(r)?r.value=s:null),class:ss(o.$style.input),error:It(n),placeholder:"Secret Code",type:"password",outlined:""},{append:Jt(()=>[mt(_t,{flat:"",rounded:"",onClick:i},{default:Jt(()=>[zs(" GO ")]),_:1})]),_:1},8,["modelValue","class","error"])]),_:1})]),_:1})]),_:1})])])]),_:1})]),_:1})]),_:1},8,["class"]))}}),klt="_input_1r51o_1",Blt="_layout_1r51o_8",Tlt="_logo_1r51o_12",xlt={input:klt,layout:Blt,logo:Tlt},Nlt={$style:xlt},Olt=pl(Llt,[["__cssModules",Nlt]]),Flt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAfhQTFRFAAAAMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT1HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HM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ao0FvCZT9bgBkhggUqUAb96+YwHvq9ZTAAoBcsRqADdu4d8o+4Dzy9lWF26xCWBHgI9C1NLYU0A+xicM+EwkeBEPtuzbkCvhoYH3DuI5ffn6bef7jyTOGwNo7RJRaz3kSX+izTDSThz+1d+emFfil2sXMfYM+wzk8zRmFBhS4xUjU8SH6eA3Og+PsFyZ1tKMnNHxjCU0KTVY9bFNjC65TtnSATAWCAVTEKPrQFMCcLLGnMaQW1y0YWdwPEyrEkR/YBfX1ydDuWeEom8wKGjyWFjBK6fOx79If0xvRFId5Y5OwTD53H+a3O5NEjtJ0vbz2H9NrY6+M2kQMsy/Fto4n0r7XVkWZsIWXmS9xN7hMZMbiWUyfGZdX81sNMJJUvatqOHIdnoGl83k/7szN0Nrkdmt+1XimB6u2Mn80ir6+3O365n1dPQfHYGdG5b3Dr4AAAAASUVORK5CYII=",Ult="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAh9QTFRFAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5JjstAAAALV0Uk5TAC12rs3Qz9HLqW8lCDeQr56BcXKDoYcvBQZhUKusW0hKXoixoEfTkQI9wF+ffScEMIabWpKzO8hsjg0UnHvFK4sLAxcgHxYQWHTGPGttaTV5ggGNSVF3OD9cc1kSAFKj1ClATh2VTyRDGaobRIqocOngYlRLu5cj4v/4/tgYerzSD6WUCm66+/kTKvrMjCEMfomnfLiyf/KttfaPDldmOZhNk2BlGiJCanidvyyAHJpMlj65pD2DnNcAAALXSURBVHicZVL5X1JBEB9BfYoICA8PEJQSIREV8CAVlVNMUARRw6PMzITUssywIk2xtMw8Mks7Lc+szP7Adt8jwY/zw87O9Z3vzizAicQxmPEJiYlEUjIrBc4IO5XD5aXxBQwGX0AKuekZmafjWUJCJM6WkNKcXNm583lyVr5CGRu/UECqCtVFEV9xiUarKy0ricbLK/QXOZWxFVXVBnVN7Ul9Bb8u14hvJrPFaqNw6u1kw6W4SP8CfZ2ICjc6nA6Hs6mZSnG1tHDdFH8h6WnFF29bO0Wd3eGSY33Zp9WYkE4lZByEb5R2dnXTkG6zqocN0HVFd7UXmRxRIeYnvdYd5eju86Lzen+LAc2Pe0ON8e10fMBKKaXoJjoVHcxBYPD8RYhfWxdNmFdHDyNgQARvDQ2rgJkmQa7GdgQw4PSO3L4zetcZQE3uoSkYxzz3IZ5PIgAH5j/+IDgRfDgRfPQYD2IUlQhDTyBBoAMwOylq2iAlGqoJC1E3sCYhkZEDYHFg19RTOmF6BltOG0A4TKCEXAArTgjMPqMTnkvmkBlGCSyUQPBlADbcYr6UeIHjEy8XXuEWiwCvUYskwRJ6dhMbo2Yu4QQfvU9UB8srq5BMvikGaO7Ae3GvvV1/976JmpQXfbv62Q0FjAjz0M9QuszY7RAbN2Wd+GZZQa/sW/N/gBRuDn6WXIUhTBA5TB8/ofNzI6abztJWIaPnS8wnNEnxwms9X0eQysjXVdejXyDeCrjpsNLyTZ4F8H1ZR2xj6opSgx37d1ytU1jPiQ0YX7m7le2jSpRlatJFjbpW5NTrnbIUvHmlZ69/P9KxpKYhTUqtu7vSZlukfIO7e6GD7f+cftQc+oQ/IUbml7emD6xRO475yz7N2Zmhrc3fRwud/v3x2Aq3Jv/wz9Axb8+hN/w9XitXEA1wWky9ofVhT4gVDrNWNvySkW0lnJFB2dHYJEFMrirsc1HvP8BNpzjI3ZGoAAAAAElFTkSuQmCC";const Rlt=Di({__name:"App",setup(e){const{state:t}=KR();NV({title:"Albus",meta:[{name:"description",content:""},{name:"keywords",content:""}],link:[{rel:"icon",type:"image/svg+xml",href:te(()=>t.isDark?Ult:Flt)}]}),gp(()=>{Wrt()});const n=que(),r=te(()=>n.isEnabled&&!n.isAuthenticated),i=Rb(),o=m0e();return nt(i,()=>{(i.name==="index"||i.name==="all"||i.name&&!o.hasRoute(i.name))&&o.push("/swap")},{immediate:!0}),(a,s)=>{const u=Olt,l=Ub("router-view");return It(r)?(Ut(),hi(u,{key:0})):(Ut(),hi(l,{key:1}))}}});async function Plt(){const e=TV(Rlt);Object.values(Object.assign({"./plugins/app.ts":pat,"./plugins/pinia.ts":bat,"./plugins/quasar.ts":nst,"./plugins/wallet.ts":Slt})).forEach(t=>t.install?.({app:e})),e.mount("#app")}Plt().then();export{yd as $,gue as A,xa as B,nt as C,Yst as D,Mee as E,Hft as F,Te as G,eM as H,lZe as I,oZe as J,YT as K,Yft as L,qft as M,nht as N,tht as O,_e as P,Wft as Q,oh as R,En as S,_ct as T,Z4 as U,Di as V,Yrt as W,rue as X,hi as Y,Jt as Z,pl as _,Be as a,Qft as a$,zs as a0,Sa as a1,Lt as a2,It as a3,Hf as a4,Ro as a5,Pft as a6,MO as a7,_t as a8,qz as a9,Cye as aA,zft as aB,iht as aC,iy as aD,ss as aE,Ez as aF,qC as aG,dpe as aH,zh as aI,m0e as aJ,_ce as aK,pW as aL,Fit as aM,ot as aN,Et as aO,Fx as aP,nr as aQ,da as aR,ret as aS,aZ as aT,zlt as aU,Zft as aV,Xft as aW,pet as aX,xn as aY,Vft as aZ,ps as a_,ybe as aa,eht as ab,rht as ac,qi as ad,Wf as ae,jft as af,e4 as ag,Gb as ah,Glt as ai,pn as aj,Ybe as ak,Uft as al,sC as am,$ft as an,_ft as ao,aM as ap,oht as aq,Rft as ar,Mr as as,EZ as at,F1 as au,cW as av,Klt as aw,bd as ax,K5 as ay,OM as az,Ift as b,Jft as b0,Hlt as b1,xft as b2,LR as b3,kR as b4,FZe as b5,ai as b6,st as b7,xr as b8,el as b9,ait as bA,a$e as bB,L0e as bC,W3 as bD,Urt as bE,Jf as bF,ds as bG,Jet as bH,Wet as bI,Vet as bJ,Ug as bK,f2 as ba,HU as bb,Tt as bc,hs as bd,aue as be,oet as bf,Oft as bg,Gft as bh,ob as bi,cZe as bj,S1 as bk,RZe as bl,Fft as bm,aht as bn,Kft as bo,jlt as bp,LT as bq,rZe as br,Nft as bs,O2 as bt,wd as bu,DX as bv,V as bw,Tue as bx,dl as by,Iit as bz,Pa as c,uht as d,eg as e,qst as f,Ob as g,ln as h,Nn as i,mt as j,he as k,cht as l,Qe as m,Dn as n,Ut as o,Rt as p,Gt as q,Ub as r,U2 as s,qrt as t,$p as u,te as v,HR as w,hrt as x,o0 as y,CO as z}; +`,n)}}class slt extends Event{constructor(t){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),sM.set(this,void 0),ilt(this,sM,t,"f")}get detail(){return olt(this,sM,"f")}get type(){return"wallet-standard:register-wallet"}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}sM=new WeakMap;const clt="solana:mainnet",ult="solana:devnet",llt="solana:testnet",dlt="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41I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yNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=";var cr=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},flt=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},cM,jf,dN,fN,hN,So,gN,Kue,Que,pN,yN,bN,mN,vN;class hlt{constructor(){cM.add(this),jf.set(this,{}),dN.set(this,"1.0.0"),fN.set(this,"MetaMask"),hN.set(this,dlt),So.set(this,null),gN.set(this,(t,n)=>(cr(this,jf,"f")[t]?.push(n)||(cr(this,jf,"f")[t]=[n]),()=>cr(this,cM,"m",Que).call(this,t,n))),pN.set(this,async()=>{if(!cr(this,So,"f")){let t;try{t=(await Qo(()=>import("./index-9b7d3fcf.js"),["assets/index-9b7d3fcf.js","assets/v4-0cd80fc6.js"])).default}catch{throw new Error("Unable to load Solflare MetaMask SDK")}flt(this,So,new t,"f"),cr(this,So,"f").on("standard_change",n=>cr(this,cM,"m",Kue).call(this,"change",n))}return this.accounts.length||await cr(this,So,"f").connect(),{accounts:this.accounts}}),yN.set(this,async()=>{cr(this,So,"f")&&await cr(this,So,"f").disconnect()}),bN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignAndSendTransaction(...t)}),mN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignTransaction(...t)}),vN.set(this,async(...t)=>{if(!cr(this,So,"f"))throw new vt;return await cr(this,So,"f").standardSignMessage(...t)})}get version(){return cr(this,dN,"f")}get name(){return cr(this,fN,"f")}get icon(){return cr(this,hN,"f")}get chains(){return[clt,ult,llt]}get features(){return{[Zet]:{version:"1.0.0",connect:cr(this,pN,"f")},[Xet]:{version:"1.0.0",disconnect:cr(this,yN,"f")},[_et]:{version:"1.0.0",on:cr(this,gN,"f")},[Jet]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:cr(this,bN,"f")},[Wet]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:cr(this,mN,"f")},[Vet]:{version:"1.0.0",signMessage:cr(this,vN,"f")}}}get accounts(){return cr(this,So,"f")?cr(this,So,"f").standardAccounts:[]}}jf=new WeakMap,dN=new WeakMap,fN=new WeakMap,hN=new WeakMap,So=new WeakMap,gN=new WeakMap,pN=new WeakMap,yN=new WeakMap,bN=new WeakMap,mN=new WeakMap,vN=new WeakMap,cM=new WeakSet,Kue=function(t,...n){cr(this,jf,"f")[t]?.forEach(r=>r.apply(null,n))},Que=function(t,n){cr(this,jf,"f")[t]=cr(this,jf,"f")[t]?.filter(r=>n!==r)};let fJ=!1;function glt(){fJ||(alt(new hlt),fJ=!0)}async function plt(){const e="solflare-detect-metamask";function t(){window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:{id:e,jsonrpc:"2.0",method:"wallet_getSnaps"}}},window.location.origin)}function n(r){const i=r.data;i?.target==="metamask-inpage"&&i.data?.name==="metamask-provider"&&(i.data.data?.id===e?(window.removeEventListener("message",n),i.data.data.error||glt()):t())}window.addEventListener("message",n),window.setTimeout(()=>window.removeEventListener("message",n),5e3),t()}const ylt="Solflare";class blt extends eo{constructor(t={}){super(),this.name=ylt,this.url="https://solflare.com",this.icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmMxMGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmYjNmMmUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2LjQ3ODM1IiB4Mj0iMzQuOTEwNyIgeGxpbms6aHJlZj0iI2EiIHkxPSI3LjkyIiB5Mj0iMzMuNjU5MyIvPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDQuOTkyMTg4MzIgMTIuMDYzODc5NjMgLTEyLjE4MTEzNjU1IDUuMDQwNzEwNzQgMjIuNTIwMiAyMC42MTgzKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYW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NyAwIC41MTkzLS40MjU2Ljk0MDI3LS45NTA2Ljk0MDI3LS41MjUxIDAtLjk1MDctLjQyMDk3LS45NTA3LS45NDAyNyAwLS41MTkyOTcuNDI1Ni0uOTQwMjcuOTUwNy0uOTQwMjd6IiBmaWxsPSJ1cmwoI2IpIi8+PHBhdGggZD0ibTI0LjU3MSAzMi43NzkyYzQuOTU5NiAwIDguOTgwMi0zLjk3NjUgOC45ODAyLTguODgxOSAwLTQuOTA1My00LjAyMDYtOC44ODE5LTguOTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+",this.supportedTransactionVersions=new Set(["legacy",0]),this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.Loadable,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._accountChanged=n=>{if(!n)return;const r=this._publicKey;if(r){try{n=new _e(n.toBytes())}catch(i){this.emit("error",new wr(i?.message,i));return}r.equals(n)||(this._publicKey=n,this.emit("connect",n))}},this._connecting=!1,this._publicKey=null,this._wallet=null,this._config=t,this._readyState!==rt.Unsupported&&(li(()=>window.solflare?.isSolflare||window.SolflareApp?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1),plt())}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.connected}get readyState(){return this._readyState}async autoConnect(){this.readyState===rt.Loadable&&eN()||await this.connect()}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Loadable&&this._readyState!==rt.Installed)throw new vr;if(this.readyState===rt.Loadable&&eN()){const i=encodeURIComponent(window.location.href),o=encodeURIComponent(window.location.origin);window.location.href=`https://solflare.com/ul/v1/browse/${i}?ref=${o}`;return}let t;try{t=(await Qo(()=>import("./index-87d0b481.js"),["assets/index-87d0b481.js","assets/v4-0cd80fc6.js"])).default}catch(i){throw new zR(i?.message,i)}let n;try{n=new t({network:this._config.network})}catch(i){throw new mg(i?.message,i)}if(this._connecting=!0,!n.connected)try{await n.connect()}catch(i){throw new Zi(i?.message,i)}if(!n.publicKey)throw new Zi;let r;try{r=new _e(n.publicKey.toBytes())}catch(i){throw new wr(i?.message,i)}n.on("disconnect",this._disconnected),n.on("accountChanged",this._accountChanged),this._wallet=n,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),t.off("accountChanged",this._accountChanged),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async sendTransaction(t,n,r={}){try{const i=this._wallet;if(!i)throw new vt;try{const{signers:o,...a}=r;return up(t)?o?.length&&t.sign(o):(t=await this.prepareTransaction(t,n,a),o?.length&&t.partialSign(...o)),a.preflightCommitment=a.preflightCommitment||n.commitment,await i.signAndSendTransaction(t,a)}catch(o){throw o instanceof ti?o:new ia(o?.message,o)}}catch(i){throw this.emit("error",i),i}}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signMessage(t,"utf8")}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const mlt="Solong";class vlt extends i0{constructor(t={}){super(),this.name=mlt,this.url="https://solongwallet.io",this.icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAGlklEQVR4Ae3bA5Dsyhf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/l8wvwGxyG9kEaW/EtPI4xiiE5JcLrd6PxcLwM78SH8EG8Fc/H/UUXVUByGh8SSYBJgEmASYCJJMAkwBi6A3xCqZhiBz8+AAAAAElFTkSuQmCC",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solong?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.currentAccount}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solong;let n;try{n=await t.selectAccount()}catch(i){throw new Rr(i?.message,i)}let r;try{r=new _e(n)}catch(i){throw new wr(i?.message,i)}this._wallet=t,this._publicKey=r,this.emit("connect",r)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){this._wallet&&(this._wallet=null,this._publicKey=null),this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const wlt="Spot";class Alt extends eo{constructor(t={}){super(),this.name=wlt,this.url="https://spot-wallet.com",this.icon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAVqADAAQAAAABAAAAVgAAAAA6XCzdAAAmhUlEQVR4Aa2dC8xmR3nf57yX79tdr9d3e218JQRwguKAcGMVtw0tqtQgimhap4oUxQ1JS6kaqZIVpVJFBVJviKYlEa6KQgIFkcShTiOD6AVCiG3VsY3bdc1N0GKvCWvA1/Xuer/L+779//7PPOfM++77re0kA/PNzDPPzJn5nec8Z86c86678qcIf2exG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ElFTkSuQmCC",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.spotSolWallet?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.spotSolWallet;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;if(t){t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null;try{await t.disconnect()}catch(n){this.emit("error",new Jo(n?.message,n))}}this.emit("disconnect")}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}const Ilt="TokenPocket";class Elt extends eo{constructor(t={}){super(),this.name=Ilt,this.url="https://tokenpocket.pro",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdm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NzcgNzA5Ljc4MSAyNzdaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNzA5Ljc4IDY1MC4wNjZWNTA1LjU4MUM3MDguNzMzIDUwNS41ODEgNzA3LjgxNiA1MDUuNTgxIDcwNi43NjggNTA1LjQ1VjY1MC4wNjZDNzA3LjgxNiA2NTAuMDY2IDcwOC44NjQgNjUwLjA2NiA3MDkuNzggNjUwLjA2NloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzQwOF8yMjUiIHgxPSI3MDkuODQ0IiB5MT0iNTU2LjgyNyIgeDI9IjY2Ny43NTMiIHkyPSI1NTYuODI3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIi8+CjxzdG9wIG9mZnNldD0iMC45NjY3IiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjMyMzMiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjMiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF80MDhfMjI1Ij4KPHJlY3Qgd2lkdGg9IjcyOC40NDgiIGhlaWdodD0iNDcwIiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTY4IDI3NykiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",this.supportedTransactionVersions=null,this._readyState=typeof window>"u"||typeof document>"u"?rt.Unsupported:rt.NotDetected,this._disconnected=()=>{const n=this._wallet;n&&(n.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("error",new go),this.emit("disconnect"))},this._connecting=!1,this._wallet=null,this._publicKey=null,this._readyState!==rt.Unsupported&&li(()=>window.solana?.isTokenPocket?(this._readyState=rt.Installed,this.emit("readyStateChange",this._readyState),!0):!1)}get publicKey(){return this._publicKey}get connecting(){return this._connecting}get connected(){return!!this._wallet?.isConnected}get readyState(){return this._readyState}async connect(){try{if(this.connected||this.connecting)return;if(this._readyState!==rt.Installed)throw new vr;this._connecting=!0;const t=window.solana;try{await t.connect()}catch(r){throw new Zi(r?.message,r)}if(!t.publicKey)throw new Rr;let n;try{n=new _e(t.publicKey.toBytes())}catch(r){throw new wr(r?.message,r)}t.on("disconnect",this._disconnected),this._wallet=t,this._publicKey=n,this.emit("connect",n)}catch(t){throw this.emit("error",t),t}finally{this._connecting=!1}}async disconnect(){const t=this._wallet;t&&(t.off("disconnect",this._disconnected),this._wallet=null,this._publicKey=null,this.emit("disconnect"))}async signTransaction(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signTransaction(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signAllTransactions(t){try{const n=this._wallet;if(!n)throw new vt;try{return await n.signAllTransactions(t)||t}catch(r){throw new jt(r?.message,r)}}catch(n){throw this.emit("error",n),n}}async signMessage(t){try{const n=this._wallet;if(!n)throw new vt;try{const{signature:r}=await n.signMessage(t);return r}catch(r){throw new Xi(r?.message,r)}}catch(n){throw this.emit("error",n),n}}}function Mlt({app:e}){e.use(grt,{wallets:[new Wut,new blt,new gst,new vlt,new lst,new ast,new cst,new fst,new yst,new Xut,new Elt,new Kut,new Gut,new wst,new rlt,new Jut,new $ut,new qut,new Alt,new ist,new Ist,new mst,new tlt],autoConnect:!0})}const Slt=Object.freeze(Object.defineProperty({__proto__:null,install:Mlt},Symbol.toStringTag,{value:"Module"})),que=U2("auth",()=>{const e=gue("password",null),t=te(()=>e.value===String(FY));return{isEnabled:te(()=>String(FY).length>0),isAuthenticated:t,password:e,login:r=>(e.value=r,t.value)}}),Dlt={class:"column"},Clt={class:"row"},Llt=Di({__name:"PasswordProtect",setup(e){const t=que(),n=Te(!1),r=Te("");function i(){t.login(r.value)||(r.value="",n.value=!0)}return(o,a)=>(Ut(),hi(fye,{class:ss(o.$style.layout)},{default:Jt(()=>[mt(wye,null,{default:Jt(()=>[mt(vye,{class:"window-height window-width row justify-center items-center"},{default:Jt(()=>[Lt("div",Dlt,[Lt("div",Clt,[mt(yd,{class:"q-pa-lg shadow-1"},{default:Jt(()=>[mt(Sa,null,{default:Jt(()=>[mt(eye,{class:"q-gutter-md"},{default:Jt(()=>[mt(MO,{modelValue:It(r),"onUpdate:modelValue":a[0]||(a[0]=s=>Mr(r)?r.value=s:null),class:ss(o.$style.input),error:It(n),placeholder:"Secret Code",type:"password",outlined:""},{append:Jt(()=>[mt(_t,{flat:"",rounded:"",onClick:i},{default:Jt(()=>[zs(" GO ")]),_:1})]),_:1},8,["modelValue","class","error"])]),_:1})]),_:1})]),_:1})])])]),_:1})]),_:1})]),_:1},8,["class"]))}}),klt="_input_1r51o_1",Blt="_layout_1r51o_8",Tlt="_logo_1r51o_12",xlt={input:klt,layout:Blt,logo:Tlt},Nlt={$style:xlt},Olt=pl(Llt,[["__cssModules",Nlt]]),Flt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAfhQTFRFAAAAMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT1HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5HMT5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SBMKSedoucDlVAO4PDj0ao0FvCZT9bgBkhggUqUAb96+YwHvq9ZTAAoBcsRqADdu4d8o+4Dzy9lWF26xCWBHgI9C1NLYU0A+xicM+EwkeBEPtuzbkCvhoYH3DuI5ffn6bef7jyTOGwNo7RJRaz3kSX+izTDSThz+1d+emFfil2sXMfYM+wzk8zRmFBhS4xUjU8SH6eA3Og+PsFyZ1tKMnNHxjCU0KTVY9bFNjC65TtnSATAWCAVTEKPrQFMCcLLGnMaQW1y0YWdwPEyrEkR/YBfX1ydDuWeEom8wKGjyWFjBK6fOx79If0xvRFId5Y5OwTD53H+a3O5NEjtJ0vbz2H9NrY6+M2kQMsy/Fto4n0r7XVkWZsIWXmS9xN7hMZMbiWUyfGZdX81sNMJJUvatqOHIdnoGl83k/7szN0Nrkdmt+1XimB6u2Mn80ir6+3O365n1dPQfHYGdG5b3Dr4AAAAASUVORK5CYII=",Ult="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAh9QTFRFAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5JjstAAAALV0Uk5TAC12rs3Qz9HLqW8lCDeQr56BcXKDoYcvBQZhUKusW0hKXoixoEfTkQI9wF+ffScEMIabWpKzO8hsjg0UnHvFK4sLAxcgHxYQWHTGPGttaTV5ggGNSVF3OD9cc1kSAFKj1ClATh2VTyRDGaobRIqocOngYlRLu5cj4v/4/tgYerzSD6WUCm66+/kTKvrMjCEMfomnfLiyf/KttfaPDldmOZhNk2BlGiJCanidvyyAHJpMlj65pD2DnNcAAALXSURBVHicZVL5X1JBEB9BfYoICA8PEJQSIREV8CAVlVNMUARRw6PMzITUssywIk2xtMw8Mks7Lc+szP7Adt8jwY/zw87O9Z3vzizAicQxmPEJiYlEUjIrBc4IO5XD5aXxBQwGX0AKuekZmafjWUJCJM6WkNKcXNm583lyVr5CGRu/UECqCtVFEV9xiUarKy0ricbLK/QXOZWxFVXVBnVN7Ul9Bb8u14hvJrPFaqNw6u1kw6W4SP8CfZ2ICjc6nA6Hs6mZSnG1tHDdFH8h6WnFF29bO0Wd3eGSY33Zp9WYkE4lZByEb5R2dnXTkG6zqocN0HVFd7UXmRxRIeYnvdYd5eju86Lzen+LAc2Pe0ON8e10fMBKKaXoJjoVHcxBYPD8RYhfWxdNmFdHDyNgQARvDQ2rgJkmQa7GdgQw4PSO3L4zetcZQE3uoSkYxzz3IZ5PIgAH5j/+IDgRfDgRfPQYD2IUlQhDTyBBoAMwOylq2iAlGqoJC1E3sCYhkZEDYHFg19RTOmF6BltOG0A4TKCEXAArTgjMPqMTnkvmkBlGCSyUQPBlADbcYr6UeIHjEy8XXuEWiwCvUYskwRJ6dhMbo2Yu4QQfvU9UB8srq5BMvikGaO7Ae3GvvV1/976JmpQXfbv62Q0FjAjz0M9QuszY7RAbN2Wd+GZZQa/sW/N/gBRuDn6WXIUhTBA5TB8/ofNzI6abztJWIaPnS8wnNEnxwms9X0eQysjXVdejXyDeCrjpsNLyTZ4F8H1ZR2xj6opSgx37d1ytU1jPiQ0YX7m7le2jSpRlatJFjbpW5NTrnbIUvHmlZ69/P9KxpKYhTUqtu7vSZlukfIO7e6GD7f+cftQc+oQ/IUbml7emD6xRO475yz7N2Zmhrc3fRwud/v3x2Aq3Jv/wz9Axb8+hN/w9XitXEA1wWky9ofVhT4gVDrNWNvySkW0lnJFB2dHYJEFMrirsc1HvP8BNpzjI3ZGoAAAAAElFTkSuQmCC";const Rlt=Di({__name:"App",setup(e){const{state:t}=KR();NV({title:"Albus",meta:[{name:"description",content:""},{name:"keywords",content:""}],link:[{rel:"icon",type:"image/svg+xml",href:te(()=>t.isDark?Ult:Flt)}]}),gp(()=>{Wrt()});const n=que(),r=te(()=>n.isEnabled&&!n.isAuthenticated),i=Rb(),o=m0e();return nt(i,()=>{(i.name==="index"||i.name==="all"||i.name&&!o.hasRoute(i.name))&&o.push("/swap")},{immediate:!0}),(a,s)=>{const u=Olt,l=Ub("router-view");return It(r)?(Ut(),hi(u,{key:0})):(Ut(),hi(l,{key:1}))}}});async function Plt(){const e=TV(Rlt);Object.values(Object.assign({"./plugins/app.ts":pat,"./plugins/pinia.ts":bat,"./plugins/quasar.ts":nst,"./plugins/wallet.ts":Slt})).forEach(t=>t.install?.({app:e})),e.mount("#app")}Plt().then();export{yd as $,gue as A,xa as B,nt as C,Yst as D,Mee as E,Hft as F,Te as G,eM as H,lZe as I,oZe as J,YT as K,Yft as L,qft as M,nht as N,tht as O,_e as P,Wft as Q,oh as R,En as S,_ct as T,Z4 as U,Di as V,Yrt as W,rue as X,hi as Y,Jt as Z,pl as _,Be as a,Qft as a$,zs as a0,Sa as a1,Lt as a2,It as a3,Hf as a4,Ro as a5,Pft as a6,MO as a7,_t as a8,qz as a9,Cye as aA,zft as aB,iht as aC,iy as aD,ss as aE,Ez as aF,qC as aG,dpe as aH,zh as aI,m0e as aJ,_ce as aK,pW as aL,Fit as aM,ot as aN,Et as aO,Fx as aP,nr as aQ,da as aR,ret as aS,aZ as aT,zlt as aU,Zft as aV,Xft as aW,pet as aX,xn as aY,Vft as aZ,ps as a_,ybe as aa,eht as ab,rht as ac,qi as ad,Wf as ae,jft as af,e4 as ag,Gb as ah,Glt as ai,pn as aj,Ybe as ak,Uft as al,sC as am,$ft as an,_ft as ao,aM as ap,oht as aq,Rft as ar,Mr as as,EZ as at,F1 as au,cW as av,Klt as aw,bd as ax,K5 as ay,OM as az,Ift as b,Jft as b0,Hlt as b1,xft as b2,LR as b3,kR as b4,FZe as b5,ai as b6,st as b7,xr as b8,el as b9,ait as bA,a$e as bB,L0e as bC,W3 as bD,Urt as bE,Jf as bF,ds as bG,Jet as bH,Wet as bI,Vet as bJ,Ug as bK,f2 as ba,HU as bb,Tt as bc,hs as bd,aue as be,oet as bf,Oft as bg,Gft as bh,ob as bi,cZe as bj,S1 as bk,RZe as bl,Fft as bm,aht as bn,Kft as bo,jlt as bp,LT as bq,rZe as br,Nft as bs,O2 as bt,wd as bu,DX as bv,V as bw,Tue as bx,dl as by,Iit as bz,Pa as c,uht as d,eg as e,qst as f,Ob as g,ln as h,Nn as i,mt as j,he as k,cht as l,Qe as m,Dn as n,Ut as o,Rt as p,Gt as q,Ub as r,U2 as s,qrt as t,$p as u,te as v,HR as w,hrt as x,o0 as y,CO as z}; diff --git a/assets/index-12a77bbd.js b/assets/index-6f941dc9.js similarity index 84% rename from assets/index-12a77bbd.js rename to assets/index-6f941dc9.js index 0437986..1f0a289 100644 --- a/assets/index-12a77bbd.js +++ b/assets/index-6f941dc9.js @@ -1 +1 @@ -import{P as U,bm as y,J as h,b3 as B,b4 as G,aY as N,b5 as w,bq as D,br as M,bs as C,aR as R,bt as L,aN as j,aO as x,b9 as V,a as I,aP as W,aQ as K,bu as S,bv as F,bw as p}from"./index-d1afe763.js";import{a as X}from"./internal-c2cc419b.js";function Y(e,n){return e instanceof U?[e,n]:[e.publicKey,[e]]}async function ue(e,n,_,o,a=!1,i,c,s=R,E=L){const T=y(_,o,a,s,E);let t;try{t=await h(e,T,i,s)}catch(f){if(f instanceof B||f instanceof G){try{const v=new N().add(w(n.publicKey,T,o,_,s,E));await D(e,v,[n],c)}catch{}t=await h(e,T,i,s)}else throw f}if(!t.mint.equals(_))throw new M;if(!t.owner.equals(o))throw new C;return t}const A=j([x("instruction"),V("amount")]);function J(e,n,_,o,a=[],i=R){const c=X([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0}],_,a),s=I.Buffer.alloc(A.span);return A.encode({instruction:W.MintTo,amount:BigInt(o)},s),new K({keys:c,programId:i,data:s})}async function le(e,n,_,o,a,i,c=[],s,E=R){const[T,t]=Y(a,c),f=new N().add(J(_,o,T,i,c,E));return await D(e,f,[n,...t],s)}var r={},u={};Object.defineProperty(u,"__esModule",{value:!0});u.decode=u.encode=void 0;const k=I;function $(e){return e.reduce((n,_)=>n+_.toString(16).padStart(2,"0"),"0x")}u.encode=$;function q(e){e.indexOf("0x")===0&&(e=e.substr(2)),e.length%2===1&&(e="0"+e);let n=e.match(/.{2}/g);return n===null?k.Buffer.from([]):k.Buffer.from(n.map(_=>parseInt(_,16)))}u.decode=q;var l={},d={},g;Object.defineProperty(d,"__esModule",{value:!0});d.isVersionedTransaction=d.chunks=d.isBrowser=void 0;d.isBrowser={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_3334576d-7c3b-49cb-a650-7380b8273f28",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"575",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:17508",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7847167159",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_e09c66cd-613f-4f24-ae52-5ef723114a95",INVOCATION_ID:"870cc1da952f4cd7aa3a5842cb7767c0",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"137",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 44",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"b7b8f7b3ca7f438e8f84ec3c06800d5f8b7677c4",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_3334576d-7c3b-49cb-a650-7380b8273f28",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_3334576d-7c3b-49cb-a650-7380b8273f28",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_3334576d-7c3b-49cb-a650-7380b8273f28",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.ANCHOR_BROWSER||typeof window<"u"&&!(!((g=window.process)===null||g===void 0)&&g.hasOwnProperty("type"));function z(e,n){return Array.apply(0,new Array(Math.ceil(e.length/n))).map((_,o)=>e.slice(o*n,(o+1)*n))}d.chunks=z;const Q=e=>"version"in e;d.isVersionedTransaction=Q;Object.defineProperty(l,"__esModule",{value:!0});l.encode=l.decode=void 0;const H=d;function Z(e){return(H.isBrowser?new TextDecoder("utf-8"):new S.TextDecoder("utf-8")).decode(e)}l.decode=Z;function ee(e){return(H.isBrowser?new TextEncoder:new S.TextEncoder("utf-8")).encode(e)}l.encode=ee;var m={},ne=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});m.decode=m.encode=void 0;const P=ne(F);function _e(e){return P.default.encode(e)}m.encode=_e;function oe(e){return P.default.decode(e)}m.decode=oe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.decode=b.encode=void 0;const ae=I;function se(e){return e.toString("base64")}b.encode=se;function re(e){return ae.Buffer.from(e,"base64")}b.decode=re;var de=p&&p.__createBinding||(Object.create?function(e,n,_,o){o===void 0&&(o=_);var a=Object.getOwnPropertyDescriptor(n,_);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[_]}}),Object.defineProperty(e,o,a)}:function(e,n,_,o){o===void 0&&(o=_),e[o]=n[_]}),pe=p&&p.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),O=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var _ in e)_!=="default"&&Object.prototype.hasOwnProperty.call(e,_)&&de(n,e,_);return pe(n,e),n};Object.defineProperty(r,"__esModule",{value:!0});r.base64=te=r.bs58=r.utf8=r.hex=void 0;r.hex=O(u);r.utf8=O(l);var te=r.bs58=O(m);r.base64=O(b);export{te as b,ue as g,le as m}; +import{P as U,bm as y,J as h,b3 as B,b4 as G,aY as N,b5 as w,bq as D,br as M,bs as C,aR as R,bt as L,aN as j,aO as x,b9 as V,a as I,aP as W,aQ as K,bu as S,bv as F,bw as p}from"./index-3e319056.js";import{a as X}from"./internal-446163cd.js";function Y(e,n){return e instanceof U?[e,n]:[e.publicKey,[e]]}async function ce(e,n,_,o,a=!1,i,u,s=R,E=L){const f=y(_,o,a,s,E);let t;try{t=await h(e,f,i,s)}catch(T){if(T instanceof B||T instanceof G){try{const v=new N().add(w(n.publicKey,f,o,_,s,E));await D(e,v,[n],u)}catch{}t=await h(e,f,i,s)}else throw T}if(!t.mint.equals(_))throw new M;if(!t.owner.equals(o))throw new C;return t}const A=j([x("instruction"),V("amount")]);function J(e,n,_,o,a=[],i=R){const u=X([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0}],_,a),s=I.Buffer.alloc(A.span);return A.encode({instruction:W.MintTo,amount:BigInt(o)},s),new K({keys:u,programId:i,data:s})}async function le(e,n,_,o,a,i,u=[],s,E=R){const[f,t]=Y(a,u),T=new N().add(J(_,o,f,i,u,E));return await D(e,T,[n,...t],s)}var r={},c={};Object.defineProperty(c,"__esModule",{value:!0});c.decode=c.encode=void 0;const k=I;function $(e){return e.reduce((n,_)=>n+_.toString(16).padStart(2,"0"),"0x")}c.encode=$;function q(e){e.indexOf("0x")===0&&(e=e.substr(2)),e.length%2===1&&(e="0"+e);let n=e.match(/.{2}/g);return n===null?k.Buffer.from([]):k.Buffer.from(n.map(_=>parseInt(_,16)))}c.decode=q;var l={},d={},g;Object.defineProperty(d,"__esModule",{value:!0});d.isVersionedTransaction=d.chunks=d.isBrowser=void 0;d.isBrowser={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_dependencies_decimal_js:"^10.4.3",npm_package_devDependencies__types_node:"^20.2.5",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",npm_package_dependencies__albus_finance_transfer_sdk:"0.2.4",npm_package_dependencies_pinia:"^2.1.3",USER:"runner",npm_package_devDependencies__esbuild_plugins_node_globals_polyfill:"^0.2.3",npm_config_user_agent:"pnpm/8.11.0 npm/? node/v16.20.2 linux x64",CI:"true",npm_package_dependencies__rollup_plugin_inject:"^5.0.3",npm_package_dependencies_vue:"^3.3.4",npm_package_devDependencies_buffer:"^6.0.3",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_1d4db09f-4aa7-435d-bb39-e5e6762a8460",URL:"dev.defi.albus.finance",PIPX_HOME:"/opt/pipx",npm_package_dependencies__albus_finance_swap_sdk:"0.1.5-next.4",npm_package_devDependencies_vite:"^4.3.9",npm_node_execpath:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_package_packageManager:"pnpm@8.11.0",HOME:"/home/runner",npm_package_devDependencies__vueuse_head:"^1.1.26",npm_package_devDependencies_sass:"1.33.0",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"mfactory-lab",npm_config_auto_install_peers:"",GRADLE_HOME:"/usr/share/gradle-8.6",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/26.1.10909125",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",npm_package_dependencies__metaplex_foundation_mpl_token_metadata:"^2.12.0",GITHUB_REPOSITORY_OWNER_ID:"29000324",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu22",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_package_scripts_lint_fix:"eslint . --fix",npm_package_dependencies__metaplex_foundation_beet:"^0.7.1",npm_package_dependencies__metaplex_foundation_js:"^0.19.4",npm_package_dependencies__solana_web3_js:"^1.77.3",npm_package_devDependencies_bn_js:"^5.2.1",npm_package_devDependencies_util:"^0.12.5",SYSTEMD_EXEC_PID:"578",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",npm_package_dependencies__albus_finance_sdk:"0.2.6",npm_package_devDependencies_rollup_plugin_node_polyfills:"^0.2.1",npm_package_devDependencies_typescript:"^5.0.4",npm_package_devDependencies_vite_plugin_pages:"^0.30.1",GOROOT_1_20_X64:"/opt/hostedtoolcache/go/1.20.13/x64",NVM_DIR:"/home/runner/.nvm",npm_package_scripts_build_dev:"vite build --mode dev",npm_package_devDependencies_vue_tsc:"^1.6.5",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.6/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20240204.1.0",npm_package_scripts_dev:"vite --port 3333",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",SWIFT_PATH:"/usr/share/swift/usr/bin",npm_package_dependencies__solana_buffer_layout_utils:"^0.2.0",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",JOURNAL_STREAM:"8:18092",GITHUB_WORKFLOW:"Deploy Dev",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",npm_package_private:"true",npm_package_dependencies_node_stdlib_browser:"^1.2.0",npm_package_scripts_lint:"eslint .",npm_package_devDependencies__quasar_extras:"^1.16.8",npm_package_devDependencies__types_lodash_es:"^4.17.7",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"7849927334",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_BASE_REF:"",ImageOS:"ubuntu22",npm_package_devDependencies__vitejs_plugin_vue:"^4.2.3",STATS_BLT:"true",GITHUB_WORKFLOW_REF:"mfactory-lab/albus-defi/.github/workflows/deploy.yaml@refs/heads/dev",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_package_dependencies_axios:"^1.4.0",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/dist/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin:/home/runner/setup-pnpm/node_modules/.bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_58d5f83b-82a7-4eff-9d84-839f50a3ac8b",INVOCATION_ID:"30c0ad036eaa4fc2a47f749197fb9e42",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",GOROOT_1_19_X64:"/opt/hostedtoolcache/go/1.19.13/x64",npm_package_name:"albus-defi",NODE:"/opt/hostedtoolcache/node/16.20.2/x64/bin/node",GITHUB_ACTION:"__run",GITHUB_RUN_NUMBER:"138",GITHUB_TRIGGERING_ACTOR:"harniy",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",npm_package_dependencies__solana_buffer_layout:"^4.0.1",npm_package_devDependencies_quasar:"^2.14.0",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",npm_package_devDependencies__types_bn_js:"^5.1.1",npm_package_devDependencies_eslint:"^8.41.0",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 26",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"dev",GITHUB_REPOSITORY:"mfactory-lab/albus-defi",npm_lifecycle_script:"vite build --mode dev",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",npm_package_devDependencies__metaplex_foundation_solita:"^0.20.1",GITHUB_REPOSITORY_ID:"650103343",GITHUB_ACTIONS:"true",STATS_NM:"true",NODE_PATH:"/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/bin/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules/vite/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/vite@4.4.11_@types+node@20.8.6_sass@1.33.0/node_modules:/home/runner/work/albus-defi/albus-defi/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules:/home/runner/node_modules:/home/node_modules:/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/pnpm/node_modules",npm_package_version:"0.3.3",npm_package_dependencies__solana_spl_token:"^0.3.8",npm_package_dependencies__solana_wallet_adapter_wallets:"^0.19.23",npm_package_devDependencies_assert:"^2.0.0",npm_lifecycle_event:"build:dev",GITHUB_REF_PROTECTED:"false",npm_package_scripts_build:"vite build --mode prod",npm_package_dependencies_lodash_es:"^4.17.21",npm_package_devDependencies_crypto_browserify:"^3.12.0",npm_package_devDependencies_unplugin_auto_import:"^0.16.4",npm_package_devDependencies_unplugin_icons:"^0.16.1",npm_config_strict_peer_dependencies:"",GITHUB_WORKSPACE:"/home/runner/work/albus-defi/albus-defi",ACCEPT_EULA:"Y",GITHUB_JOB:"deploy",RUNNER_PERFLOG:"/home/runner/perflog",npm_package_devDependencies__vueuse_core:"^10.1.2",GITHUB_SHA:"39399f2e3c2e9d223655a2f28bf4a18032797edc",GITHUB_RUN_ATTEMPT:"1",npm_package_dependencies__project_serum_anchor:"^0.26.0",npm_package_dependencies_vue_router:"^4.2.2",GITHUB_REF:"refs/heads/dev",GITHUB_ACTOR:"harniy",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_package_scripts_build_stage:"vite build --mode stage",npm_package_scripts_typecheck:"vue-tsc --noEmit",npm_config__mfactory_lab_registry:"https://npm.pkg.github.com",LEIN_HOME:"/usr/local/lib/lein",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_1d4db09f-4aa7-435d-bb39-e5e6762a8460",JAVA_HOME:"/usr/lib/jvm/temurin-11-jdk-amd64",PWD:"/home/runner/work/albus-defi/albus-defi",GITHUB_ACTOR_ID:"67821416",RUNNER_WORKSPACE:"/home/runner/work/albus-defi",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@8.11.0/node_modules/pnpm/bin/pnpm.cjs",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",STATS_TIS:"mining",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",LEIN_JAR:"/usr/local/lib/lein/self-installs/leiningen-2.11.1-standalone.jar",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_1d4db09f-4aa7-435d-bb39-e5e6762a8460",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_package_dependencies_mitt:"^3.0.0",npm_package_dependencies_solana_wallets_vue:"^0.6.0",npm_command:"run-script",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/albus-defi/albus-defi",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/25.2.9519653",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",npm_package_scripts_preview:"vite preview",npm_package_dependencies__coral_xyz_anchor:"^0.29.0",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",STATS_EXTP:"https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.154/provjobd.data",npm_package_devDependencies__quasar_vite_plugin:"^1.6.0",npm_package_devDependencies_vite_plugin_vue_layouts:"^0.8.0",npm_config_shamefully_hoist:"true",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/25.2.9519653",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_1d4db09f-4aa7-435d-bb39-e5e6762a8460",npm_package_devDependencies__antfu_eslint_config:"^0.39.4",npm_package_devDependencies_unplugin_vue_components:"^0.25.0",INIT_CWD:"/home/runner/work/albus-defi/albus-defi",NODE_ENV:"production",VITE_APP_TITLE:"Albus",VITE_APP_DESCRIPTION:"",VITE_APP_KEYWORDS:"",VITE_PASSWORD_PROTECT:"345719",VITE_ALBUS_APP_URL:"https://dev.app.albus.finance"}.ANCHOR_BROWSER||typeof window<"u"&&!(!((g=window.process)===null||g===void 0)&&g.hasOwnProperty("type"));function z(e,n){return Array.apply(0,new Array(Math.ceil(e.length/n))).map((_,o)=>e.slice(o*n,(o+1)*n))}d.chunks=z;const Q=e=>"version"in e;d.isVersionedTransaction=Q;Object.defineProperty(l,"__esModule",{value:!0});l.encode=l.decode=void 0;const H=d;function Z(e){return(H.isBrowser?new TextDecoder("utf-8"):new S.TextDecoder("utf-8")).decode(e)}l.decode=Z;function ee(e){return(H.isBrowser?new TextEncoder:new S.TextEncoder("utf-8")).encode(e)}l.encode=ee;var m={},ne=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(m,"__esModule",{value:!0});m.decode=m.encode=void 0;const P=ne(F);function _e(e){return P.default.encode(e)}m.encode=_e;function oe(e){return P.default.decode(e)}m.decode=oe;var b={};Object.defineProperty(b,"__esModule",{value:!0});b.decode=b.encode=void 0;const ae=I;function se(e){return e.toString("base64")}b.encode=se;function re(e){return ae.Buffer.from(e,"base64")}b.decode=re;var de=p&&p.__createBinding||(Object.create?function(e,n,_,o){o===void 0&&(o=_);var a=Object.getOwnPropertyDescriptor(n,_);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[_]}}),Object.defineProperty(e,o,a)}:function(e,n,_,o){o===void 0&&(o=_),e[o]=n[_]}),pe=p&&p.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),O=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var _ in e)_!=="default"&&Object.prototype.hasOwnProperty.call(e,_)&&de(n,e,_);return pe(n,e),n};Object.defineProperty(r,"__esModule",{value:!0});r.base64=te=r.bs58=r.utf8=r.hex=void 0;r.hex=O(c);r.utf8=O(l);var te=r.bs58=O(m);r.base64=O(b);export{te as b,ce as g,le as m}; diff --git a/assets/index-f1224978.js b/assets/index-87d0b481.js similarity index 99% rename from assets/index-f1224978.js rename to assets/index-87d0b481.js index c4c5278..eef8a41 100644 --- a/assets/index-f1224978.js +++ b/assets/index-87d0b481.js @@ -1,3 +1,3 @@ -import{P as T,b as d,a as S}from"./index-d1afe763.js";import{E as A,v as M}from"./v4-84582c03.js";var O=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),P=function(c){O(a,c);function a(){return c!==null&&c.apply(this,arguments)||this}return a}(A),K=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),x=globalThis&&globalThis.__assign||function(){return x=Object.assign||function(c){for(var a,r=1,t=arguments.length;r0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0)&&!(n=t.next()).done;)e.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(o)throw o.error}}return e},R=function(c){K(a,c);function a(r,t){var n=c.call(this)||this;if(n._handleMessage=function(e){if(n._injectedProvider&&e.source===window||e.origin===n._providerUrl.origin&&e.source===n._popup){if(e.data.method==="connected"){var o=new T(e.data.params.publicKey);(!n._publicKey||!n._publicKey.equals(o))&&(n._publicKey&&!n._publicKey.equals(o)&&n._handleDisconnect(),n._publicKey=o,n._autoApprove=!!e.data.params.autoApprove,n.emit("connect",n._publicKey))}else if(e.data.method==="disconnected")n._handleDisconnect();else if((e.data.result||e.data.error)&&n._responsePromises.has(e.data.id)){var s=E(n._responsePromises.get(e.data.id),2),u=s[0],i=s[1];e.data.result?u(e.data.result):i(new Error(e.data.error))}}},n._handleConnect=function(){return n._handlerAdded||(n._handlerAdded=!0,window.addEventListener("message",n._handleMessage),window.addEventListener("beforeunload",n.disconnect)),n._injectedProvider?new Promise(function(e){n._sendRequest("connect",{}),e()}):(window.name="parent",n._popup=window.open(n._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(function(e){n.once("connect",e)}))},n._handleDisconnect=function(){n._handlerAdded&&(n._handlerAdded=!1,window.removeEventListener("message",n._handleMessage),window.removeEventListener("beforeunload",n.disconnect)),n._publicKey&&(n._publicKey=null,n.emit("disconnect")),n._responsePromises.forEach(function(e,o){var s=E(e,2);s[0];var u=s[1];n._responsePromises.delete(o),u("Wallet disconnected")})},n._sendRequest=function(e,o){return m(n,void 0,void 0,function(){var s,u=this;return w(this,function(i){if(e!=="connect"&&!this.connected)throw new Error("Wallet not connected");return s=this._nextRequestId,++this._nextRequestId,[2,new Promise(function(l,f){u._responsePromises.set(s,[l,f]),u._injectedProvider?u._injectedProvider.postMessage({jsonrpc:"2.0",id:s,method:e,params:x({network:u._network},o)}):(u._popup.postMessage({jsonrpc:"2.0",id:s,method:e,params:o},u._providerUrl.origin),u.autoApprove||u._popup.focus())})]})})},n.connect=function(){return n._popup&&n._popup.close(),n._handleConnect()},n.disconnect=function(){return m(n,void 0,void 0,function(){return w(this,function(e){switch(e.label){case 0:return this._injectedProvider?[4,this._sendRequest("disconnect",{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return this._popup&&this._popup.close(),this._handleDisconnect(),[2]}})})},n.sign=function(e,o){return m(n,void 0,void 0,function(){var s,u,i;return w(this,function(l){switch(l.label){case 0:if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._sendRequest("sign",{data:e,display:o})];case 1:return s=l.sent(),u=d.decode(s.signature),i=new T(s.publicKey),[2,{signature:u,publicKey:i}]}})})},n.signTransaction=function(e){return m(n,void 0,void 0,function(){var o,s,u;return w(this,function(i){switch(i.label){case 0:return[4,this._sendRequest("signTransaction",{message:d.encode(e.serializeMessage())})];case 1:return o=i.sent(),s=d.decode(o.signature),u=new T(o.publicKey),e.addSignature(u,s),[2,e]}})})},n.signAllTransactions=function(e){return m(n,void 0,void 0,function(){var o,s,u;return w(this,function(i){switch(i.label){case 0:return[4,this._sendRequest("signAllTransactions",{messages:e.map(function(l){return d.encode(l.serializeMessage())})})];case 1:return o=i.sent(),s=o.signatures.map(function(l){return d.decode(l)}),u=new T(o.publicKey),e=e.map(function(l,f){return l.addSignature(u,s[f]),l}),[2,e]}})})},W(r))n._injectedProvider=r;else if(k(r))n._providerUrl=new URL(r),n._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:t}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.");return n._network=t,n._publicKey=null,n._autoApprove=!1,n._popup=null,n._handlerAdded=!1,n._nextRequestId=1,n._responsePromises=new Map,n}return Object.defineProperty(a.prototype,"publicKey",{get:function(){return this._publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"connected",{get:function(){return this._publicKey!==null},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"autoApprove",{get:function(){return this._autoApprove},enumerable:!1,configurable:!0}),a}(A);function k(c){return typeof c=="string"}function W(c){return q(c)&&H(c.postMessage)}function q(c){return typeof c=="object"&&c!==null}function H(c){return typeof c=="function"}var C=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),_=globalThis&&globalThis.__awaiter||function(c,a,r,t){function n(e){return e instanceof r?e:new r(function(o){o(e)})}return new(r||(r=Promise))(function(e,o){function s(l){try{i(t.next(l))}catch(f){o(f)}}function u(l){try{i(t.throw(l))}catch(f){o(f)}}function i(l){l.done?e(l.value):n(l.value).then(s,u)}i((t=t.apply(c,a||[])).next())})},v=globalThis&&globalThis.__generator||function(c,a){var r={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},t,n,e,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(i){return function(l){return u([i,l])}}function u(i){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(r=0)),r;)try{if(t=1,n&&(e=i[0]&2?n.return:i[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,i[1])).done)return e;switch(n=0,e&&(i=[i[0]&2,e.value]),i[0]){case 0:case 1:e=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(e=r.trys,!(e=e.length>0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]=c.length&&(c=void 0),{value:c&&c[t++],done:!c}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},G=function(c){F(a,c);function a(r){var t=c.call(this)||this;return t._network="mainnet-beta",t._provider=null,t._adapterInstance=null,t._element=null,t._iframe=null,t._connectHandler=null,t._flutterHandlerInterval=null,t._handleEvent=function(n){var e,o,s,u;switch(n.type){case"connect_native_web":{t._collapseIframe(),t._adapterInstance=new U(t._iframe,t._network,((e=n.data)===null||e===void 0?void 0:e.provider)||t._provider||"https://solflare.com/provider"),t._adapterInstance.on("connect",t._webConnected),t._adapterInstance.on("disconnect",t._webDisconnected),t._adapterInstance.connect(),t._setPreferredAdapter("native_web");return}case"connect":{t._collapseIframe(),t._adapterInstance=new j(t._iframe,((o=n.data)===null||o===void 0?void 0:o.publicKey)||""),t._adapterInstance.connect(),t._setPreferredAdapter((s=n.data)===null||s===void 0?void 0:s.adapter),t._connectHandler&&(t._connectHandler.resolve(),t._connectHandler=null),t.emit("connect",t.publicKey);return}case"disconnect":{t._connectHandler&&(t._connectHandler.reject(),t._connectHandler=null),t._disconnected(),t.emit("disconnect");return}case"accountChanged":{!((u=n.data)===null||u===void 0)&&u.publicKey?(t._adapterInstance=new j(t._iframe,n.data.publicKey),t._adapterInstance.connect(),t.emit("accountChanged",t.publicKey)):t.emit("accountChanged",void 0);return}case"collapse":{t._collapseIframe();return}default:return}},t._handleResize=function(n){n.resizeMode==="full"?n.params.mode==="fullscreen"?t._expandIframe():n.params.mode==="hide"&&t._collapseIframe():n.resizeMode==="coordinates"&&t._iframe&&(t._iframe.style.top=isFinite(n.params.top)?"".concat(n.params.top,"px"):"",t._iframe.style.bottom=isFinite(n.params.bottom)?"".concat(n.params.bottom,"px"):"",t._iframe.style.left=isFinite(n.params.left)?"".concat(n.params.left,"px"):"",t._iframe.style.right=isFinite(n.params.right)?"".concat(n.params.right,"px"):"",t._iframe.style.width=isFinite(n.params.width)?"".concat(n.params.width,"px"):n.params.width,t._iframe.style.height=isFinite(n.params.height)?"".concat(n.params.height,"px"):n.params.height)},t._handleMessage=function(n){var e;if(((e=n.data)===null||e===void 0?void 0:e.channel)==="solflareIframeToWalletAdapter"){var o=n.data.data||{};o.type==="event"?t._handleEvent(o.event):o.type==="resize"?t._handleResize(o):o.type==="response"&&t._adapterInstance&&t._adapterInstance.handleMessage(o)}},t._removeElement=function(){t._flutterHandlerInterval!==null&&(clearInterval(t._flutterHandlerInterval),t._flutterHandlerInterval=null),t._element&&(t._element.remove(),t._element=null)},t._removeDanglingElements=function(){var n,e,o=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var s=L(o),u=s.next();!u.done;u=s.next()){var i=u.value;i.parentElement&&i.remove()}}catch(l){n={error:l}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(n)throw n.error}}},t._injectElement=function(){t._removeElement(),t._removeDanglingElements();var n="".concat(a.IFRAME_URL,"?cluster=").concat(encodeURIComponent(t._network),"&origin=").concat(encodeURIComponent(window.location.origin),"&version=1"),e=t._getPreferredAdapter();e&&(n+="&adapter=".concat(encodeURIComponent(e))),t._provider&&(n+="&provider=".concat(encodeURIComponent(t._provider))),t._element=document.createElement("div"),t._element.className="solflare-wallet-adapter-iframe",t._element.innerHTML=` +import{P as T,b as d,a as S}from"./index-3e319056.js";import{E as A,v as M}from"./v4-0cd80fc6.js";var O=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),P=function(c){O(a,c);function a(){return c!==null&&c.apply(this,arguments)||this}return a}(A),K=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),x=globalThis&&globalThis.__assign||function(){return x=Object.assign||function(c){for(var a,r=1,t=arguments.length;r0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0)&&!(n=t.next()).done;)e.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(o)throw o.error}}return e},R=function(c){K(a,c);function a(r,t){var n=c.call(this)||this;if(n._handleMessage=function(e){if(n._injectedProvider&&e.source===window||e.origin===n._providerUrl.origin&&e.source===n._popup){if(e.data.method==="connected"){var o=new T(e.data.params.publicKey);(!n._publicKey||!n._publicKey.equals(o))&&(n._publicKey&&!n._publicKey.equals(o)&&n._handleDisconnect(),n._publicKey=o,n._autoApprove=!!e.data.params.autoApprove,n.emit("connect",n._publicKey))}else if(e.data.method==="disconnected")n._handleDisconnect();else if((e.data.result||e.data.error)&&n._responsePromises.has(e.data.id)){var s=E(n._responsePromises.get(e.data.id),2),u=s[0],i=s[1];e.data.result?u(e.data.result):i(new Error(e.data.error))}}},n._handleConnect=function(){return n._handlerAdded||(n._handlerAdded=!0,window.addEventListener("message",n._handleMessage),window.addEventListener("beforeunload",n.disconnect)),n._injectedProvider?new Promise(function(e){n._sendRequest("connect",{}),e()}):(window.name="parent",n._popup=window.open(n._providerUrl.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(function(e){n.once("connect",e)}))},n._handleDisconnect=function(){n._handlerAdded&&(n._handlerAdded=!1,window.removeEventListener("message",n._handleMessage),window.removeEventListener("beforeunload",n.disconnect)),n._publicKey&&(n._publicKey=null,n.emit("disconnect")),n._responsePromises.forEach(function(e,o){var s=E(e,2);s[0];var u=s[1];n._responsePromises.delete(o),u("Wallet disconnected")})},n._sendRequest=function(e,o){return m(n,void 0,void 0,function(){var s,u=this;return w(this,function(i){if(e!=="connect"&&!this.connected)throw new Error("Wallet not connected");return s=this._nextRequestId,++this._nextRequestId,[2,new Promise(function(l,f){u._responsePromises.set(s,[l,f]),u._injectedProvider?u._injectedProvider.postMessage({jsonrpc:"2.0",id:s,method:e,params:x({network:u._network},o)}):(u._popup.postMessage({jsonrpc:"2.0",id:s,method:e,params:o},u._providerUrl.origin),u.autoApprove||u._popup.focus())})]})})},n.connect=function(){return n._popup&&n._popup.close(),n._handleConnect()},n.disconnect=function(){return m(n,void 0,void 0,function(){return w(this,function(e){switch(e.label){case 0:return this._injectedProvider?[4,this._sendRequest("disconnect",{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return this._popup&&this._popup.close(),this._handleDisconnect(),[2]}})})},n.sign=function(e,o){return m(n,void 0,void 0,function(){var s,u,i;return w(this,function(l){switch(l.label){case 0:if(!(e instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return[4,this._sendRequest("sign",{data:e,display:o})];case 1:return s=l.sent(),u=d.decode(s.signature),i=new T(s.publicKey),[2,{signature:u,publicKey:i}]}})})},n.signTransaction=function(e){return m(n,void 0,void 0,function(){var o,s,u;return w(this,function(i){switch(i.label){case 0:return[4,this._sendRequest("signTransaction",{message:d.encode(e.serializeMessage())})];case 1:return o=i.sent(),s=d.decode(o.signature),u=new T(o.publicKey),e.addSignature(u,s),[2,e]}})})},n.signAllTransactions=function(e){return m(n,void 0,void 0,function(){var o,s,u;return w(this,function(i){switch(i.label){case 0:return[4,this._sendRequest("signAllTransactions",{messages:e.map(function(l){return d.encode(l.serializeMessage())})})];case 1:return o=i.sent(),s=o.signatures.map(function(l){return d.decode(l)}),u=new T(o.publicKey),e=e.map(function(l,f){return l.addSignature(u,s[f]),l}),[2,e]}})})},W(r))n._injectedProvider=r;else if(k(r))n._providerUrl=new URL(r),n._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:t}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.");return n._network=t,n._publicKey=null,n._autoApprove=!1,n._popup=null,n._handlerAdded=!1,n._nextRequestId=1,n._responsePromises=new Map,n}return Object.defineProperty(a.prototype,"publicKey",{get:function(){return this._publicKey},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"connected",{get:function(){return this._publicKey!==null},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"autoApprove",{get:function(){return this._autoApprove},enumerable:!1,configurable:!0}),a}(A);function k(c){return typeof c=="string"}function W(c){return q(c)&&H(c.postMessage)}function q(c){return typeof c=="object"&&c!==null}function H(c){return typeof c=="function"}var C=globalThis&&globalThis.__extends||function(){var c=function(a,r){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},c(a,r)};return function(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");c(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}(),_=globalThis&&globalThis.__awaiter||function(c,a,r,t){function n(e){return e instanceof r?e:new r(function(o){o(e)})}return new(r||(r=Promise))(function(e,o){function s(l){try{i(t.next(l))}catch(f){o(f)}}function u(l){try{i(t.throw(l))}catch(f){o(f)}}function i(l){l.done?e(l.value):n(l.value).then(s,u)}i((t=t.apply(c,a||[])).next())})},v=globalThis&&globalThis.__generator||function(c,a){var r={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},t,n,e,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(i){return function(l){return u([i,l])}}function u(i){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(r=0)),r;)try{if(t=1,n&&(e=i[0]&2?n.return:i[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,i[1])).done)return e;switch(n=0,e&&(i=[i[0]&2,e.value]),i[0]){case 0:case 1:e=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(e=r.trys,!(e=e.length>0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]0&&e[e.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!e||i[1]>e[0]&&i[1]=c.length&&(c=void 0),{value:c&&c[t++],done:!c}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},G=function(c){F(a,c);function a(r){var t=c.call(this)||this;return t._network="mainnet-beta",t._provider=null,t._adapterInstance=null,t._element=null,t._iframe=null,t._connectHandler=null,t._flutterHandlerInterval=null,t._handleEvent=function(n){var e,o,s,u;switch(n.type){case"connect_native_web":{t._collapseIframe(),t._adapterInstance=new U(t._iframe,t._network,((e=n.data)===null||e===void 0?void 0:e.provider)||t._provider||"https://solflare.com/provider"),t._adapterInstance.on("connect",t._webConnected),t._adapterInstance.on("disconnect",t._webDisconnected),t._adapterInstance.connect(),t._setPreferredAdapter("native_web");return}case"connect":{t._collapseIframe(),t._adapterInstance=new j(t._iframe,((o=n.data)===null||o===void 0?void 0:o.publicKey)||""),t._adapterInstance.connect(),t._setPreferredAdapter((s=n.data)===null||s===void 0?void 0:s.adapter),t._connectHandler&&(t._connectHandler.resolve(),t._connectHandler=null),t.emit("connect",t.publicKey);return}case"disconnect":{t._connectHandler&&(t._connectHandler.reject(),t._connectHandler=null),t._disconnected(),t.emit("disconnect");return}case"accountChanged":{!((u=n.data)===null||u===void 0)&&u.publicKey?(t._adapterInstance=new j(t._iframe,n.data.publicKey),t._adapterInstance.connect(),t.emit("accountChanged",t.publicKey)):t.emit("accountChanged",void 0);return}case"collapse":{t._collapseIframe();return}default:return}},t._handleResize=function(n){n.resizeMode==="full"?n.params.mode==="fullscreen"?t._expandIframe():n.params.mode==="hide"&&t._collapseIframe():n.resizeMode==="coordinates"&&t._iframe&&(t._iframe.style.top=isFinite(n.params.top)?"".concat(n.params.top,"px"):"",t._iframe.style.bottom=isFinite(n.params.bottom)?"".concat(n.params.bottom,"px"):"",t._iframe.style.left=isFinite(n.params.left)?"".concat(n.params.left,"px"):"",t._iframe.style.right=isFinite(n.params.right)?"".concat(n.params.right,"px"):"",t._iframe.style.width=isFinite(n.params.width)?"".concat(n.params.width,"px"):n.params.width,t._iframe.style.height=isFinite(n.params.height)?"".concat(n.params.height,"px"):n.params.height)},t._handleMessage=function(n){var e;if(((e=n.data)===null||e===void 0?void 0:e.channel)==="solflareIframeToWalletAdapter"){var o=n.data.data||{};o.type==="event"?t._handleEvent(o.event):o.type==="resize"?t._handleResize(o):o.type==="response"&&t._adapterInstance&&t._adapterInstance.handleMessage(o)}},t._removeElement=function(){t._flutterHandlerInterval!==null&&(clearInterval(t._flutterHandlerInterval),t._flutterHandlerInterval=null),t._element&&(t._element.remove(),t._element=null)},t._removeDanglingElements=function(){var n,e,o=document.getElementsByClassName("solflare-wallet-adapter-iframe");try{for(var s=L(o),u=s.next();!u.done;u=s.next()){var i=u.value;i.parentElement&&i.remove()}}catch(l){n={error:l}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(n)throw n.error}}},t._injectElement=function(){t._removeElement(),t._removeDanglingElements();var n="".concat(a.IFRAME_URL,"?cluster=").concat(encodeURIComponent(t._network),"&origin=").concat(encodeURIComponent(window.location.origin),"&version=1"),e=t._getPreferredAdapter();e&&(n+="&adapter=".concat(encodeURIComponent(e))),t._provider&&(n+="&provider=".concat(encodeURIComponent(t._provider))),t._element=document.createElement("div"),t._element.className="solflare-wallet-adapter-iframe",t._element.innerHTML=` `),document.body.appendChild(t._element),t._iframe=t._element.querySelector("iframe"),window.fromFlutter=t._handleMobileMessage,t._flutterHandlerInterval=setInterval(function(){window.fromFlutter=t._handleMobileMessage},100),window.addEventListener("message",t._handleMessage,!1)},t._collapseIframe=function(){t._iframe&&(t._iframe.style.top="",t._iframe.style.right="",t._iframe.style.height="2px",t._iframe.style.width="2px")},t._expandIframe=function(){t._iframe&&(t._iframe.style.top="0px",t._iframe.style.bottom="0px",t._iframe.style.left="0px",t._iframe.style.right="0px",t._iframe.style.width="100%",t._iframe.style.height="100%")},t._getPreferredAdapter=function(){return localStorage&&localStorage.getItem("solflarePreferredWalletAdapter")||null},t._setPreferredAdapter=function(n){localStorage&&n&&localStorage.setItem("solflarePreferredWalletAdapter",n)},t._clearPreferredAdapter=function(){localStorage&&localStorage.removeItem("solflarePreferredWalletAdapter")},t._webConnected=function(){t._connectHandler&&(t._connectHandler.resolve(),t._connectHandler=null),t.emit("connect",t.publicKey)},t._webDisconnected=function(){t._connectHandler&&(t._connectHandler.reject(),t._connectHandler=null),t._disconnected(),t.emit("disconnect")},t._disconnected=function(){window.removeEventListener("message",t._handleMessage,!1),t._removeElement(),t._clearPreferredAdapter(),t._adapterInstance=null},t._handleMobileMessage=function(n){var e,o;(o=(e=t._iframe)===null||e===void 0?void 0:e.contentWindow)===null||o===void 0||o.postMessage({channel:"solflareMobileToIframe",data:n},"*")},r?.network&&(t._network=r?.network),r?.provider&&(t._provider=r?.provider),t}return Object.defineProperty(a.prototype,"publicKey",{get:function(){var r;return((r=this._adapterInstance)===null||r===void 0?void 0:r.publicKey)||null},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isConnected",{get:function(){var r;return!!(!((r=this._adapterInstance)===null||r===void 0)&&r.connected)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"connected",{get:function(){return this.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"autoApprove",{get:function(){return!1},enumerable:!1,configurable:!0}),a.prototype.connect=function(){return h(this,void 0,void 0,function(){var r=this;return p(this,function(t){switch(t.label){case 0:return this.connected?[2]:(this._injectElement(),[4,new Promise(function(n,e){r._connectHandler={resolve:n,reject:e}})]);case 1:return t.sent(),[2]}})})},a.prototype.disconnect=function(){return h(this,void 0,void 0,function(){return p(this,function(r){switch(r.label){case 0:return this._adapterInstance?[4,this._adapterInstance.disconnect()]:[2];case 1:return r.sent(),this._disconnected(),this.emit("disconnect"),[2]}})})},a.prototype.signTransaction=function(r){return h(this,void 0,void 0,function(){var t,n,e,o,s=this;return p(this,function(u){switch(u.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return t=b(r)?r.serializeMessage():r.message.serialize(),[4,this._adapterInstance.signTransaction(t)];case 1:return n=u.sent(),b(r)?r.addSignature(this.publicKey,S.Buffer.from(n)):(e=r.message.staticAccountKeys.slice(0,r.message.header.numRequiredSignatures),o=e.findIndex(function(i){return i.equals(s.publicKey)}),o>=0&&(r.signatures[o]=n)),[2,r]}})})},a.prototype.signAllTransactions=function(r){return h(this,void 0,void 0,function(){var t,n,e,o,s,u,i=this;return p(this,function(l){switch(l.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return t=r.map(function(f){return b(f)?f.serializeMessage():f.message.serialize()}),[4,this._adapterInstance.signAllTransactions(t)];case 1:for(n=l.sent(),e=0;e=0&&(o.signatures[u]=n[e]));return[2,r]}})})},a.prototype.signAndSendTransaction=function(r,t){return h(this,void 0,void 0,function(){var n;return p(this,function(e){switch(e.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return n=b(r)?r.serialize({verifySignatures:!1,requireAllSignatures:!1}):r.serialize(),[4,this._adapterInstance.signAndSendTransaction(n,t)];case 1:return[2,e.sent()]}})})},a.prototype.signMessage=function(r,t){return t===void 0&&(t="utf8"),h(this,void 0,void 0,function(){return p(this,function(n){switch(n.label){case 0:if(!this.connected)throw new Error("Wallet not connected");return[4,this._adapterInstance.signMessage(r,t)];case 1:return[2,n.sent()]}})})},a.prototype.sign=function(r,t){return t===void 0&&(t="utf8"),h(this,void 0,void 0,function(){return p(this,function(n){switch(n.label){case 0:return[4,this.signMessage(r,t)];case 1:return[2,n.sent()]}})})},a.prototype.detectWallet=function(r){var t;return r===void 0&&(r=10),h(this,void 0,void 0,function(){return p(this,function(n){return window.SolflareApp||!((t=window.solflare)===null||t===void 0)&&t.isSolflare?[2,!0]:[2,new Promise(function(e){var o,s;o=setInterval(function(){var u;(window.SolflareApp||!((u=window.solflare)===null||u===void 0)&&u.isSolflare)&&(clearInterval(o),clearTimeout(s),e(!0))},500),s=setTimeout(function(){clearInterval(o),e(!1)},r*1e3)})]})})},a.IFRAME_URL="https://connect.solflare.com/",a}(A);export{G as default}; diff --git a/assets/index-ba0213e3.js b/assets/index-9b7d3fcf.js similarity index 99% rename from assets/index-ba0213e3.js rename to assets/index-9b7d3fcf.js index 52437d4..1ef9d61 100644 --- a/assets/index-ba0213e3.js +++ b/assets/index-9b7d3fcf.js @@ -1,3 +1,3 @@ -import{a as H,bH as k,bI as W,bJ as P,P as j,b as u,bK as S}from"./index-d1afe763.js";import{E as N,v as F}from"./v4-84582c03.js";function A(s){return s.version===void 0}function O(s){return A(s)?s.serialize({verifySignatures:!1,requireAllSignatures:!1}):s.serialize()}function K(s){return A(s)?s.serializeMessage():s.message.serialize()}function C(s,i,e){if(A(s))s.addSignature(i,H.Buffer.from(e));else{const n=s.message.staticAccountKeys.slice(0,s.message.header.numRequiredSignatures).findIndex(r=>r.equals(i));n>=0&&(s.signatures[n]=e)}}var x=globalThis&&globalThis.__awaiter||function(s,i,e,t){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function h(o){try{l(t.next(o))}catch(d){a(d)}}function m(o){try{l(t.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):n(o.value).then(h,m)}l((t=t.apply(s,i||[])).next())})};function E(s){return x(this,void 0,void 0,function*(){try{return yield s.request({method:"wallet_getSnaps"}),!0}catch{return!1}})}function L(){return x(this,void 0,void 0,function*(){try{const s=window.ethereum;if(!s)return null;if(s.providers&&Array.isArray(s.providers)){const i=s.providers;for(const e of i)if(yield E(e))return e}if(s.detected&&Array.isArray(s.detected)){const i=s.detected;for(const e of i)if(yield E(e))return e}return(yield E(s))?s:null}catch(s){return console.error(s),null}})}const $="solana:mainnet",R="solana:devnet",q="solana:testnet",D="solana:localnet",z=[$,R,q,D];function M(s){return z.includes(s)}var f=globalThis&&globalThis.__classPrivateFieldGet||function(s,i,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?s!==i||!t:!i.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(s):t?t.value:i.get(s)},_=globalThis&&globalThis.__classPrivateFieldSet||function(s,i,e,t,n){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?s!==i||!n:!i.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?n.call(s,e):n?n.value=e:i.set(s,e),e},g,v,p,w,y,b;const U=z,B=[k,W,P];class T{get address(){return f(this,g,"f")}get publicKey(){return f(this,v,"f").slice()}get chains(){return f(this,p,"f").slice()}get features(){return f(this,w,"f").slice()}get label(){return f(this,y,"f")}get icon(){return f(this,b,"f")}constructor({address:i,publicKey:e,label:t,icon:n}){g.set(this,void 0),v.set(this,void 0),p.set(this,void 0),w.set(this,void 0),y.set(this,void 0),b.set(this,void 0),new.target===T&&Object.freeze(this),_(this,g,i,"f"),_(this,v,e,"f"),_(this,p,U,"f"),_(this,w,B,"f"),_(this,y,t,"f"),_(this,b,n,"f")}}g=new WeakMap,v=new WeakMap,p=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap;var c=globalThis&&globalThis.__awaiter||function(s,i,e,t){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function h(o){try{l(t.next(o))}catch(d){a(d)}}function m(o){try{l(t.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):n(o.value).then(h,m)}l((t=t.apply(s,i||[])).next())})};class I extends N{constructor(i){super(),this._network="mainnet-beta",this._iframeParams={},this._element=null,this._iframe=null,this._publicKey=null,this._account=null,this._isConnected=!1,this._connectHandler=null,this._messageHandlers={},this._handleEvent=e=>{var t,n;switch(e.type){case"connect":{this._collapseIframe(),!((t=e.data)===null||t===void 0)&&t.publicKey?(this._publicKey=e.data.publicKey,this._isConnected=!0,this._connectHandler&&(this._connectHandler.resolve(),this._connectHandler=null),this._connected()):(this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected());return}case"disconnect":{this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected();return}case"accountChanged":{!((n=e.data)===null||n===void 0)&&n.publicKey?(this._publicKey=e.data.publicKey,this.emit("accountChanged",this.publicKey),this._standardConnected()):(this.emit("accountChanged",void 0),this._standardDisconnected());return}default:return}},this._handleResize=e=>{e.resizeMode==="full"?e.params.mode==="fullscreen"?this._expandIframe():e.params.mode==="hide"&&this._collapseIframe():e.resizeMode==="coordinates"&&this._resizeIframe(e.params)},this._handleMessage=e=>{var t;if(((t=e.data)===null||t===void 0?void 0:t.channel)!=="solflareIframeToWalletAdapter")return;const n=e.data.data||{};if(n.type==="event")this._handleEvent(n.event);else if(n.type==="resize")this._handleResize(n);else if(n.type==="response"&&this._messageHandlers[n.id]){const{resolve:r,reject:a}=this._messageHandlers[n.id];delete this._messageHandlers[n.id],n.error?a(n.error):r(n.result)}},this._removeElement=()=>{this._element&&(this._element.remove(),this._element=null)},this._removeDanglingElements=()=>{const e=document.getElementsByClassName("solflare-metamask-wallet-adapter-iframe");for(const t of e)t.parentElement&&t.remove()},this._injectElement=()=>{this._removeElement(),this._removeDanglingElements();const e=Object.assign(Object.assign({},this._iframeParams),{mm:!0,v:1,cluster:this._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||""}),t=Object.keys(e).map(r=>`${r}=${encodeURIComponent(e[r])}`).join("&"),n=`${I.IFRAME_URL}?${t}`;this._element=document.createElement("div"),this._element.className="solflare-metamask-wallet-adapter-iframe",this._element.innerHTML=` +import{a as H,bH as k,bI as W,bJ as P,P as j,b as u,bK as S}from"./index-3e319056.js";import{E as N,v as F}from"./v4-0cd80fc6.js";function A(s){return s.version===void 0}function O(s){return A(s)?s.serialize({verifySignatures:!1,requireAllSignatures:!1}):s.serialize()}function K(s){return A(s)?s.serializeMessage():s.message.serialize()}function C(s,i,e){if(A(s))s.addSignature(i,H.Buffer.from(e));else{const n=s.message.staticAccountKeys.slice(0,s.message.header.numRequiredSignatures).findIndex(r=>r.equals(i));n>=0&&(s.signatures[n]=e)}}var x=globalThis&&globalThis.__awaiter||function(s,i,e,t){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function h(o){try{l(t.next(o))}catch(d){a(d)}}function m(o){try{l(t.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):n(o.value).then(h,m)}l((t=t.apply(s,i||[])).next())})};function E(s){return x(this,void 0,void 0,function*(){try{return yield s.request({method:"wallet_getSnaps"}),!0}catch{return!1}})}function L(){return x(this,void 0,void 0,function*(){try{const s=window.ethereum;if(!s)return null;if(s.providers&&Array.isArray(s.providers)){const i=s.providers;for(const e of i)if(yield E(e))return e}if(s.detected&&Array.isArray(s.detected)){const i=s.detected;for(const e of i)if(yield E(e))return e}return(yield E(s))?s:null}catch(s){return console.error(s),null}})}const $="solana:mainnet",R="solana:devnet",q="solana:testnet",D="solana:localnet",z=[$,R,q,D];function M(s){return z.includes(s)}var f=globalThis&&globalThis.__classPrivateFieldGet||function(s,i,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?s!==i||!t:!i.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(s):t?t.value:i.get(s)},_=globalThis&&globalThis.__classPrivateFieldSet||function(s,i,e,t,n){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?s!==i||!n:!i.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?n.call(s,e):n?n.value=e:i.set(s,e),e},g,v,p,w,y,b;const U=z,B=[k,W,P];class T{get address(){return f(this,g,"f")}get publicKey(){return f(this,v,"f").slice()}get chains(){return f(this,p,"f").slice()}get features(){return f(this,w,"f").slice()}get label(){return f(this,y,"f")}get icon(){return f(this,b,"f")}constructor({address:i,publicKey:e,label:t,icon:n}){g.set(this,void 0),v.set(this,void 0),p.set(this,void 0),w.set(this,void 0),y.set(this,void 0),b.set(this,void 0),new.target===T&&Object.freeze(this),_(this,g,i,"f"),_(this,v,e,"f"),_(this,p,U,"f"),_(this,w,B,"f"),_(this,y,t,"f"),_(this,b,n,"f")}}g=new WeakMap,v=new WeakMap,p=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap;var c=globalThis&&globalThis.__awaiter||function(s,i,e,t){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function h(o){try{l(t.next(o))}catch(d){a(d)}}function m(o){try{l(t.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):n(o.value).then(h,m)}l((t=t.apply(s,i||[])).next())})};class I extends N{constructor(i){super(),this._network="mainnet-beta",this._iframeParams={},this._element=null,this._iframe=null,this._publicKey=null,this._account=null,this._isConnected=!1,this._connectHandler=null,this._messageHandlers={},this._handleEvent=e=>{var t,n;switch(e.type){case"connect":{this._collapseIframe(),!((t=e.data)===null||t===void 0)&&t.publicKey?(this._publicKey=e.data.publicKey,this._isConnected=!0,this._connectHandler&&(this._connectHandler.resolve(),this._connectHandler=null),this._connected()):(this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected());return}case"disconnect":{this._connectHandler&&(this._connectHandler.reject(),this._connectHandler=null),this._disconnected();return}case"accountChanged":{!((n=e.data)===null||n===void 0)&&n.publicKey?(this._publicKey=e.data.publicKey,this.emit("accountChanged",this.publicKey),this._standardConnected()):(this.emit("accountChanged",void 0),this._standardDisconnected());return}default:return}},this._handleResize=e=>{e.resizeMode==="full"?e.params.mode==="fullscreen"?this._expandIframe():e.params.mode==="hide"&&this._collapseIframe():e.resizeMode==="coordinates"&&this._resizeIframe(e.params)},this._handleMessage=e=>{var t;if(((t=e.data)===null||t===void 0?void 0:t.channel)!=="solflareIframeToWalletAdapter")return;const n=e.data.data||{};if(n.type==="event")this._handleEvent(n.event);else if(n.type==="resize")this._handleResize(n);else if(n.type==="response"&&this._messageHandlers[n.id]){const{resolve:r,reject:a}=this._messageHandlers[n.id];delete this._messageHandlers[n.id],n.error?a(n.error):r(n.result)}},this._removeElement=()=>{this._element&&(this._element.remove(),this._element=null)},this._removeDanglingElements=()=>{const e=document.getElementsByClassName("solflare-metamask-wallet-adapter-iframe");for(const t of e)t.parentElement&&t.remove()},this._injectElement=()=>{this._removeElement(),this._removeDanglingElements();const e=Object.assign(Object.assign({},this._iframeParams),{mm:!0,v:1,cluster:this._network||"mainnet-beta",origin:window.location.origin||"",title:document.title||""}),t=Object.keys(e).map(r=>`${r}=${encodeURIComponent(e[r])}`).join("&"),n=`${I.IFRAME_URL}?${t}`;this._element=document.createElement("div"),this._element.className="solflare-metamask-wallet-adapter-iframe",this._element.innerHTML=` `,document.body.appendChild(this._element),this._iframe=this._element.querySelector("iframe"),window.addEventListener("message",this._handleMessage,!1)},this._collapseIframe=()=>{this._iframe&&(this._iframe.style.top="",this._iframe.style.right="",this._iframe.style.height="2px",this._iframe.style.width="2px")},this._expandIframe=()=>{this._iframe&&(this._iframe.style.top="0px",this._iframe.style.bottom="0px",this._iframe.style.left="0px",this._iframe.style.right="0px",this._iframe.style.width="100%",this._iframe.style.height="100%")},this._resizeIframe=e=>{this._iframe&&(this._iframe.style.top=isFinite(e.top)?`${e.top}px`:"",this._iframe.style.bottom=isFinite(e.bottom)?`${e.bottom}px`:"",this._iframe.style.left=isFinite(e.left)?`${e.left}px`:"",this._iframe.style.right=isFinite(e.right)?`${e.right}px`:"",this._iframe.style.width=isFinite(e.width)?`${e.width}px`:e.width,this._iframe.style.height=isFinite(e.height)?`${e.height}px`:e.height)},this._sendIframeMessage=e=>{if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");return new Promise((t,n)=>{var r,a;const h=F();this._messageHandlers[h]={resolve:t,reject:n},(a=(r=this._iframe)===null||r===void 0?void 0:r.contentWindow)===null||a===void 0||a.postMessage({channel:"solflareWalletAdapterToIframe",data:Object.assign({id:h},e)},"*")})},this._connected=()=>{this._isConnected=!0,this.emit("connect",this.publicKey),this._standardConnected()},this._disconnected=()=>{this._publicKey=null,this._isConnected=!1,window.removeEventListener("message",this._handleMessage,!1),this._removeElement(),this.emit("disconnect"),this._standardDisconnected()},this._standardConnected=()=>{if(!this.publicKey)return;const e=this.publicKey.toString();(!this._account||this._account.address!==e)&&(this._account=new T({address:e,publicKey:this.publicKey.toBytes()}),this.emit("standard_change",{accounts:this.standardAccounts}))},this._standardDisconnected=()=>{this._account&&(this._account=null,this.emit("standard_change",{accounts:this.standardAccounts}))},i?.network&&(this._network=i?.network),window.SolflareMetaMaskParams&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),window.SolflareMetaMaskParams)),i?.params&&(this._iframeParams=Object.assign(Object.assign({},this._iframeParams),i?.params))}get publicKey(){return this._publicKey?new j(this._publicKey):null}get standardAccount(){return this._account}get standardAccounts(){return this._account?[this._account]:[]}get isConnected(){return this._isConnected}get connected(){return this.isConnected}get autoApprove(){return!1}connect(){return c(this,void 0,void 0,function*(){this.connected||(this._injectElement(),yield new Promise((i,e)=>{this._connectHandler={resolve:i,reject:e}}))})}disconnect(){return c(this,void 0,void 0,function*(){yield this._sendIframeMessage({method:"disconnect"}),this._disconnected()})}signTransaction(i){var e;return c(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const t=K(i),{signature:n}=yield this._sendIframeMessage({method:"signTransaction",params:{message:u.encode(t)}});return C(i,this.publicKey,u.decode(n)),i}catch(t){throw new Error(((e=t?.toString)===null||e===void 0?void 0:e.call(t))||"Failed to sign transaction")}})}signAllTransactions(i){var e;return c(this,void 0,void 0,function*(){if(!this.connected||!this.publicKey)throw new Error("Wallet not connected");try{const t=i.map(r=>K(r)),{signatures:n}=yield this._sendIframeMessage({method:"signAllTransactions",params:{messages:t.map(r=>u.encode(r))}});for(let r=0;r1)for(const t of i)e.push(...yield this.standardSignAndSendTransaction(t));return e})}standardSignTransaction(...i){return c(this,void 0,void 0,function*(){if(!this.connected)throw new Error("not connected");const e=[];if(i.length===1){const{transaction:t,account:n,chain:r}=i[0];if(n!==this._account)throw new Error("invalid account");if(r&&!M(r))throw new Error("invalid chain");const a=yield this.signTransaction(S.deserialize(t));e.push({signedTransaction:a.serialize()})}else if(i.length>1){let t;for(const a of i){if(a.account!==this._account)throw new Error("invalid account");if(a.chain){if(!M(a.chain))throw new Error("invalid chain");if(t){if(a.chain!==t)throw new Error("conflicting chain")}else t=a.chain}}const n=i.map(({transaction:a})=>S.deserialize(a)),r=yield this.signAllTransactions(n);e.push(...r.map(a=>({signedTransaction:a.serialize()})))}return e})}standardSignMessage(...i){return c(this,void 0,void 0,function*(){if(!this.connected)throw new Error("not connected");const e=[];if(i.length===1){const{message:t,account:n}=i[0];if(n!==this._account)throw new Error("invalid account");const r=yield this.signMessage(t);e.push({signedMessage:t,signature:r})}else if(i.length>1)for(const t of i)e.push(...yield this.standardSignMessage(t));return e})}}I.IFRAME_URL="https://widget.solflare.com/";export{T as StandardSolflareMetaMaskWalletAccount,I as default}; diff --git a/assets/index-62c88c7a.js b/assets/index-cf21008a.js similarity index 99% rename from assets/index-62c88c7a.js rename to assets/index-cf21008a.js index c00033c..e4e8b0f 100644 --- a/assets/index-62c88c7a.js +++ b/assets/index-cf21008a.js @@ -1 +1 @@ -import{E as m,P as g,h as _}from"./index-d1afe763.js";var x=globalThis&&globalThis.__extends||function(){var s=function(o,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},s(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),T=function(s){x(o,s);function o(){return s!==null&&s.apply(this,arguments)||this}return o}(m),h=globalThis&&globalThis.__awaiter||function(s,o,e,t){function r(n){return n instanceof e?n:new e(function(a){a(n)})}return new(e||(e=Promise))(function(n,a){function u(c){try{i(t.next(c))}catch(d){a(d)}}function l(c){try{i(t.throw(c))}catch(d){a(d)}}function i(c){c.done?n(c.value):r(c.value).then(u,l)}i((t=t.apply(s,o||[])).next())})};class A extends m{constructor(o,e){if(super(),this._network=e,this._publicKey=null,this._popup=null,this._handlerAdded=!1,this._nextRequestId=1,this._autoApprove=!1,this._responsePromises=new Map,this.handleMessage=t=>{var r;if(this._injectedProvider&&t.source===window||t.origin===((r=this._providerUrl)===null||r===void 0?void 0:r.origin)&&t.source===this._popup){if(t.data.method==="connected"){const n=new g(t.data.params.publicKey);(!this._publicKey||!this._publicKey.equals(n))&&(this._publicKey&&!this._publicKey.equals(n)&&this.handleDisconnect(),this._publicKey=n,this._autoApprove=!!t.data.params.autoApprove,this.emit("connect",this._publicKey))}else if(t.data.method==="disconnected")this.handleDisconnect();else if(t.data.result||t.data.error){const n=this._responsePromises.get(t.data.id);if(n){const[a,u]=n;t.data.result?a(t.data.result):u(new Error(t.data.error))}}}},this._beforeUnload=()=>{this.disconnect()},E(o))this._injectedProvider=o;else if(j(o))this._providerUrl=new URL(o),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:this._network}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.")}handleConnect(){var o;return this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this.handleMessage),window.addEventListener("beforeunload",this._beforeUnload)),this._injectedProvider?new Promise(e=>{this.sendRequest("connect",{}),e()}):(window.name="parent",this._popup=window.open((o=this._providerUrl)===null||o===void 0?void 0:o.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(e=>{this.once("connect",e)}))}handleDisconnect(){this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this.handleMessage),window.removeEventListener("beforeunload",this._beforeUnload)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(([,o],e)=>{this._responsePromises.delete(e),o(new Error("Wallet disconnected"))})}sendRequest(o,e){return h(this,void 0,void 0,function*(){if(o!=="connect"&&!this.connected)throw new Error("Wallet not connected");const t=this._nextRequestId;return++this._nextRequestId,new Promise((r,n)=>{var a,u,l,i;this._responsePromises.set(t,[r,n]),this._injectedProvider?this._injectedProvider.postMessage({jsonrpc:"2.0",id:t,method:o,params:Object.assign({network:this._network},e)}):((a=this._popup)===null||a===void 0||a.postMessage({jsonrpc:"2.0",id:t,method:o,params:e},(l=(u=this._providerUrl)===null||u===void 0?void 0:u.origin)!==null&&l!==void 0?l:""),this.autoApprove||(i=this._popup)===null||i===void 0||i.focus())})})}get publicKey(){return this._publicKey}get connected(){return this._publicKey!==null}get autoApprove(){return this._autoApprove}connect(){return h(this,void 0,void 0,function*(){this._popup&&this._popup.close(),yield this.handleConnect()})}disconnect(){return h(this,void 0,void 0,function*(){this._injectedProvider&&(yield this.sendRequest("disconnect",{})),this._popup&&this._popup.close(),this.handleDisconnect()})}sign(o,e){return h(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const t=yield this.sendRequest("sign",{data:o,display:e}),r=_.decode(t.signature),n=new g(t.publicKey);return{signature:r,publicKey:n}})}signTransaction(o){return h(this,void 0,void 0,function*(){const e=yield this.sendRequest("signTransaction",{message:_.encode(o.serializeMessage())}),t=_.decode(e.signature),r=new g(e.publicKey);return o.addSignature(r,t),o})}signAllTransactions(o){return h(this,void 0,void 0,function*(){const e=yield this.sendRequest("signAllTransactions",{messages:o.map(n=>_.encode(n.serializeMessage()))}),t=e.signatures.map(n=>_.decode(n)),r=new g(e.publicKey);return o=o.map((n,a)=>(n.addSignature(r,t[a]),n)),o})}diffieHellman(o){return h(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return yield this.sendRequest("diffieHellman",{publicKey:o})})}}function j(s){return typeof s=="string"}function E(s){return O(s)&&"postMessage"in s&&typeof s.postMessage=="function"}function O(s){return typeof s=="object"&&s!==null}var k=globalThis&&globalThis.__extends||function(){var s=function(o,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},s(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),v=globalThis&&globalThis.__awaiter||function(s,o,e,t){function r(n){return n instanceof e?n:new e(function(a){a(n)})}return new(e||(e=Promise))(function(n,a){function u(c){try{i(t.next(c))}catch(d){a(d)}}function l(c){try{i(t.throw(c))}catch(d){a(d)}}function i(c){c.done?n(c.value):r(c.value).then(u,l)}i((t=t.apply(s,o||[])).next())})},w=globalThis&&globalThis.__generator||function(s,o){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},t,r,n,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(i){return function(c){return l([i,c])}}function l(i){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,r&&(n=i[0]&2?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[i[0]&2,n.value]),i[0]){case 0:case 1:n=i;break;case 4:return e.label++,{value:i[1],done:!1};case 5:e.label++,r=i[1],i=[0];continue;case 7:i=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]{var r;if(this._injectedProvider&&t.source===window||t.origin===((r=this._providerUrl)===null||r===void 0?void 0:r.origin)&&t.source===this._popup){if(t.data.method==="connected"){const n=new g(t.data.params.publicKey);(!this._publicKey||!this._publicKey.equals(n))&&(this._publicKey&&!this._publicKey.equals(n)&&this.handleDisconnect(),this._publicKey=n,this._autoApprove=!!t.data.params.autoApprove,this.emit("connect",this._publicKey))}else if(t.data.method==="disconnected")this.handleDisconnect();else if(t.data.result||t.data.error){const n=this._responsePromises.get(t.data.id);if(n){const[a,u]=n;t.data.result?a(t.data.result):u(new Error(t.data.error))}}}},this._beforeUnload=()=>{this.disconnect()},E(o))this._injectedProvider=o;else if(j(o))this._providerUrl=new URL(o),this._providerUrl.hash=new URLSearchParams({origin:window.location.origin,network:this._network}).toString();else throw new Error("provider parameter must be an injected provider or a URL string.")}handleConnect(){var o;return this._handlerAdded||(this._handlerAdded=!0,window.addEventListener("message",this.handleMessage),window.addEventListener("beforeunload",this._beforeUnload)),this._injectedProvider?new Promise(e=>{this.sendRequest("connect",{}),e()}):(window.name="parent",this._popup=window.open((o=this._providerUrl)===null||o===void 0?void 0:o.toString(),"_blank","location,resizable,width=460,height=675"),new Promise(e=>{this.once("connect",e)}))}handleDisconnect(){this._handlerAdded&&(this._handlerAdded=!1,window.removeEventListener("message",this.handleMessage),window.removeEventListener("beforeunload",this._beforeUnload)),this._publicKey&&(this._publicKey=null,this.emit("disconnect")),this._responsePromises.forEach(([,o],e)=>{this._responsePromises.delete(e),o(new Error("Wallet disconnected"))})}sendRequest(o,e){return h(this,void 0,void 0,function*(){if(o!=="connect"&&!this.connected)throw new Error("Wallet not connected");const t=this._nextRequestId;return++this._nextRequestId,new Promise((r,n)=>{var a,u,l,i;this._responsePromises.set(t,[r,n]),this._injectedProvider?this._injectedProvider.postMessage({jsonrpc:"2.0",id:t,method:o,params:Object.assign({network:this._network},e)}):((a=this._popup)===null||a===void 0||a.postMessage({jsonrpc:"2.0",id:t,method:o,params:e},(l=(u=this._providerUrl)===null||u===void 0?void 0:u.origin)!==null&&l!==void 0?l:""),this.autoApprove||(i=this._popup)===null||i===void 0||i.focus())})})}get publicKey(){return this._publicKey}get connected(){return this._publicKey!==null}get autoApprove(){return this._autoApprove}connect(){return h(this,void 0,void 0,function*(){this._popup&&this._popup.close(),yield this.handleConnect()})}disconnect(){return h(this,void 0,void 0,function*(){this._injectedProvider&&(yield this.sendRequest("disconnect",{})),this._popup&&this._popup.close(),this.handleDisconnect()})}sign(o,e){return h(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");const t=yield this.sendRequest("sign",{data:o,display:e}),r=_.decode(t.signature),n=new g(t.publicKey);return{signature:r,publicKey:n}})}signTransaction(o){return h(this,void 0,void 0,function*(){const e=yield this.sendRequest("signTransaction",{message:_.encode(o.serializeMessage())}),t=_.decode(e.signature),r=new g(e.publicKey);return o.addSignature(r,t),o})}signAllTransactions(o){return h(this,void 0,void 0,function*(){const e=yield this.sendRequest("signAllTransactions",{messages:o.map(n=>_.encode(n.serializeMessage()))}),t=e.signatures.map(n=>_.decode(n)),r=new g(e.publicKey);return o=o.map((n,a)=>(n.addSignature(r,t[a]),n)),o})}diffieHellman(o){return h(this,void 0,void 0,function*(){if(!(o instanceof Uint8Array))throw new Error("Data must be an instance of Uint8Array");return yield this.sendRequest("diffieHellman",{publicKey:o})})}}function j(s){return typeof s=="string"}function E(s){return O(s)&&"postMessage"in s&&typeof s.postMessage=="function"}function O(s){return typeof s=="object"&&s!==null}var k=globalThis&&globalThis.__extends||function(){var s=function(o,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},s(o,e)};return function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),v=globalThis&&globalThis.__awaiter||function(s,o,e,t){function r(n){return n instanceof e?n:new e(function(a){a(n)})}return new(e||(e=Promise))(function(n,a){function u(c){try{i(t.next(c))}catch(d){a(d)}}function l(c){try{i(t.throw(c))}catch(d){a(d)}}function i(c){c.done?n(c.value):r(c.value).then(u,l)}i((t=t.apply(s,o||[])).next())})},w=globalThis&&globalThis.__generator||function(s,o){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},t,r,n,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(i){return function(c){return l([i,c])}}function l(i){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,r&&(n=i[0]&2?r.return:i[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,i[1])).done)return n;switch(r=0,n&&(i=[i[0]&2,n.value]),i[0]){case 0:case 1:n=i;break;case 4:return e.label++,{value:i[1],done:!1};case 5:e.label++,r=i[1],i=[0];continue;case 7:i=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]0&&n[n.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]r.tokenSwapsAllFiltered),{handleFilterToken:v,tokens:m}=de();v(Z);const l=_(()=>(B.value?.map(o=>({tokenA:o.data.tokenAMint.toBase58(),tokenB:o.data.tokenBMint.toBase58()})).filter((o,d,V)=>{const y=V.findIndex($=>$.tokenA===o.tokenA&&$.tokenB===o.tokenB||$.tokenA===o.tokenB&&$.tokenB===o.tokenA);return y===-1||y===d})).map(o=>{const d=m.value.find(y=>y.mint===o.tokenA),V=m.value.find(y=>y.mint===o.tokenB);return{value:{tokenA:d,tokenB:V},label:`${d?.symbol}/${V?.symbol}`}}).filter(o=>o.value.tokenA&&o.value.tokenB)),n=Me();return W([()=>t.from,()=>t.to,l],([u,o])=>{n.value=l.value.find(d=>u.mint===d.value.tokenA?.mint&&o.mint===d.value.tokenB?.mint||u.mint===d.value.tokenB?.mint&&o.mint===d.value.tokenA?.mint)},{immediate:!0}),W(n,()=>{n.value&&(t.from=n.value.value.tokenA,t.to=n.value.value.tokenB)},{immediate:!0}),(u,o)=>(M(),Y(Ve,{modelValue:e(n),"onUpdate:modelValue":o[0]||(o[0]=d=>J(n)?n.value=d:null),"option-disable":"inactive","popup-content-class":"select-token-pair-popup transition-duration",outlined:"",options:e(l),dense:"","options-dense":!1,class:"select-token-pair",standout:!1},{prepend:c(()=>[e(n)?(M(),U("div",We,[s(X,null,{default:c(()=>[s($e,{src:e(n)?.value.tokenA.image,alt:e(n)?.value.tokenA.symbol},null,8,["src","alt"])]),_:1}),s(X,null,{default:c(()=>[a("img",{src:e(n)?.value.tokenB.image,alt:e(n)?.value.tokenB.symbol},null,8,Re)]),_:1})])):(M(),U("div",He," Select a pair of tokens "))]),option:c(d=>[s(qe,Ce(d.itemProps,{class:"token-select__token items-center"}),{default:c(()=>[a("div",Oe,[s(X,null,{default:c(()=>[a("img",{src:d.opt.value.tokenA.image},null,8,Xe)]),_:2},1024),s(X,null,{default:c(()=>[a("img",{src:d.opt.value.tokenB.image},null,8,ze)]),_:2},1024)]),a("div",Ge,[s(le,null,{default:c(()=>[N(i(d.opt.value.tokenA.symbol),1)]),_:2},1024),Ye,s(le,null,{default:c(()=>[N(i(d.opt.value.tokenB.symbol),1)]),_:2},1024)])]),_:2},1040)]),_:1},8,["modelValue","options"]))}}),Je=me("liquidity-withdraw",()=>{const Q=re(),r=ae(),t=pe(),{publicKey:B}=ke(),{notify:v}=fe(),m=H(),l=_(()=>m.tokenSwap),n=_(()=>m.state),u=_(()=>m.swapClient),o=_e({slippageDialog:!1,swapping:!1,active:!1,slippage:.01,poolAmount:0,minAmountTokenA:0,minAmountTokenB:0}),d=async()=>{const S=x(o.poolAmount,I)/n.value.poolTokenSupply;(o.poolAmount===0||Number.isNaN(o.poolAmount))&&(o.minAmountTokenA=0,o.minAmountTokenB=0),o.minAmountTokenA=Math.floor(S*n.value.poolBalance[n.value.from.mint]*(1-o.slippage)*(1-n.value.fees.ownerWithdraw)),o.minAmountTokenB=Math.floor(S*n.value.poolBalance[n.value.to.mint]*(1-o.slippage)*(1-n.value.fees.ownerWithdraw))};W([()=>n.value.poolBalance,()=>o.poolAmount,()=>o.slippage],()=>d(),{immediate:!0});function V(){m.loadPoolTokenAccounts(),m.reloadUserLP(),o.poolAmount=0}async function y(){if(!r.certificateValid)return ve();if(!l.value||!B.value){console.log("Pool is not selected...");return}if(t.value.publicKey||v({type:"info",message:"Please connect your wallet first"}),o.poolAmount>m.userPoolsTokens[l.value.data.poolMint.toBase58()]){v({type:"negative",message:"Insufficient LP tokens balance"});return}try{o.swapping=!0;let f=o.minAmountTokenA,w=o.minAmountTokenB,A=n.value.from,P=n.value.to;l.value.data.tokenBMint.toBase58()===n.value.from.mint&&(f=o.minAmountTokenB,w=o.minAmountTokenA,A=n.value.to,P=n.value.from);const k=await F(l.value.data.tokenAMint,t.value.publicKey),g=await F(l.value.data.tokenBMint,t.value.publicKey),T=await F(l.value.data.poolMint,t.value.publicKey);console.log("slippage = ",o.slippage);const L=u.value.swapAuthority(l.value.pubkey);console.log("source = ",T.toBase58()),console.log("destTokenA = ",k.toBase58()),console.log("destTokenB = ",g.toBase58()),console.log("swapAuthority = ",L.toBase58()),console.log("tokenSwap = ",l.value.pubkey.toBase58()),console.log("poolMint = ",l.value.data.poolMint.toBase58()),console.log("swapTokenA Mint = ",l.value.data.tokenAMint.toBase58()),console.log("swapTokenA = ",l.value.data.tokenA.toBase58()),console.log("swapTokenB Mint = ",l.value.data.tokenBMint.toBase58()),console.log("swapTokenB = ",l.value.data.tokenB.toBase58()),console.log("TokenA = ",A.symbol),console.log("minimumTokenA = ",f),console.log("minimumTokenA = ",b(f,A.decimals)),console.log("TokenB = ",P.symbol),console.log("minimumTokenB = ",w),console.log("minimumTokenB = ",b(w,P.decimals)),console.log("poolTokenAmount = ",o.poolAmount),console.log("poolTokenAmount = ",x(o.poolAmount,I)),console.log({tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,poolFee:l.value.data.poolFeeAccount,source:T,destTokenA:k,destTokenB:g,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:x(o.poolAmount,I),minimumTokenA:f,minimumTokenB:w,tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint});const E=await u.value.withdrawAllTokenTypes({tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,poolFee:l.value.data.poolFeeAccount,source:T,destTokenA:k,destTokenB:g,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:x(o.poolAmount,I),minimumTokenA:f,minimumTokenB:w,tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint},{commitment:"confirmed"});v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${E}?cluster=${Q.cluster}`,onClick:()=>!1}]}),V()}catch(f){console.log(f),console.error(f.logs),`${f}`.includes("User rejected the request")||v({type:"negative",message:`${f}`})}finally{o.swapping=!1}}function $(){o.slippageDialog=!1}return{state:o,closeSlippage:$,depositBothTokens:y}}),eo={class:"swap-form q-mt-md"},oo={class:"swap-field"},to={class:"swap-field__info"},ao={class:"row"},no=a("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),lo={class:"col row justify-end swap-field__balance q-pr-sm"},so={key:0,class:"insufficient-error"},io={class:"row justify-between",style:{gap:"10px"}},uo={class:"swap-info q-mt-md q-pt-xs"},co={class:"text-weight-medium"},mo={class:"text-weight-medium"},ro=a("dt",null,"Slippage Tolerance",-1),po={href:"#"},ko=a("dt",null,"Withdraw fee",-1),fo={class:"swap-submit q-mt-md"},_o={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},vo={key:1,class:"row q-mt-md text-center relative-position full-width"},go={class:"absolute-right swap-rate__refresh"},wo={class:"swap-info q-mt-lg q-pt-sm"},Ao=a("dt",null,"LP tokens total",-1),To=G({__name:"WithdrawBothCard",setup(Q){const r=H(),{state:t,loadingPoolTokens:B,loadPoolTokenAccounts:v}=r,m=_(()=>r.tokenSwap),l=Je(),{state:n,depositBothTokens:u,closeSlippage:o}=l,d=_(()=>m.value&&r.userPoolsTokens[m.value.data.poolMint.toBase58()]||0),V=_(()=>t.poolBalance[t.from.mint]?b(t.poolBalance[t.from.mint],t.from.decimals):0),y=_(()=>t.poolBalance[t.to.mint]?b(t.poolBalance[t.to.mint],t.to.decimals):0),$=w=>ye.format(w);function S(){n.poolAmount=b(d.value,I)}const f=_(()=>Number(x(n.poolAmount,I))>d.value?"Insufficient funds":!1);return W([()=>n.poolAmount,d],()=>{n.active=!f.value}),(w,A)=>{const P=Ze,k=ce,g=ue;return M(),Y(z,{class:"swap-card__body"},{default:c(()=>[s(P),a("div",eo,[a("div",oo,[a("div",to,[a("div",ao,[no,a("div",lo,[e(f)?(M(),U("div",so," Insufficient funds ")):ee("",!0),N(" Balance: "+i(e(C)(e(b)(e(d),e(I)))),1)])])]),a("div",io,[s(oe,{modelValue:e(n).poolAmount,"onUpdate:modelValue":A[0]||(A[0]=T=>e(n).poolAmount=T),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:S},{default:c(()=>[N(" MAX ")]),_:1})]),_:1},8,["modelValue","onKeypress"])])])]),a("div",uo,[a("dl",co,[a("dt",null,"Min "+i(e(t).from.symbol.toUpperCase())+" received",1),a("dd",null,i(e(C)(e(b)(e(n).minAmountTokenA,e(t).from.decimals),e(t).from.decimals))+" "+i(e(t).from.symbol.toUpperCase()),1)]),a("dl",mo,[a("dt",null,"Min "+i(e(t).to.symbol.toUpperCase())+" received",1),a("dd",null,i(e(C)(e(b)(e(n).minAmountTokenB,e(t).to.decimals),e(t).to.decimals))+" "+i(e(t).to.symbol.toUpperCase()),1)]),a("dl",null,[ro,a("dd",null,[a("a",po,[N(i($(e(n).slippage))+" ",1),s(ge,{modelValue:e(n).slippageDialog,"onUpdate:modelValue":A[2]||(A[2]=T=>e(n).slippageDialog=T),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:c(()=>[s(ne,null,{default:c(()=>[s(z,null,{default:c(()=>[s(we,{modelValue:e(n).slippage,"onUpdate:modelValue":[A[1]||(A[1]=T=>e(n).slippage=T),e(o)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])]),a("dl",null,[ko,a("dd",null,i($(e(t).fees.ownerWithdraw))+" SOL",1)])]),s(k,{class:"q-mt-md"}),s(g,{class:"q-mt-md q-mx-auto"}),a("div",fo,[s(D,{loading:e(n).swapping,disable:!e(n).active||!e(m)||!e(n).poolAmount,rounded:"",ripple:!1,onClick:e(u)},{default:c(()=>[N(" Remove Liquidity ")]),_:1},8,["loading","disable","onClick"])]),e(m)?(M(),U("div",vo,[a("div",go,[s(D,{loading:e(B),class:"swap-card__reload",unelevated:"",color:w.$q.dark.isActive?"white":"primary",round:"",onClick:e(v)},{default:c(()=>[s(Ae,{name:e(Te),color:w.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(M(),U("div",_o," Pool not found ")),a("div",wo,[a("dl",null,[Ao,a("dd",null,i(e(b)(e(t).poolTokenSupply,e(I))),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).from.symbol)+" balance",1),a("dd",null,i(e(C)(e(V)))+" "+i(e(t).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).to.symbol)+" balance",1),a("dd",null,i(e(C)(e(y)))+" "+i(e(t).to.symbol),1)])]),s(Be,{showing:e(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Bo=me("liquidity",()=>{const Q=re(),r=ae(),t=pe(),{publicKey:B}=ke(),{notify:v}=fe(),m=H(),l=_(()=>m.tokenSwap),n=_(()=>m.state),u=_(()=>m.swapClient),o=_e({slippageDialog:!1,swapping:!1,active:!1,slippage:.01,poolAmount:0,amountTokenA:0,amountTokenB:0,maxAmountTokenA:0,maxAmountTokenB:0}),d=async(S=!1)=>{const f=Number((S?o.amountTokenB:o.amountTokenA)??0),w=Number(b(Number(n.value.poolBalance[n.value.from.mint]??0),n.value.from.decimals)),A=Number(b(Number(n.value.poolBalance[n.value.to.mint]??0),n.value.to.decimals)),P=S?w/A:A/w;if(f===0||Number.isNaN(f)){o.poolAmount=0,S?(o.amountTokenA=0,o.maxAmountTokenA=0):(o.amountTokenB=0,o.maxAmountTokenB=0);return}S?o.amountTokenA=Number(C(P*o.amountTokenB,n.value.to.decimals)):o.amountTokenB=Number(C(P*o.amountTokenA,n.value.from.decimals)),o.maxAmountTokenA=o.amountTokenA*(1+o.slippage),o.maxAmountTokenB=o.amountTokenB*(1+o.slippage);const k=o.amountTokenA,g=n.value.from;o.poolAmount=Math.floor(x(k,g.decimals)/n.value.poolBalance[g.mint]*n.value.poolTokenSupply)};W([()=>n.value.poolBalance,()=>o.slippage],()=>d(),{immediate:!0});function V(){m.loadPoolTokenAccounts(),m.reloadUserLP(),o.maxAmountTokenA=0,o.maxAmountTokenB=0,o.amountTokenA=0,o.amountTokenB=0}async function y(){if(!r.certificateValid)return ve();if(!l.value||!B.value){console.log("Pool is not selected...");return}t.value.publicKey||v({type:"info",message:"Please connect your wallet first"});const f=Number(x(o.amountTokenA??0,n.value.from.decimals)),w=Number(x(r.tokenBalance(n.value.from.mint)??0,n.value.from.decimals));if(f>w){v({type:"negative",message:`Insufficient balance ${n.value.from.symbol}.`});return}const A=Number(x(o.amountTokenA??0,n.value.to.decimals)),P=Number(x(r.tokenBalance(n.value.to.mint)??0,n.value.to.decimals));if(A>P){v({type:"negative",message:`Insufficient balance ${n.value.to.symbol}.`});return}try{o.swapping=!0;let k=o.amountTokenA,g=o.amountTokenB,T=n.value.from,L=n.value.to;l.value.data.tokenBMint.toBase58()===n.value.from.mint&&(k=o.amountTokenB,g=o.amountTokenA,T=n.value.to,L=n.value.from);const E=await F(l.value.data.tokenAMint,t.value.publicKey),j=await F(l.value.data.tokenBMint,t.value.publicKey),h=await F(l.value.data.poolMint,t.value.publicKey);console.log("slippage = ",o.slippage);const p=u.value.swapAuthority(l.value.pubkey);console.log("destination = ",h.toBase58()),console.log("userTokenA = ",E.toBase58()),console.log("userTokenB = ",j.toBase58()),console.log("swapAuthority = ",p.toBase58()),console.log("tokenSwap = ",l.value.pubkey.toBase58()),console.log("poolMint = ",l.value.data.poolMint.toBase58()),console.log("swapTokenA Mint = ",l.value.data.tokenAMint.toBase58()),console.log("swapTokenA = ",l.value.data.tokenA.toBase58()),console.log("swapTokenB Mint = ",l.value.data.tokenBMint.toBase58()),console.log("swapTokenB = ",l.value.data.tokenB.toBase58()),console.log("TokenA = ",T.symbol),console.log("maximumTokenA = ",k),console.log("maximumTokenA = ",x(k,T.decimals)),console.log("TokenB = ",L.symbol),console.log("maximumTokenB = ",g),console.log("maximumTokenB = ",x(g,L.decimals)),console.log("poolTokenAmount = ",o.poolAmount);const K=await u.value.depositAllTokenTypes({proofRequest:r.certificate?.pubkey,tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,destination:h,userTokenA:E,userTokenB:j,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:o.poolAmount,maximumTokenA:Math.floor(x(k,T.decimals)*(1+o.slippage)),maximumTokenB:Math.floor(x(g,L.decimals)*(1+o.slippage)),tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint},{commitment:"confirmed"});v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${K}?cluster=${Q.cluster}`,onClick:()=>!1}]}),V()}catch(k){console.log(k),console.error(k.logs),`${k}`.includes("User rejected the request")||v({type:"negative",message:`${k}`})}finally{o.swapping=!1}}function $(){o.slippageDialog=!1}return{state:o,calcRate:d,closeSlippage:$,depositBothTokens:y}}),yo={class:"swap-form"},ho={class:"swap-field"},bo={class:"swap-field__info"},So={class:"row items-end justify-end"},xo={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Mo={key:0,class:"insufficient-error"},$o={class:"swap-field q-pt-xs"},qo={class:"swap-field__info q-mt-sm"},Co={class:"row items-end justify-end"},Vo={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Po={key:0,class:"insufficient-error"},No={class:"swap-info q-mt-md q-pt-xs"},Uo={class:"text-weight-medium"},Io=a("dt",null,"LP tokens received",-1),Lo={class:"text-weight-medium"},Qo={class:"text-weight-medium"},Eo=a("dt",null,"Slippage Tolerance",-1),Ko={href:"#"},Do={class:"swap-submit q-mt-md"},jo={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},Fo={key:1,class:"row q-mt-md text-center relative-position full-width"},Wo={class:"absolute-right swap-rate__refresh"},Ro={class:"swap-info q-mt-lg q-pt-sm"},Ho=a("dt",null,"Your LP tokens",-1),Oo=G({__name:"DepositBothCard",setup(Q){const r=H(),{state:t,loadingPoolTokens:B,loadPoolTokenAccounts:v}=r,m=_(()=>r.tokenSwap),l=_(()=>m.value&&r.userPoolsTokens[m.value.data.poolMint.toBase58()]||0),n=Bo(),{state:u,depositBothTokens:o,calcRate:d,closeSlippage:V}=n,{handleSearchToken:y,handleFilterToken:$,tokens:S}=de();$(Z);const f=ae(),w=_(()=>t.poolBalance[t.from.mint]?b(t.poolBalance[t.from.mint],t.from.decimals):0),A=_(()=>t.poolBalance[t.to.mint]?b(t.poolBalance[t.to.mint],t.to.decimals):0),P=h=>ye.format(h),k=_(()=>f.tokenBalance(t.from.mint)),g=_(()=>f.tokenBalance(t.to.mint));function T(h,p){t[p?"to":"from"]=h}function L(h=!1){const p=h?"to":"from",K=h?"amountTokenB":"amountTokenA",O=h?g.value:k.value;t[p]?.mint===Z||t[p]?.mint===Pe?u[K]=O-Ne-3*Ue-Ie:u[K]=O,d(h)}const E=_(()=>Number(u.amountTokenA)>k.value?"Insufficient funds":!1),j=_(()=>Number(u.amountTokenB)>g.value?"Insufficient funds":!1);return W([()=>u.amountTokenA,k,()=>u.amountTokenB,g],h=>{u.active=!E.value&&!j.value}),(h,p)=>{const K=Fe,O=ce,he=ue;return M(),Y(z,{class:"swap-card__body"},{default:c(()=>[a("div",yo,[a("div",ho,[a("div",bo,[a("div",So,[a("div",xo,[e(E)?(M(),U("div",Mo,i(e(E)),1)):ee("",!0),N(" Balance: "+i(e(C)(e(k)))+" "+i(e(t).from.symbol),1)])])]),s(oe,{modelValue:e(u).amountTokenA,"onUpdate:modelValue":[p[1]||(p[1]=q=>e(u).amountTokenA=q),p[2]||(p[2]=q=>{const R=String(q);R[R.length-1]!=="."&&e(d)()})],maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:p[0]||(p[0]=q=>L())},{default:c(()=>[N(" MAX ")]),_:1}),s(K,{options:e(S),token:e(t).from,"swap-token":String(e(t).to.symbol),onHandleSearchToken:e(y),onSetToken:T},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),a("div",$o,[a("div",qo,[a("div",Co,[a("div",Vo,[e(j)?(M(),U("div",Po,i(e(j)),1)):ee("",!0),N(" Balance: "+i(e(C)(e(g)))+" "+i(e(t).to.symbol),1)])])]),s(oe,{modelValue:e(u).amountTokenB,"onUpdate:modelValue":[p[4]||(p[4]=q=>e(u).amountTokenB=q),p[5]||(p[5]=q=>{const R=String(q);R[R.length-1]!=="."&&e(d)(!0)})],maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:p[3]||(p[3]=q=>L(!0))},{default:c(()=>[N(" MAX ")]),_:1}),s(K,{"swap-token":String(e(t).from.symbol),options:e(S),direction:!0,token:e(t).to,"destination-unavailable":!e(m),onHandleSearchToken:e(y),onSetToken:T},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])])]),a("div",No,[a("dl",Uo,[Io,a("dd",null,i(e(b)(e(u).poolAmount,e(I))),1)]),a("dl",Lo,[a("dt",null,"Max "+i(e(t).from.symbol.toUpperCase())+" to be withdrawn",1),a("dd",null,i(e(C)(e(u).maxAmountTokenA,e(t).from.decimals))+" "+i(e(t).from.symbol.toUpperCase()),1)]),a("dl",Qo,[a("dt",null,"Max "+i(e(t).to.symbol.toUpperCase())+" to be withdrawn",1),a("dd",null,i(e(C)(e(u).maxAmountTokenB,e(t).to.decimals))+" "+i(e(t).to.symbol.toUpperCase()),1)]),a("dl",null,[Eo,a("dd",null,[a("a",Ko,[N(i(P(e(u).slippage))+" ",1),s(ge,{modelValue:e(u).slippageDialog,"onUpdate:modelValue":p[7]||(p[7]=q=>e(u).slippageDialog=q),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:c(()=>[s(ne,null,{default:c(()=>[s(z,null,{default:c(()=>[s(we,{modelValue:e(u).slippage,"onUpdate:modelValue":[p[6]||(p[6]=q=>e(u).slippage=q),e(V)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])])]),s(O,{class:"q-mt-md"}),s(he,{class:"q-mt-md q-mx-auto"}),a("div",Do,[s(D,{loading:e(u).swapping,disable:!e(u).active||!e(m)||!e(u).amountTokenA,rounded:"",ripple:!1,onClick:e(o)},{default:c(()=>[N(" Add Liquidity ")]),_:1},8,["loading","disable","onClick"])]),e(m)?(M(),U("div",Fo,[a("div",Wo,[s(D,{loading:e(B),class:"swap-card__reload",unelevated:"",color:h.$q.dark.isActive?"white":"primary",round:"",onClick:e(v)},{default:c(()=>[s(Ae,{name:e(Te),color:h.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(M(),U("div",jo," Pool not found ")),a("div",Ro,[a("dl",null,[Ho,a("dd",null,i(e(b)(e(l),e(I))),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).from.symbol)+" balance",1),a("dd",null,i(e(C)(e(w)))+" "+i(e(t).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).to.symbol)+" balance",1),a("dd",null,i(e(C)(e(A)))+" "+i(e(t).to.symbol),1)])]),s(Be,{showing:e(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Xo=G({__name:"LiquidityCard",setup(Q){const r=Le("withdraw-tab","deposit");return(t,B)=>{const v=Oo,m=To;return M(),Y(ne,{class:"liquidity-tabs swap-card swap-widget"},{default:c(()=>[s(Ee,{modelValue:e(r),"onUpdate:modelValue":B[0]||(B[0]=l=>J(r)?r.value=l:null),align:"justify","indicator-color":"transparent",class:Qe(t.$q.dark.isActive?"bg-blue-grey-9":"bg-grey-3"),"active-color":"white","active-bg-color":"primary"},{default:c(()=>[s(se,{ripple:!1,label:"Deposit",name:"deposit"}),s(se,{ripple:!1,label:"Withdraw",name:"withdraw"})]),_:1},8,["modelValue","class"]),s(Ke,{modelValue:e(r),"onUpdate:modelValue":B[1]||(B[1]=l=>J(r)?r.value=l:null),animated:"",class:"bg-transparent"},{default:c(()=>[s(ie,{name:"deposit"},{default:c(()=>[s(v)]),_:1}),s(ie,{name:"withdraw"},{default:c(()=>[s(m)]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),zo={},Go={class:"main-block row justify-center"},Yo={class:"row justify-center col-12"};function Zo(Q,r){const t=be,B=Xo,v=Se,m=xe;return M(),U(je,null,[s(t,{class:"q-mt-lg"}),a("div",Go,[a("div",Yo,[s(B)])]),s(v,{class:"q-mt-lg"}),s(m,{class:"q-mt-lg"})],64)}const it=De(zo,[["render",Zo]]);export{it as default}; +import{_ as be,a as Se,b as xe}from"./AppDescriptionTop-8f9fdf69.js";import{_ as ue}from"./PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js";import{_ as ce}from"./SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js";import{V as G,v as _,W as de,H as Z,G as Me,C as W,o as M,Y,Z as c,a3 as e,i as U,j as s,av as X,aw as $e,a2 as a,ax as qe,ay as Ce,az as le,a0 as N,a5 as i,as as J,aA as Ve,s as me,u as re,w as ae,x as pe,y as ke,z as fe,B as _e,aB as x,Q as ve,I as F,af as b,aC as I,a4 as ee,a6 as C,a7 as oe,a8 as D,ah as ge,$ as ne,a1 as z,ai as we,aj as Ae,ak as Te,a9 as Be,al as ye,X as Pe,ab as Ne,ac as Ue,N as Ie,A as Le,aD as se,aE as Qe,aF as Ee,aG as ie,aH as Ke,_ as De,ad as je}from"./index-3e319056.js";import{u as H}from"./swap-6005a05e.js";import{o as te,_ as Fe}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import"./PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js";import"./associatedTokenAccount-56e3fa33.js";const We={key:0,class:"select-token-pair__selected-prepend q-mr-xs"},Re=["src","alt"],He={key:1,class:"text-body2"},Oe={avatar:"",class:"row q-mr-sm q-pr-xs"},Xe=["src"],ze=["src"],Ge={class:"row items-center"},Ye=a("span",null,"/",-1),Ze=G({__name:"SelectPair",setup(Q){const r=H(),{state:t}=r,B=_(()=>r.tokenSwapsAllFiltered),{handleFilterToken:v,tokens:m}=de();v(Z);const l=_(()=>(B.value?.map(o=>({tokenA:o.data.tokenAMint.toBase58(),tokenB:o.data.tokenBMint.toBase58()})).filter((o,d,V)=>{const y=V.findIndex($=>$.tokenA===o.tokenA&&$.tokenB===o.tokenB||$.tokenA===o.tokenB&&$.tokenB===o.tokenA);return y===-1||y===d})).map(o=>{const d=m.value.find(y=>y.mint===o.tokenA),V=m.value.find(y=>y.mint===o.tokenB);return{value:{tokenA:d,tokenB:V},label:`${d?.symbol}/${V?.symbol}`}}).filter(o=>o.value.tokenA&&o.value.tokenB)),n=Me();return W([()=>t.from,()=>t.to,l],([u,o])=>{n.value=l.value.find(d=>u.mint===d.value.tokenA?.mint&&o.mint===d.value.tokenB?.mint||u.mint===d.value.tokenB?.mint&&o.mint===d.value.tokenA?.mint)},{immediate:!0}),W(n,()=>{n.value&&(t.from=n.value.value.tokenA,t.to=n.value.value.tokenB)},{immediate:!0}),(u,o)=>(M(),Y(Ve,{modelValue:e(n),"onUpdate:modelValue":o[0]||(o[0]=d=>J(n)?n.value=d:null),"option-disable":"inactive","popup-content-class":"select-token-pair-popup transition-duration",outlined:"",options:e(l),dense:"","options-dense":!1,class:"select-token-pair",standout:!1},{prepend:c(()=>[e(n)?(M(),U("div",We,[s(X,null,{default:c(()=>[s($e,{src:e(n)?.value.tokenA.image,alt:e(n)?.value.tokenA.symbol},null,8,["src","alt"])]),_:1}),s(X,null,{default:c(()=>[a("img",{src:e(n)?.value.tokenB.image,alt:e(n)?.value.tokenB.symbol},null,8,Re)]),_:1})])):(M(),U("div",He," Select a pair of tokens "))]),option:c(d=>[s(qe,Ce(d.itemProps,{class:"token-select__token items-center"}),{default:c(()=>[a("div",Oe,[s(X,null,{default:c(()=>[a("img",{src:d.opt.value.tokenA.image},null,8,Xe)]),_:2},1024),s(X,null,{default:c(()=>[a("img",{src:d.opt.value.tokenB.image},null,8,ze)]),_:2},1024)]),a("div",Ge,[s(le,null,{default:c(()=>[N(i(d.opt.value.tokenA.symbol),1)]),_:2},1024),Ye,s(le,null,{default:c(()=>[N(i(d.opt.value.tokenB.symbol),1)]),_:2},1024)])]),_:2},1040)]),_:1},8,["modelValue","options"]))}}),Je=me("liquidity-withdraw",()=>{const Q=re(),r=ae(),t=pe(),{publicKey:B}=ke(),{notify:v}=fe(),m=H(),l=_(()=>m.tokenSwap),n=_(()=>m.state),u=_(()=>m.swapClient),o=_e({slippageDialog:!1,swapping:!1,active:!1,slippage:.01,poolAmount:0,minAmountTokenA:0,minAmountTokenB:0}),d=async()=>{const S=x(o.poolAmount,I)/n.value.poolTokenSupply;(o.poolAmount===0||Number.isNaN(o.poolAmount))&&(o.minAmountTokenA=0,o.minAmountTokenB=0),o.minAmountTokenA=Math.floor(S*n.value.poolBalance[n.value.from.mint]*(1-o.slippage)*(1-n.value.fees.ownerWithdraw)),o.minAmountTokenB=Math.floor(S*n.value.poolBalance[n.value.to.mint]*(1-o.slippage)*(1-n.value.fees.ownerWithdraw))};W([()=>n.value.poolBalance,()=>o.poolAmount,()=>o.slippage],()=>d(),{immediate:!0});function V(){m.loadPoolTokenAccounts(),m.reloadUserLP(),o.poolAmount=0}async function y(){if(!r.certificateValid)return ve();if(!l.value||!B.value){console.log("Pool is not selected...");return}if(t.value.publicKey||v({type:"info",message:"Please connect your wallet first"}),o.poolAmount>m.userPoolsTokens[l.value.data.poolMint.toBase58()]){v({type:"negative",message:"Insufficient LP tokens balance"});return}try{o.swapping=!0;let f=o.minAmountTokenA,w=o.minAmountTokenB,A=n.value.from,P=n.value.to;l.value.data.tokenBMint.toBase58()===n.value.from.mint&&(f=o.minAmountTokenB,w=o.minAmountTokenA,A=n.value.to,P=n.value.from);const k=await F(l.value.data.tokenAMint,t.value.publicKey),g=await F(l.value.data.tokenBMint,t.value.publicKey),T=await F(l.value.data.poolMint,t.value.publicKey);console.log("slippage = ",o.slippage);const L=u.value.swapAuthority(l.value.pubkey);console.log("source = ",T.toBase58()),console.log("destTokenA = ",k.toBase58()),console.log("destTokenB = ",g.toBase58()),console.log("swapAuthority = ",L.toBase58()),console.log("tokenSwap = ",l.value.pubkey.toBase58()),console.log("poolMint = ",l.value.data.poolMint.toBase58()),console.log("swapTokenA Mint = ",l.value.data.tokenAMint.toBase58()),console.log("swapTokenA = ",l.value.data.tokenA.toBase58()),console.log("swapTokenB Mint = ",l.value.data.tokenBMint.toBase58()),console.log("swapTokenB = ",l.value.data.tokenB.toBase58()),console.log("TokenA = ",A.symbol),console.log("minimumTokenA = ",f),console.log("minimumTokenA = ",b(f,A.decimals)),console.log("TokenB = ",P.symbol),console.log("minimumTokenB = ",w),console.log("minimumTokenB = ",b(w,P.decimals)),console.log("poolTokenAmount = ",o.poolAmount),console.log("poolTokenAmount = ",x(o.poolAmount,I)),console.log({tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,poolFee:l.value.data.poolFeeAccount,source:T,destTokenA:k,destTokenB:g,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:x(o.poolAmount,I),minimumTokenA:f,minimumTokenB:w,tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint});const E=await u.value.withdrawAllTokenTypes({tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,poolFee:l.value.data.poolFeeAccount,source:T,destTokenA:k,destTokenB:g,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:x(o.poolAmount,I),minimumTokenA:f,minimumTokenB:w,tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint},{commitment:"confirmed"});v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${E}?cluster=${Q.cluster}`,onClick:()=>!1}]}),V()}catch(f){console.log(f),console.error(f.logs),`${f}`.includes("User rejected the request")||v({type:"negative",message:`${f}`})}finally{o.swapping=!1}}function $(){o.slippageDialog=!1}return{state:o,closeSlippage:$,depositBothTokens:y}}),eo={class:"swap-form q-mt-md"},oo={class:"swap-field"},to={class:"swap-field__info"},ao={class:"row"},no=a("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),lo={class:"col row justify-end swap-field__balance q-pr-sm"},so={key:0,class:"insufficient-error"},io={class:"row justify-between",style:{gap:"10px"}},uo={class:"swap-info q-mt-md q-pt-xs"},co={class:"text-weight-medium"},mo={class:"text-weight-medium"},ro=a("dt",null,"Slippage Tolerance",-1),po={href:"#"},ko=a("dt",null,"Withdraw fee",-1),fo={class:"swap-submit q-mt-md"},_o={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},vo={key:1,class:"row q-mt-md text-center relative-position full-width"},go={class:"absolute-right swap-rate__refresh"},wo={class:"swap-info q-mt-lg q-pt-sm"},Ao=a("dt",null,"LP tokens total",-1),To=G({__name:"WithdrawBothCard",setup(Q){const r=H(),{state:t,loadingPoolTokens:B,loadPoolTokenAccounts:v}=r,m=_(()=>r.tokenSwap),l=Je(),{state:n,depositBothTokens:u,closeSlippage:o}=l,d=_(()=>m.value&&r.userPoolsTokens[m.value.data.poolMint.toBase58()]||0),V=_(()=>t.poolBalance[t.from.mint]?b(t.poolBalance[t.from.mint],t.from.decimals):0),y=_(()=>t.poolBalance[t.to.mint]?b(t.poolBalance[t.to.mint],t.to.decimals):0),$=w=>ye.format(w);function S(){n.poolAmount=b(d.value,I)}const f=_(()=>Number(x(n.poolAmount,I))>d.value?"Insufficient funds":!1);return W([()=>n.poolAmount,d],()=>{n.active=!f.value}),(w,A)=>{const P=Ze,k=ce,g=ue;return M(),Y(z,{class:"swap-card__body"},{default:c(()=>[s(P),a("div",eo,[a("div",oo,[a("div",to,[a("div",ao,[no,a("div",lo,[e(f)?(M(),U("div",so," Insufficient funds ")):ee("",!0),N(" Balance: "+i(e(C)(e(b)(e(d),e(I)))),1)])])]),a("div",io,[s(oe,{modelValue:e(n).poolAmount,"onUpdate:modelValue":A[0]||(A[0]=T=>e(n).poolAmount=T),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:S},{default:c(()=>[N(" MAX ")]),_:1})]),_:1},8,["modelValue","onKeypress"])])])]),a("div",uo,[a("dl",co,[a("dt",null,"Min "+i(e(t).from.symbol.toUpperCase())+" received",1),a("dd",null,i(e(C)(e(b)(e(n).minAmountTokenA,e(t).from.decimals),e(t).from.decimals))+" "+i(e(t).from.symbol.toUpperCase()),1)]),a("dl",mo,[a("dt",null,"Min "+i(e(t).to.symbol.toUpperCase())+" received",1),a("dd",null,i(e(C)(e(b)(e(n).minAmountTokenB,e(t).to.decimals),e(t).to.decimals))+" "+i(e(t).to.symbol.toUpperCase()),1)]),a("dl",null,[ro,a("dd",null,[a("a",po,[N(i($(e(n).slippage))+" ",1),s(ge,{modelValue:e(n).slippageDialog,"onUpdate:modelValue":A[2]||(A[2]=T=>e(n).slippageDialog=T),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:c(()=>[s(ne,null,{default:c(()=>[s(z,null,{default:c(()=>[s(we,{modelValue:e(n).slippage,"onUpdate:modelValue":[A[1]||(A[1]=T=>e(n).slippage=T),e(o)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])]),a("dl",null,[ko,a("dd",null,i($(e(t).fees.ownerWithdraw))+" SOL",1)])]),s(k,{class:"q-mt-md"}),s(g,{class:"q-mt-md q-mx-auto"}),a("div",fo,[s(D,{loading:e(n).swapping,disable:!e(n).active||!e(m)||!e(n).poolAmount,rounded:"",ripple:!1,onClick:e(u)},{default:c(()=>[N(" Remove Liquidity ")]),_:1},8,["loading","disable","onClick"])]),e(m)?(M(),U("div",vo,[a("div",go,[s(D,{loading:e(B),class:"swap-card__reload",unelevated:"",color:w.$q.dark.isActive?"white":"primary",round:"",onClick:e(v)},{default:c(()=>[s(Ae,{name:e(Te),color:w.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(M(),U("div",_o," Pool not found ")),a("div",wo,[a("dl",null,[Ao,a("dd",null,i(e(b)(e(t).poolTokenSupply,e(I))),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).from.symbol)+" balance",1),a("dd",null,i(e(C)(e(V)))+" "+i(e(t).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).to.symbol)+" balance",1),a("dd",null,i(e(C)(e(y)))+" "+i(e(t).to.symbol),1)])]),s(Be,{showing:e(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Bo=me("liquidity",()=>{const Q=re(),r=ae(),t=pe(),{publicKey:B}=ke(),{notify:v}=fe(),m=H(),l=_(()=>m.tokenSwap),n=_(()=>m.state),u=_(()=>m.swapClient),o=_e({slippageDialog:!1,swapping:!1,active:!1,slippage:.01,poolAmount:0,amountTokenA:0,amountTokenB:0,maxAmountTokenA:0,maxAmountTokenB:0}),d=async(S=!1)=>{const f=Number((S?o.amountTokenB:o.amountTokenA)??0),w=Number(b(Number(n.value.poolBalance[n.value.from.mint]??0),n.value.from.decimals)),A=Number(b(Number(n.value.poolBalance[n.value.to.mint]??0),n.value.to.decimals)),P=S?w/A:A/w;if(f===0||Number.isNaN(f)){o.poolAmount=0,S?(o.amountTokenA=0,o.maxAmountTokenA=0):(o.amountTokenB=0,o.maxAmountTokenB=0);return}S?o.amountTokenA=Number(C(P*o.amountTokenB,n.value.to.decimals)):o.amountTokenB=Number(C(P*o.amountTokenA,n.value.from.decimals)),o.maxAmountTokenA=o.amountTokenA*(1+o.slippage),o.maxAmountTokenB=o.amountTokenB*(1+o.slippage);const k=o.amountTokenA,g=n.value.from;o.poolAmount=Math.floor(x(k,g.decimals)/n.value.poolBalance[g.mint]*n.value.poolTokenSupply)};W([()=>n.value.poolBalance,()=>o.slippage],()=>d(),{immediate:!0});function V(){m.loadPoolTokenAccounts(),m.reloadUserLP(),o.maxAmountTokenA=0,o.maxAmountTokenB=0,o.amountTokenA=0,o.amountTokenB=0}async function y(){if(!r.certificateValid)return ve();if(!l.value||!B.value){console.log("Pool is not selected...");return}t.value.publicKey||v({type:"info",message:"Please connect your wallet first"});const f=Number(x(o.amountTokenA??0,n.value.from.decimals)),w=Number(x(r.tokenBalance(n.value.from.mint)??0,n.value.from.decimals));if(f>w){v({type:"negative",message:`Insufficient balance ${n.value.from.symbol}.`});return}const A=Number(x(o.amountTokenA??0,n.value.to.decimals)),P=Number(x(r.tokenBalance(n.value.to.mint)??0,n.value.to.decimals));if(A>P){v({type:"negative",message:`Insufficient balance ${n.value.to.symbol}.`});return}try{o.swapping=!0;let k=o.amountTokenA,g=o.amountTokenB,T=n.value.from,L=n.value.to;l.value.data.tokenBMint.toBase58()===n.value.from.mint&&(k=o.amountTokenB,g=o.amountTokenA,T=n.value.to,L=n.value.from);const E=await F(l.value.data.tokenAMint,t.value.publicKey),j=await F(l.value.data.tokenBMint,t.value.publicKey),h=await F(l.value.data.poolMint,t.value.publicKey);console.log("slippage = ",o.slippage);const p=u.value.swapAuthority(l.value.pubkey);console.log("destination = ",h.toBase58()),console.log("userTokenA = ",E.toBase58()),console.log("userTokenB = ",j.toBase58()),console.log("swapAuthority = ",p.toBase58()),console.log("tokenSwap = ",l.value.pubkey.toBase58()),console.log("poolMint = ",l.value.data.poolMint.toBase58()),console.log("swapTokenA Mint = ",l.value.data.tokenAMint.toBase58()),console.log("swapTokenA = ",l.value.data.tokenA.toBase58()),console.log("swapTokenB Mint = ",l.value.data.tokenBMint.toBase58()),console.log("swapTokenB = ",l.value.data.tokenB.toBase58()),console.log("TokenA = ",T.symbol),console.log("maximumTokenA = ",k),console.log("maximumTokenA = ",x(k,T.decimals)),console.log("TokenB = ",L.symbol),console.log("maximumTokenB = ",g),console.log("maximumTokenB = ",x(g,L.decimals)),console.log("poolTokenAmount = ",o.poolAmount);const K=await u.value.depositAllTokenTypes({proofRequest:r.certificate?.pubkey,tokenSwap:l.value.pubkey,poolMint:l.value.data.poolMint,destination:h,userTokenA:E,userTokenB:j,swapTokenA:l.value.data.tokenA,swapTokenB:l.value.data.tokenB,poolTokenAmount:o.poolAmount,maximumTokenA:Math.floor(x(k,T.decimals)*(1+o.slippage)),maximumTokenB:Math.floor(x(g,L.decimals)*(1+o.slippage)),tokenAMint:l.value.data.tokenAMint,tokenBMint:l.value.data.tokenBMint},{commitment:"confirmed"});v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${K}?cluster=${Q.cluster}`,onClick:()=>!1}]}),V()}catch(k){console.log(k),console.error(k.logs),`${k}`.includes("User rejected the request")||v({type:"negative",message:`${k}`})}finally{o.swapping=!1}}function $(){o.slippageDialog=!1}return{state:o,calcRate:d,closeSlippage:$,depositBothTokens:y}}),yo={class:"swap-form"},ho={class:"swap-field"},bo={class:"swap-field__info"},So={class:"row items-end justify-end"},xo={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Mo={key:0,class:"insufficient-error"},$o={class:"swap-field q-pt-xs"},qo={class:"swap-field__info q-mt-sm"},Co={class:"row items-end justify-end"},Vo={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Po={key:0,class:"insufficient-error"},No={class:"swap-info q-mt-md q-pt-xs"},Uo={class:"text-weight-medium"},Io=a("dt",null,"LP tokens received",-1),Lo={class:"text-weight-medium"},Qo={class:"text-weight-medium"},Eo=a("dt",null,"Slippage Tolerance",-1),Ko={href:"#"},Do={class:"swap-submit q-mt-md"},jo={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},Fo={key:1,class:"row q-mt-md text-center relative-position full-width"},Wo={class:"absolute-right swap-rate__refresh"},Ro={class:"swap-info q-mt-lg q-pt-sm"},Ho=a("dt",null,"Your LP tokens",-1),Oo=G({__name:"DepositBothCard",setup(Q){const r=H(),{state:t,loadingPoolTokens:B,loadPoolTokenAccounts:v}=r,m=_(()=>r.tokenSwap),l=_(()=>m.value&&r.userPoolsTokens[m.value.data.poolMint.toBase58()]||0),n=Bo(),{state:u,depositBothTokens:o,calcRate:d,closeSlippage:V}=n,{handleSearchToken:y,handleFilterToken:$,tokens:S}=de();$(Z);const f=ae(),w=_(()=>t.poolBalance[t.from.mint]?b(t.poolBalance[t.from.mint],t.from.decimals):0),A=_(()=>t.poolBalance[t.to.mint]?b(t.poolBalance[t.to.mint],t.to.decimals):0),P=h=>ye.format(h),k=_(()=>f.tokenBalance(t.from.mint)),g=_(()=>f.tokenBalance(t.to.mint));function T(h,p){t[p?"to":"from"]=h}function L(h=!1){const p=h?"to":"from",K=h?"amountTokenB":"amountTokenA",O=h?g.value:k.value;t[p]?.mint===Z||t[p]?.mint===Pe?u[K]=O-Ne-3*Ue-Ie:u[K]=O,d(h)}const E=_(()=>Number(u.amountTokenA)>k.value?"Insufficient funds":!1),j=_(()=>Number(u.amountTokenB)>g.value?"Insufficient funds":!1);return W([()=>u.amountTokenA,k,()=>u.amountTokenB,g],h=>{u.active=!E.value&&!j.value}),(h,p)=>{const K=Fe,O=ce,he=ue;return M(),Y(z,{class:"swap-card__body"},{default:c(()=>[a("div",yo,[a("div",ho,[a("div",bo,[a("div",So,[a("div",xo,[e(E)?(M(),U("div",Mo,i(e(E)),1)):ee("",!0),N(" Balance: "+i(e(C)(e(k)))+" "+i(e(t).from.symbol),1)])])]),s(oe,{modelValue:e(u).amountTokenA,"onUpdate:modelValue":[p[1]||(p[1]=q=>e(u).amountTokenA=q),p[2]||(p[2]=q=>{const R=String(q);R[R.length-1]!=="."&&e(d)()})],maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:p[0]||(p[0]=q=>L())},{default:c(()=>[N(" MAX ")]),_:1}),s(K,{options:e(S),token:e(t).from,"swap-token":String(e(t).to.symbol),onHandleSearchToken:e(y),onSetToken:T},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),a("div",$o,[a("div",qo,[a("div",Co,[a("div",Vo,[e(j)?(M(),U("div",Po,i(e(j)),1)):ee("",!0),N(" Balance: "+i(e(C)(e(g)))+" "+i(e(t).to.symbol),1)])])]),s(oe,{modelValue:e(u).amountTokenB,"onUpdate:modelValue":[p[4]||(p[4]=q=>e(u).amountTokenB=q),p[5]||(p[5]=q=>{const R=String(q);R[R.length-1]!=="."&&e(d)(!0)})],maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(te)},{append:c(()=>[s(D,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:p[3]||(p[3]=q=>L(!0))},{default:c(()=>[N(" MAX ")]),_:1}),s(K,{"swap-token":String(e(t).from.symbol),options:e(S),direction:!0,token:e(t).to,"destination-unavailable":!e(m),onHandleSearchToken:e(y),onSetToken:T},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])])]),a("div",No,[a("dl",Uo,[Io,a("dd",null,i(e(b)(e(u).poolAmount,e(I))),1)]),a("dl",Lo,[a("dt",null,"Max "+i(e(t).from.symbol.toUpperCase())+" to be withdrawn",1),a("dd",null,i(e(C)(e(u).maxAmountTokenA,e(t).from.decimals))+" "+i(e(t).from.symbol.toUpperCase()),1)]),a("dl",Qo,[a("dt",null,"Max "+i(e(t).to.symbol.toUpperCase())+" to be withdrawn",1),a("dd",null,i(e(C)(e(u).maxAmountTokenB,e(t).to.decimals))+" "+i(e(t).to.symbol.toUpperCase()),1)]),a("dl",null,[Eo,a("dd",null,[a("a",Ko,[N(i(P(e(u).slippage))+" ",1),s(ge,{modelValue:e(u).slippageDialog,"onUpdate:modelValue":p[7]||(p[7]=q=>e(u).slippageDialog=q),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:c(()=>[s(ne,null,{default:c(()=>[s(z,null,{default:c(()=>[s(we,{modelValue:e(u).slippage,"onUpdate:modelValue":[p[6]||(p[6]=q=>e(u).slippage=q),e(V)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])])]),s(O,{class:"q-mt-md"}),s(he,{class:"q-mt-md q-mx-auto"}),a("div",Do,[s(D,{loading:e(u).swapping,disable:!e(u).active||!e(m)||!e(u).amountTokenA,rounded:"",ripple:!1,onClick:e(o)},{default:c(()=>[N(" Add Liquidity ")]),_:1},8,["loading","disable","onClick"])]),e(m)?(M(),U("div",Fo,[a("div",Wo,[s(D,{loading:e(B),class:"swap-card__reload",unelevated:"",color:h.$q.dark.isActive?"white":"primary",round:"",onClick:e(v)},{default:c(()=>[s(Ae,{name:e(Te),color:h.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(M(),U("div",jo," Pool not found ")),a("div",Ro,[a("dl",null,[Ho,a("dd",null,i(e(b)(e(l),e(I))),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).from.symbol)+" balance",1),a("dd",null,i(e(C)(e(w)))+" "+i(e(t).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+i(e(t).to.symbol)+" balance",1),a("dd",null,i(e(C)(e(A)))+" "+i(e(t).to.symbol),1)])]),s(Be,{showing:e(t)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Xo=G({__name:"LiquidityCard",setup(Q){const r=Le("withdraw-tab","deposit");return(t,B)=>{const v=Oo,m=To;return M(),Y(ne,{class:"liquidity-tabs swap-card swap-widget"},{default:c(()=>[s(Ee,{modelValue:e(r),"onUpdate:modelValue":B[0]||(B[0]=l=>J(r)?r.value=l:null),align:"justify","indicator-color":"transparent",class:Qe(t.$q.dark.isActive?"bg-blue-grey-9":"bg-grey-3"),"active-color":"white","active-bg-color":"primary"},{default:c(()=>[s(se,{ripple:!1,label:"Deposit",name:"deposit"}),s(se,{ripple:!1,label:"Withdraw",name:"withdraw"})]),_:1},8,["modelValue","class"]),s(Ke,{modelValue:e(r),"onUpdate:modelValue":B[1]||(B[1]=l=>J(r)?r.value=l:null),animated:"",class:"bg-transparent"},{default:c(()=>[s(ie,{name:"deposit"},{default:c(()=>[s(v)]),_:1}),s(ie,{name:"withdraw"},{default:c(()=>[s(m)]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),zo={},Go={class:"main-block row justify-center"},Yo={class:"row justify-center col-12"};function Zo(Q,r){const t=be,B=Xo,v=Se,m=xe;return M(),U(je,null,[s(t,{class:"q-mt-lg"}),a("div",Go,[a("div",Yo,[s(B)])]),s(v,{class:"q-mt-lg"}),s(m,{class:"q-mt-lg"})],64)}const it=De(zo,[["render",Zo]]);export{it as default}; diff --git a/assets/liquidity-single-b7dcfc19.js b/assets/liquidity-single-814c9e3f.js similarity index 92% rename from assets/liquidity-single-b7dcfc19.js rename to assets/liquidity-single-814c9e3f.js index b9427a1..cce400b 100644 --- a/assets/liquidity-single-b7dcfc19.js +++ b/assets/liquidity-single-814c9e3f.js @@ -1 +1 @@ -import{_ as W,a as O,b as z}from"./AppDescriptionTop-ae09eb9e.js";import{_ as X}from"./SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js";import{o as G,_ as Y}from"./SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js";import{s as Z,u as J,x as ee,y as oe,z as ne,v as i,B as ae,I as V,aB as te,V as se,W as le,H as I,w as ie,af as L,G as ce,C as re,o as w,Y as de,Z as d,$ as ue,j as a,a0 as S,a1 as D,a2 as n,a3 as e,i as b,a5 as l,a4 as pe,a6 as T,a7 as F,a8 as y,ag as me,aj as _e,ak as fe,a9 as ke,X as we,ab as ge,ac as ve,N as he,_ as Se,ad as Te}from"./index-d1afe763.js";import{s as ye}from"./swap-circle-a93e350f.js";import{u as H,S as be}from"./swap-a8389507.js";import"./PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js";import"./associatedTokenAccount-50901cf8.js";const Ae=Z("liquidity-single",()=>{const A=J(),p=ee(),{publicKey:o}=oe(),{notify:m}=ne(),c=H(),s=i(()=>c.tokenSwap),u=i(()=>c.state),B=i(()=>c.swapClient),t=ae({swapping:!1,active:!1,amountTokenA:0});function C(){c.loadPoolTokenAccounts(),c.reloadUserLP(),t.amountTokenA=0}async function g(){if(!s.value||!o.value){console.log("Pool is not selected...");return}try{t.swapping=!0;const r=u.value.direction===be.ASC?s.value.data.tokenAMint:s.value.data.tokenBMint,v=await V(r,p.value.publicKey),h=await V(s.value.data.poolMint,p.value.publicKey),q=Number(te(t.amountTokenA??0,u.value.from.decimals)),x=await B.value.depositSingleTokenTypeExactAmountIn({tokenSwap:s.value?.pubkey,poolMint:s.value.data.poolMint,sourceTokenMint:r,source:v,destination:h,swapTokenA:s.value.data.tokenA,swapTokenB:s.value.data.tokenB,sourceTokenAmount:q,minimumPoolTokenAmount:0});C(),m({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${x}?cluster=${A.cluster}`,onClick:()=>!1}]})}catch(r){console.log(r),console.error(r.logs),`${r}`.includes("User rejected the request")||m({type:"negative",message:`${r}`})}finally{t.swapping=!1}}return{state:t,depositSingleToken:g}}),Be={class:"swap-form"},Ce={class:"swap-field"},qe={class:"swap-field__info"},xe={class:"row items-end"},Me=n("div",{class:"col swap-field__label"},null,-1),Ne={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Ee={key:0,class:"insufficient-error"},$e={class:"swap-change"},Pe=["innerHTML"],Ve={class:"swap-field"},Ie={class:"swap-field__info q-mt-sm"},Le={class:"row"},De={class:"col swap-field__balance"},Fe={class:"swap-submit q-mt-lg"},He={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},Qe={key:1,class:"row q-mt-md text-center relative-position full-width"},Re={class:"absolute-right swap-rate__refresh"},je={class:"swap-info q-mt-lg"},Ke=se({__name:"DepositSingleCard",setup(A){const p=H(),{state:o,loadingPoolTokens:m,changeDirection:c,loadPoolTokenAccounts:s}=p,u=i(()=>p.tokenSwap),B=Ae(),{state:t,depositSingleToken:C}=B,{handleSearchToken:g,handleFilterToken:r,tokens:v}=le();r(I);const h=ie(),q=i(()=>o.poolBalance[o.from.mint]?L(o.poolBalance[o.from.mint],o.from.decimals):0),x=i(()=>o.poolBalance[o.to.mint]?L(o.poolBalance[o.to.mint],o.to.decimals):0),E=ce(0),Q=i(()=>`transform: rotate(${E.value*180}deg)`),f=i(()=>h.tokenBalance(o.from.mint)),R=i(()=>h.tokenBalance(o.to.mint));function j(){c(),E.value++}function $(k,_){o[_?"to":"from"]=k}function K(){o.from?.mint===I||o.from?.mint===we?t.amountTokenA=f.value-ge-3*ve-he:t.amountTokenA=f.value}const M=i(()=>Number(t.amountTokenA)>f.value?"Insufficient funds":!1);return re([()=>t.amountTokenA,u,f],k=>{t.active=!M.value}),(k,_)=>{const P=Y,U=X;return w(),de(ue,{class:"swap-card swap-widget"},{default:d(()=>[a(D,{class:"swap-card__header"},{default:d(()=>[S(" Deposit ")]),_:1}),a(D,{class:"swap-card__body"},{default:d(()=>[n("div",Be,[n("div",Ce,[n("div",qe,[n("div",xe,[Me,n("div",Ne,[e(M)?(w(),b("div",Ee,l(e(M)),1)):pe("",!0),S(" Balance: "+l(e(T)(e(f)))+" "+l(e(o).from.symbol),1)])])]),a(F,{modelValue:e(t).amountTokenA,"onUpdate:modelValue":_[0]||(_[0]=N=>e(t).amountTokenA=N),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(G)},{append:d(()=>[a(y,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:K},{default:d(()=>[S(" MAX ")]),_:1}),a(P,{options:e(v),token:e(o).from,"swap-token":String(e(o).to.symbol),onHandleSearchToken:e(g),onSetToken:$},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),n("div",$e,[a(y,{ripple:!1,dense:"",unelevated:"",style:me(e(Q)),onClick:j},{default:d(()=>[n("i",{innerHTML:e(ye)},null,8,Pe)]),_:1},8,["style"])]),n("div",Ve,[n("div",Ie,[n("div",Le,[n("div",De," Balance: "+l(e(T)(e(R)))+" "+l(e(o).to.symbol),1)])]),a(F,{modelValue:void 0,"onUpdate:modelValue":_[1]||(_[1]=N=>undefined=N),readonly:"",outlined:"",class:"swap-input"},{append:d(()=>[a(P,{"swap-token":String(e(o).from.symbol),options:e(v),direction:!0,token:e(o).to,"destination-unavailable":!e(u),onHandleSearchToken:e(g),onSetToken:$},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1})])]),a(U,{class:"q-mt-md"}),n("div",Fe,[a(y,{loading:e(t).swapping,disable:!e(t).active||!e(u)||!e(t).amountTokenA,rounded:"",ripple:!1,onClick:e(C)},{default:d(()=>[S(" Add Liquidity ("+l(e(o).from.symbol)+") ",1)]),_:1},8,["loading","disable","onClick"])]),e(u)?(w(),b("div",Qe,[n("div",Re,[a(y,{loading:e(m),class:"swap-card__reload",unelevated:"",color:k.$q.dark.isActive?"white":"primary",round:"",onClick:e(s)},{default:d(()=>[a(_e,{name:e(fe),color:k.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(w(),b("div",He," Pool not found ")),n("div",je,[n("dl",null,[n("dt",null,"Pool "+l(e(o).from.symbol)+" balance",1),n("dd",null,l(e(T)(e(q))),1)]),n("dl",null,[n("dt",null,"Pool "+l(e(o).to.symbol)+" balance",1),n("dd",null,l(e(T)(e(x))),1)])])]),_:1}),a(ke,{showing:e(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Ue={},We={class:"main-block row justify-center"};function Oe(A,p){const o=W,m=Ke,c=O,s=z;return w(),b(Te,null,[a(o,{class:"q-mt-lg"}),n("div",We,[a(m)]),a(c,{class:"q-mt-lg"}),a(s,{class:"q-mt-lg"})],64)}const no=Se(Ue,[["render",Oe]]);export{no as default}; +import{_ as W,a as O,b as z}from"./AppDescriptionTop-8f9fdf69.js";import{_ as X}from"./SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js";import{o as G,_ as Y}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import{s as Z,u as J,x as ee,y as oe,z as ne,v as i,B as ae,I as V,aB as te,V as se,W as le,H as I,w as ie,af as L,G as ce,C as re,o as w,Y as de,Z as d,$ as ue,j as a,a0 as S,a1 as D,a2 as n,a3 as e,i as b,a5 as l,a4 as pe,a6 as T,a7 as F,a8 as y,ag as me,aj as _e,ak as fe,a9 as ke,X as we,ab as ge,ac as ve,N as he,_ as Se,ad as Te}from"./index-3e319056.js";import{s as ye}from"./swap-circle-a93e350f.js";import{u as H,S as be}from"./swap-6005a05e.js";import"./PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js";import"./associatedTokenAccount-56e3fa33.js";const Ae=Z("liquidity-single",()=>{const A=J(),p=ee(),{publicKey:o}=oe(),{notify:m}=ne(),c=H(),s=i(()=>c.tokenSwap),u=i(()=>c.state),B=i(()=>c.swapClient),t=ae({swapping:!1,active:!1,amountTokenA:0});function C(){c.loadPoolTokenAccounts(),c.reloadUserLP(),t.amountTokenA=0}async function g(){if(!s.value||!o.value){console.log("Pool is not selected...");return}try{t.swapping=!0;const r=u.value.direction===be.ASC?s.value.data.tokenAMint:s.value.data.tokenBMint,v=await V(r,p.value.publicKey),h=await V(s.value.data.poolMint,p.value.publicKey),q=Number(te(t.amountTokenA??0,u.value.from.decimals)),x=await B.value.depositSingleTokenTypeExactAmountIn({tokenSwap:s.value?.pubkey,poolMint:s.value.data.poolMint,sourceTokenMint:r,source:v,destination:h,swapTokenA:s.value.data.tokenA,swapTokenB:s.value.data.tokenB,sourceTokenAmount:q,minimumPoolTokenAmount:0});C(),m({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${x}?cluster=${A.cluster}`,onClick:()=>!1}]})}catch(r){console.log(r),console.error(r.logs),`${r}`.includes("User rejected the request")||m({type:"negative",message:`${r}`})}finally{t.swapping=!1}}return{state:t,depositSingleToken:g}}),Be={class:"swap-form"},Ce={class:"swap-field"},qe={class:"swap-field__info"},xe={class:"row items-end"},Me=n("div",{class:"col swap-field__label"},null,-1),Ne={class:"col-8 col-xs-10 row justify-end swap-field__balance"},Ee={key:0,class:"insufficient-error"},$e={class:"swap-change"},Pe=["innerHTML"],Ve={class:"swap-field"},Ie={class:"swap-field__info q-mt-sm"},Le={class:"row"},De={class:"col swap-field__balance"},Fe={class:"swap-submit q-mt-lg"},He={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},Qe={key:1,class:"row q-mt-md text-center relative-position full-width"},Re={class:"absolute-right swap-rate__refresh"},je={class:"swap-info q-mt-lg"},Ke=se({__name:"DepositSingleCard",setup(A){const p=H(),{state:o,loadingPoolTokens:m,changeDirection:c,loadPoolTokenAccounts:s}=p,u=i(()=>p.tokenSwap),B=Ae(),{state:t,depositSingleToken:C}=B,{handleSearchToken:g,handleFilterToken:r,tokens:v}=le();r(I);const h=ie(),q=i(()=>o.poolBalance[o.from.mint]?L(o.poolBalance[o.from.mint],o.from.decimals):0),x=i(()=>o.poolBalance[o.to.mint]?L(o.poolBalance[o.to.mint],o.to.decimals):0),E=ce(0),Q=i(()=>`transform: rotate(${E.value*180}deg)`),f=i(()=>h.tokenBalance(o.from.mint)),R=i(()=>h.tokenBalance(o.to.mint));function j(){c(),E.value++}function $(k,_){o[_?"to":"from"]=k}function K(){o.from?.mint===I||o.from?.mint===we?t.amountTokenA=f.value-ge-3*ve-he:t.amountTokenA=f.value}const M=i(()=>Number(t.amountTokenA)>f.value?"Insufficient funds":!1);return re([()=>t.amountTokenA,u,f],k=>{t.active=!M.value}),(k,_)=>{const P=Y,U=X;return w(),de(ue,{class:"swap-card swap-widget"},{default:d(()=>[a(D,{class:"swap-card__header"},{default:d(()=>[S(" Deposit ")]),_:1}),a(D,{class:"swap-card__body"},{default:d(()=>[n("div",Be,[n("div",Ce,[n("div",qe,[n("div",xe,[Me,n("div",Ne,[e(M)?(w(),b("div",Ee,l(e(M)),1)):pe("",!0),S(" Balance: "+l(e(T)(e(f)))+" "+l(e(o).from.symbol),1)])])]),a(F,{modelValue:e(t).amountTokenA,"onUpdate:modelValue":_[0]||(_[0]=N=>e(t).amountTokenA=N),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(G)},{append:d(()=>[a(y,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:K},{default:d(()=>[S(" MAX ")]),_:1}),a(P,{options:e(v),token:e(o).from,"swap-token":String(e(o).to.symbol),onHandleSearchToken:e(g),onSetToken:$},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),n("div",$e,[a(y,{ripple:!1,dense:"",unelevated:"",style:me(e(Q)),onClick:j},{default:d(()=>[n("i",{innerHTML:e(ye)},null,8,Pe)]),_:1},8,["style"])]),n("div",Ve,[n("div",Ie,[n("div",Le,[n("div",De," Balance: "+l(e(T)(e(R)))+" "+l(e(o).to.symbol),1)])]),a(F,{modelValue:void 0,"onUpdate:modelValue":_[1]||(_[1]=N=>undefined=N),readonly:"",outlined:"",class:"swap-input"},{append:d(()=>[a(P,{"swap-token":String(e(o).from.symbol),options:e(v),direction:!0,token:e(o).to,"destination-unavailable":!e(u),onHandleSearchToken:e(g),onSetToken:$},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1})])]),a(U,{class:"q-mt-md"}),n("div",Fe,[a(y,{loading:e(t).swapping,disable:!e(t).active||!e(u)||!e(t).amountTokenA,rounded:"",ripple:!1,onClick:e(C)},{default:d(()=>[S(" Add Liquidity ("+l(e(o).from.symbol)+") ",1)]),_:1},8,["loading","disable","onClick"])]),e(u)?(w(),b("div",Qe,[n("div",Re,[a(y,{loading:e(m),class:"swap-card__reload",unelevated:"",color:k.$q.dark.isActive?"white":"primary",round:"",onClick:e(s)},{default:d(()=>[a(_e,{name:e(fe),color:k.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(w(),b("div",He," Pool not found ")),n("div",je,[n("dl",null,[n("dt",null,"Pool "+l(e(o).from.symbol)+" balance",1),n("dd",null,l(e(T)(e(q))),1)]),n("dl",null,[n("dt",null,"Pool "+l(e(o).to.symbol)+" balance",1),n("dd",null,l(e(T)(e(x))),1)])])]),_:1}),a(ke,{showing:e(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),Ue={},We={class:"main-block row justify-center"};function Oe(A,p){const o=W,m=Ke,c=O,s=z;return w(),b(Te,null,[a(o,{class:"q-mt-lg"}),n("div",We,[a(m)]),a(c,{class:"q-mt-lg"}),a(s,{class:"q-mt-lg"})],64)}const no=Se(Ue,[["render",Oe]]);export{no as default}; diff --git a/assets/pools-5d8404c8.js b/assets/pools-501444fd.js similarity index 95% rename from assets/pools-5d8404c8.js rename to assets/pools-501444fd.js index 5ace105..7ed526d 100644 --- a/assets/pools-5d8404c8.js +++ b/assets/pools-501444fd.js @@ -1 +1 @@ -import{_ as F,a as R,b as Q}from"./AppDescriptionTop-ae09eb9e.js";import{_ as G}from"./PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js";import{am as $,an as K,ao as W,s as Y,G as m,u as z,t as H,v as _,ap as N,C as P,af as k,aq as V,V as j,o as v,i as y,j as g,a3 as s,a9 as C,a2 as u,a5 as E,ar as I,y as J,as as X,at as Z,a4 as q,ad as x,au as oo,Y as eo,_ as to}from"./index-d1afe763.js";import{u as O}from"./swap-a8389507.js";import"./associatedTokenAccount-50901cf8.js";async function so(n){const{data:t}=await $.get(`${D(n)}`);return t}async function ao(n){const{data:t}=await $.get(`${D(n)}/transactions?type=swap`);return t}async function no(n){const{data:t}=await $.get(`${D(n)}/coin-price`);return t}function D(n){return n==="mainnet-beta"?K:W}const U=Y("pools-stats",()=>{const n=m([]),t=m(!0),l=m([]),c=m(!0),i=m({}),d=m(!0),T=m({}),B=m({tvl:0,volume24:0,fees24:0}),M=z(),A=H(),b=O(),h=_(()=>b.tokenSwapsAllFiltered),L=N(async()=>{t.value=!0;try{n.value=await so()}catch(a){console.error("get pools data: ",a)}finally{t.value=!1}},500);P(h,L,{immediate:!0});const w=N(async()=>{c.value=!0;try{l.value=await ao()}catch(a){console.error("get tx data: ",a)}finally{c.value=!1}},500);P(()=>M.cluster,w,{immediate:!0}),setInterval(w,6e4);const p=N(async()=>{d.value=!0;try{i.value=await no()}catch(a){console.error("get tx data: ",a)}finally{d.value=!1}},500);return p(),setInterval(p,6e4),P([n,l,i],()=>{if(t.value||c.value||d.value)return;const a={tvl:0,volume24:0,fees24:0},e=h.value.reduce((o,f)=>(o[f.pubkey.toBase58()]={tokenAMint:f.data.tokenAMint.toBase58(),tokenBMint:f.data.tokenBMint.toBase58(),poolTokenSupply:0,amountTokenA:0,amountTokenB:0,tvl:0,volume24:0,fees24:0,apr24:0},o),{});n.value?.forEach(o=>{e[o.address]&&(e[o.address].amountTokenA=Number(o.tokenABalance),e[o.address].amountTokenB=Number(o.tokenBBalance),e[o.address].poolTokenSupply=Number(o.poolTokenSupply))}),l.value?.forEach(o=>{if(e[o.poolAddress]){const f=A.tokenByMint(e[o.poolAddress].tokenAMint),S=A.tokenByMint(e[o.poolAddress].tokenBMint);if(Number(o.amountTokenA)>0){const r=k(Number(o.amountTokenA),f?.decimals)*o.priceTokenA;e[o.poolAddress].volume24+=r,e[o.poolAddress].fees24+=k(Number(o.feeTokenB),S?.decimals)*o.priceTokenB,a.volume24+=r}if(Number(o.amountTokenB)>0){const r=k(Number(o.amountTokenB),S?.decimals)*o.priceTokenB;e[o.poolAddress].volume24+=k(Number(o.amountTokenB),S?.decimals)*o.priceTokenB,a.volume24+=r}if(Number(o.feeTokenA)>0){const r=k(Number(o.feeTokenA),f?.decimals)*o.priceTokenA;e[o.poolAddress].fees24+=r,a.fees24+=r}if(Number(o.feeTokenB)>0){const r=k(Number(o.feeTokenB),S?.decimals)*o.priceTokenB;e[o.poolAddress].fees24+=r,a.fees24+=r}}}),Object.keys(e).forEach(o=>{const f=A.tokenByMint(e[o].tokenAMint),S=A.tokenByMint(e[o].tokenBMint),r=k(e[o].amountTokenA,f?.decimals)*(i.value[V[e[o].tokenAMint]]??0)+k(e[o].amountTokenB,S?.decimals)*(i.value[V[e[o].tokenBMint]]??0);e[o].tvl=r,a.tvl+=r,e[o].apr24=e[o].fees24/e[o].tvl*365}),T.value=e,B.value=a,console.log("[pools stats]: ",e),console.log("[pools stats] total: ",a)}),{poolsLoading:t,txLoading:c,priceLoading:d,poolsStats:T,poolsStatsTotal:B}}),lo={class:"row justify-start"},co={class:"pools-total q-mr-md q-mb-md"},ro=u("div",{class:"pools-total__name"}," Total value locked ",-1),io={class:"pools-total__value"},uo={class:"pools-total q-mb-md"},po=u("div",{class:"pools-total__name"}," Volume 24h ",-1),mo={class:"pools-total__value"},_o=j({__name:"PoolsTotal",setup(n){const t=U(),l=_(()=>t.poolsStatsTotal),c=_(()=>t.poolsLoading),i=_(()=>t.txLoading),d=_(()=>t.priceLoading);return(T,B)=>(v(),y("div",null,[g(C,{showing:s(l).tvl===0&&(s(c)||s(i)||s(d)),class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",lo,[u("div",co,[ro,u("div",io," $"+E(s(I).format(s(l).tvl)),1)]),u("div",uo,[po,u("div",mo," $"+E(s(I).format(s(l).volume24)),1)])])]))}}),fo={key:0,class:"full-width row items-center justify-start q-px-lg"},ko={key:0,class:"q-mb-md q-ml-auto"},vo=u("span",{class:"q-mr-sm"},"My Liquidity",-1),go={class:"full-width"},yo={class:"row justify-center q-pl-lg"},To={key:0,class:"text-h5"},Bo=j({__name:"PoolsList",setup(n){const{connected:t}=J(),l=m(!1),c=O(),i=_(()=>c.tokenSwapsAllFiltered.filter(b=>!t.value||!l.value||c.userPoolsTokens[b.data.poolMint.toBase58()])),d=_(()=>c.userPoolsTokens),{state:T}=c,B=U(),M=_(()=>B.poolsLoading),A=_(()=>B.poolsStats);return(b,h)=>{const L=_o,w=G;return v(),y(x,null,[s(t)?(v(),y("div",fo,[g(L,{class:"q-mb-md"}),s(t)?(v(),y("div",ko,[vo,g(Z,{modelValue:s(l),"onUpdate:modelValue":h[0]||(h[0]=p=>X(l)?l.value=p:null),color:"secondary",dense:"",class:"app-toggle"},null,8,["modelValue"])])):q("",!0)])):q("",!0),u("div",go,[g(C,{showing:s(T)?.loading||s(M),class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",yo,[(v(!0),y(x,null,oo(s(i),(p,a)=>(v(),eo(w,{key:p.pubkey.toBase58()??a,pubkey:p.pubkey,data:p.data,"user-tokens":s(d)[p.data.poolMint.toBase58()],"pool-stats":s(A)[p.pubkey.toBase58()],class:"q-mr-lg q-mb-lg"},null,8,["pubkey","data","user-tokens","pool-stats"]))),128)),!s(T).loading&&!s(i).length?(v(),y("div",To," Pools not found ")):q("",!0)])])],64)}}}),Ao={},So={class:"main-block row justify-center"};function ho(n,t){const l=F,c=Bo,i=R,d=Q;return v(),y(x,null,[g(l,{class:"q-mt-lg"}),u("div",So,[g(c)]),g(i,{class:"q-mt-lg"}),g(d,{class:"q-mt-lg"})],64)}const Po=to(Ao,[["render",ho]]);export{Po as default}; +import{_ as F,a as R,b as Q}from"./AppDescriptionTop-8f9fdf69.js";import{_ as G}from"./PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js";import{am as $,an as K,ao as W,s as Y,G as m,u as z,t as H,v as _,ap as N,C as P,af as k,aq as V,V as j,o as v,i as y,j as g,a3 as s,a9 as C,a2 as u,a5 as E,ar as I,y as J,as as X,at as Z,a4 as q,ad as x,au as oo,Y as eo,_ as to}from"./index-3e319056.js";import{u as O}from"./swap-6005a05e.js";import"./associatedTokenAccount-56e3fa33.js";async function so(n){const{data:t}=await $.get(`${D(n)}`);return t}async function ao(n){const{data:t}=await $.get(`${D(n)}/transactions?type=swap`);return t}async function no(n){const{data:t}=await $.get(`${D(n)}/coin-price`);return t}function D(n){return n==="mainnet-beta"?K:W}const U=Y("pools-stats",()=>{const n=m([]),t=m(!0),l=m([]),c=m(!0),i=m({}),d=m(!0),T=m({}),B=m({tvl:0,volume24:0,fees24:0}),M=z(),A=H(),b=O(),h=_(()=>b.tokenSwapsAllFiltered),L=N(async()=>{t.value=!0;try{n.value=await so()}catch(a){console.error("get pools data: ",a)}finally{t.value=!1}},500);P(h,L,{immediate:!0});const w=N(async()=>{c.value=!0;try{l.value=await ao()}catch(a){console.error("get tx data: ",a)}finally{c.value=!1}},500);P(()=>M.cluster,w,{immediate:!0}),setInterval(w,6e4);const p=N(async()=>{d.value=!0;try{i.value=await no()}catch(a){console.error("get tx data: ",a)}finally{d.value=!1}},500);return p(),setInterval(p,6e4),P([n,l,i],()=>{if(t.value||c.value||d.value)return;const a={tvl:0,volume24:0,fees24:0},e=h.value.reduce((o,f)=>(o[f.pubkey.toBase58()]={tokenAMint:f.data.tokenAMint.toBase58(),tokenBMint:f.data.tokenBMint.toBase58(),poolTokenSupply:0,amountTokenA:0,amountTokenB:0,tvl:0,volume24:0,fees24:0,apr24:0},o),{});n.value?.forEach(o=>{e[o.address]&&(e[o.address].amountTokenA=Number(o.tokenABalance),e[o.address].amountTokenB=Number(o.tokenBBalance),e[o.address].poolTokenSupply=Number(o.poolTokenSupply))}),l.value?.forEach(o=>{if(e[o.poolAddress]){const f=A.tokenByMint(e[o.poolAddress].tokenAMint),S=A.tokenByMint(e[o.poolAddress].tokenBMint);if(Number(o.amountTokenA)>0){const r=k(Number(o.amountTokenA),f?.decimals)*o.priceTokenA;e[o.poolAddress].volume24+=r,e[o.poolAddress].fees24+=k(Number(o.feeTokenB),S?.decimals)*o.priceTokenB,a.volume24+=r}if(Number(o.amountTokenB)>0){const r=k(Number(o.amountTokenB),S?.decimals)*o.priceTokenB;e[o.poolAddress].volume24+=k(Number(o.amountTokenB),S?.decimals)*o.priceTokenB,a.volume24+=r}if(Number(o.feeTokenA)>0){const r=k(Number(o.feeTokenA),f?.decimals)*o.priceTokenA;e[o.poolAddress].fees24+=r,a.fees24+=r}if(Number(o.feeTokenB)>0){const r=k(Number(o.feeTokenB),S?.decimals)*o.priceTokenB;e[o.poolAddress].fees24+=r,a.fees24+=r}}}),Object.keys(e).forEach(o=>{const f=A.tokenByMint(e[o].tokenAMint),S=A.tokenByMint(e[o].tokenBMint),r=k(e[o].amountTokenA,f?.decimals)*(i.value[V[e[o].tokenAMint]]??0)+k(e[o].amountTokenB,S?.decimals)*(i.value[V[e[o].tokenBMint]]??0);e[o].tvl=r,a.tvl+=r,e[o].apr24=e[o].fees24/e[o].tvl*365}),T.value=e,B.value=a,console.log("[pools stats]: ",e),console.log("[pools stats] total: ",a)}),{poolsLoading:t,txLoading:c,priceLoading:d,poolsStats:T,poolsStatsTotal:B}}),lo={class:"row justify-start"},co={class:"pools-total q-mr-md q-mb-md"},ro=u("div",{class:"pools-total__name"}," Total value locked ",-1),io={class:"pools-total__value"},uo={class:"pools-total q-mb-md"},po=u("div",{class:"pools-total__name"}," Volume 24h ",-1),mo={class:"pools-total__value"},_o=j({__name:"PoolsTotal",setup(n){const t=U(),l=_(()=>t.poolsStatsTotal),c=_(()=>t.poolsLoading),i=_(()=>t.txLoading),d=_(()=>t.priceLoading);return(T,B)=>(v(),y("div",null,[g(C,{showing:s(l).tvl===0&&(s(c)||s(i)||s(d)),class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",lo,[u("div",co,[ro,u("div",io," $"+E(s(I).format(s(l).tvl)),1)]),u("div",uo,[po,u("div",mo," $"+E(s(I).format(s(l).volume24)),1)])])]))}}),fo={key:0,class:"full-width row items-center justify-start q-px-lg"},ko={key:0,class:"q-mb-md q-ml-auto"},vo=u("span",{class:"q-mr-sm"},"My Liquidity",-1),go={class:"full-width"},yo={class:"row justify-center q-pl-lg"},To={key:0,class:"text-h5"},Bo=j({__name:"PoolsList",setup(n){const{connected:t}=J(),l=m(!1),c=O(),i=_(()=>c.tokenSwapsAllFiltered.filter(b=>!t.value||!l.value||c.userPoolsTokens[b.data.poolMint.toBase58()])),d=_(()=>c.userPoolsTokens),{state:T}=c,B=U(),M=_(()=>B.poolsLoading),A=_(()=>B.poolsStats);return(b,h)=>{const L=_o,w=G;return v(),y(x,null,[s(t)?(v(),y("div",fo,[g(L,{class:"q-mb-md"}),s(t)?(v(),y("div",ko,[vo,g(Z,{modelValue:s(l),"onUpdate:modelValue":h[0]||(h[0]=p=>X(l)?l.value=p:null),color:"secondary",dense:"",class:"app-toggle"},null,8,["modelValue"])])):q("",!0)])):q("",!0),u("div",go,[g(C,{showing:s(T)?.loading||s(M),class:"swap-loading",color:"grey"},null,8,["showing"]),u("div",yo,[(v(!0),y(x,null,oo(s(i),(p,a)=>(v(),eo(w,{key:p.pubkey.toBase58()??a,pubkey:p.pubkey,data:p.data,"user-tokens":s(d)[p.data.poolMint.toBase58()],"pool-stats":s(A)[p.pubkey.toBase58()],class:"q-mr-lg q-mb-lg"},null,8,["pubkey","data","user-tokens","pool-stats"]))),128)),!s(T).loading&&!s(i).length?(v(),y("div",To," Pools not found ")):q("",!0)])])],64)}}}),Ao={},So={class:"main-block row justify-center"};function ho(n,t){const l=F,c=Bo,i=R,d=Q;return v(),y(x,null,[g(l,{class:"q-mt-lg"}),u("div",So,[g(c)]),g(i,{class:"q-mt-lg"}),g(d,{class:"q-mt-lg"})],64)}const Po=to(Ao,[["render",ho]]);export{Po as default}; diff --git a/assets/setAuthority-3cfe3852.js b/assets/setAuthority-d61ee5de.js similarity index 81% rename from assets/setAuthority-3cfe3852.js rename to assets/setAuthority-d61ee5de.js index b142a9a..e30a1c1 100644 --- a/assets/setAuthority-3cfe3852.js +++ b/assets/setAuthority-d61ee5de.js @@ -1 +1 @@ -import{aN as l,aO as t,b8 as A,a as w,aP as O,P as b,aQ as k,aR as I}from"./index-d1afe763.js";import{a as d}from"./internal-c2cc419b.js";var s;(function(n){n[n.MintTokens=0]="MintTokens",n[n.FreezeAccount=1]="FreezeAccount",n[n.AccountOwner=2]="AccountOwner",n[n.CloseAccount=3]="CloseAccount"})(s||(s={}));const a=l([t("instruction"),t("authorityType"),t("newAuthorityOption"),A("newAuthority")]);function S(n,c,r,e,i=[],u=I){const f=d([{pubkey:n,isSigner:!1,isWritable:!0}],c,i),o=w.Buffer.alloc(a.span);return a.encode({instruction:O.SetAuthority,authorityType:r,newAuthorityOption:e?1:0,newAuthority:e||new b(0)},o),new k({keys:f,programId:u,data:o})}export{s as A,S as c}; +import{aN as l,aO as t,b8 as A,a as w,aP as O,P as b,aQ as k,aR as I}from"./index-3e319056.js";import{a as d}from"./internal-446163cd.js";var s;(function(n){n[n.MintTokens=0]="MintTokens",n[n.FreezeAccount=1]="FreezeAccount",n[n.AccountOwner=2]="AccountOwner",n[n.CloseAccount=3]="CloseAccount"})(s||(s={}));const a=l([t("instruction"),t("authorityType"),t("newAuthorityOption"),A("newAuthority")]);function S(n,c,r,e,i=[],u=I){const f=d([{pubkey:n,isSigner:!1,isWritable:!0}],c,i),o=w.Buffer.alloc(a.span);return a.encode({instruction:O.SetAuthority,authorityType:r,newAuthorityOption:e?1:0,newAuthority:e||new b(0)},o),new k({keys:f,programId:u,data:o})}export{s as A,S as c}; diff --git a/assets/support-b30dcf52.js b/assets/support-f2c49812.js similarity index 52% rename from assets/support-b30dcf52.js rename to assets/support-f2c49812.js index 1935087..ee9850a 100644 --- a/assets/support-b30dcf52.js +++ b/assets/support-f2c49812.js @@ -1 +1 @@ -import{_ as r}from"./index-d1afe763.js";const t={};function c(e,o){return" support "}const _=r(t,[["render",c]]);export{_ as default}; +import{_ as r}from"./index-3e319056.js";const t={};function c(e,o){return" support "}const _=r(t,[["render",c]]);export{_ as default}; diff --git a/assets/swap-07e5e3f2.js b/assets/swap-24dcf843.js similarity index 91% rename from assets/swap-07e5e3f2.js rename to assets/swap-24dcf843.js index 0b301ff..b64db10 100644 --- a/assets/swap-07e5e3f2.js +++ b/assets/swap-24dcf843.js @@ -1 +1 @@ -import{V as F,y as $,u as ee,w as D,G as O,z as oe,a3 as e,o as w,Y as U,Z as s,a8 as y,a4 as K,ae,P as te,a0 as f,v as d,W as ne,H as E,af as x,C as se,$ as P,j as t,a1 as C,a2 as a,i as S,a5 as n,a6 as p,a7 as Q,ag as le,ah as ie,ai as ce,aj as de,ak as re,a9 as me,al as _e,X as ue,ab as pe,ac as fe,N as we,_ as ge,ad as he}from"./index-d1afe763.js";import{b as ke,g as ve,m as ye}from"./index-12a77bbd.js";import{_ as be,a as Se,b as Te}from"./AppDescriptionTop-ae09eb9e.js";import{_ as Be}from"./PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js";import{_ as xe}from"./SelectPool.vue_vue_type_script_setup_true_lang-6853be9e.js";import{o as Ce,_ as qe}from"./SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js";import{s as Ve}from"./swap-circle-a93e350f.js";import{u as Ae}from"./swap-a8389507.js";import"./internal-c2cc419b.js";import"./PoolsListItem.vue_vue_type_script_setup_true_lang-fb43eae8.js";import"./associatedTokenAccount-50901cf8.js";const Me=F({__name:"MintTokenA",setup(q){const{publicKey:r}=$(),o=ee(),g=D(),m=O(!1),{notify:h}=oe();async function k(){if(r.value){m.value=!0,console.log("mintTokenB -------------------------");try{const i=ae.fromSecretKey(ke.decode("2QDdinbDitrdSrbvyddwrc1sdQEyRtMgXSisj5QfFgSikxgmPp4ggunwjQZChcvKFxr74XbUwYGmiqivq3SMARhx")),c=new te("6rdejLXbi2Ws2z3Ff1wRhRS9WqrXRDuM8YpSkiektRgw"),b=await ve(o.connection,i,c,r.value);await ye(o.connection,i,c,b.address,i,1e10),await g.getUserTokens(),h({type:"positive",message:"You got 10 TOKEN_B"})}catch(i){console.log("failed mint e:",i)}finally{m.value=!1}}}return(i,c)=>e(o).cluster==="devnet"&&e(r)?(w(),U(y,{key:0,class:"full-width",loading:e(m),unelevated:"",color:i.$q.dark.isActive?"white":"primary",onClick:k},{default:s(()=>[f(" Mint JSOL (fake) ")]),_:1},8,["loading","color"])):K("",!0)}}),Re={class:"swap-form"},Ne={class:"swap-field"},Ee={class:"swap-field__info"},Pe={class:"row items-end"},Qe=a("div",{class:"col swap-field__label"}," FROM: ",-1),Fe={class:"col-8 col-xs-10 row justify-end swap-field__balance"},$e={key:0,class:"insufficient-error"},De={class:"swap-change"},Oe=["innerHTML"],Ue={class:"swap-field"},Ke={class:"swap-field__info"},Le={class:"row"},je=a("div",{class:"col swap-field__label"}," TO: ",-1),He={class:"col swap-field__balance"},Ie={class:"swap-info q-mt-md q-pt-xs"},Xe={class:"text-weight-medium"},We=a("dt",null,"Minimum Received",-1),Ye=a("dt",null,"Slippage Tolerance",-1),ze={href:"#"},Ge=a("dt",null,"Swap fee",-1),Ze={class:"swap-submit q-mt-md"},Je={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},eo={key:1,class:"row q-mt-md text-center relative-position full-width"},oo={class:"swap-rate q-mx-auto"},ao={class:"absolute-right swap-rate__refresh"},to={class:"swap-info q-mt-md"},no=a("dt",null,"Price impact",-1),so=F({__name:"SwapCard",setup(q){const r=Ae(),{state:o,loadingPoolTokens:g,changeDirection:m,closeSlippage:h,swapSubmit:k,loadPoolTokenAccounts:i}=r,c=d(()=>r.tokenSwap),{handleSearchToken:b,handleFilterToken:L,tokens:V}=ne();L(E);const A=D(),j=d(()=>o.poolBalance[o.from.mint]?x(o.poolBalance[o.from.mint],o.from.decimals):0),H=d(()=>o.poolBalance[o.to.mint]?x(o.poolBalance[o.to.mint],o.to.decimals):0),{connected:I}=$(),T=_=>_e.format(_),M=O(0),X=d(()=>`transform: rotate(${M.value*180}deg)`),v=d(()=>A.tokenBalance(o.from.mint)),W=d(()=>A.tokenBalance(o.to.mint)),Y=d(()=>o.fees.ownerTrade+o.fees.trade);function z(){m(),M.value++}function R(_,l){o[l?"to":"from"]=_}function G(){o.from?.mint===E||o.from?.mint===ue?o.from.amount=v.value-pe-3*fe-we:o.from.amount=v.value}const B=d(()=>Number(o.from.amount)>v.value?"Insufficient funds":!1);return se([()=>o.from.amount,c,v],_=>{o.active=!B.value}),(_,l)=>{const N=qe,Z=xe,J=Be;return w(),U(P,{class:"swap-card swap-widget"},{default:s(()=>[t(C,{class:"swap-card__header"},{default:s(()=>[f(" Swap ")]),_:1}),t(C,{class:"swap-card__body"},{default:s(()=>[a("div",Re,[a("div",Ne,[a("div",Ee,[a("div",Pe,[Qe,a("div",Fe,[e(B)?(w(),S("div",$e,n(e(B)),1)):K("",!0),f(" Balance: "+n(e(p)(e(v)))+" "+n(e(o).from.symbol),1)])])]),t(Q,{modelValue:e(o).from.amount,"onUpdate:modelValue":l[0]||(l[0]=u=>e(o).from.amount=u),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(Ce)},{append:s(()=>[t(y,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:G},{default:s(()=>[f(" MAX ")]),_:1}),t(N,{options:e(V),token:e(o).from,"swap-token":String(e(o).to.symbol),onHandleSearchToken:e(b),onSetToken:R},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),a("div",De,[t(y,{ripple:!1,dense:"",unelevated:"",style:le(e(X)),onClick:z},{default:s(()=>[a("i",{innerHTML:e(Ve)},null,8,Oe)]),_:1},8,["style"])]),a("div",Ue,[a("div",Ke,[a("div",Le,[je,a("div",He," Balance: "+n(e(p)(e(W)))+" "+n(e(o).to.symbol),1)])]),t(Q,{modelValue:e(o).to.amount,"onUpdate:modelValue":l[1]||(l[1]=u=>e(o).to.amount=u),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},{append:s(()=>[t(N,{"swap-token":String(e(o).from.symbol),options:e(V),direction:!0,token:e(o).to,"destination-unavailable":!e(c),onHandleSearchToken:e(b),onSetToken:R},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1},8,["modelValue"])])]),a("div",Ie,[a("dl",Xe,[We,a("dd",null,n(e(p)(e(x)(e(o).minimumReceived,e(o).to.decimals)))+" "+n(e(o).to.symbol.toUpperCase()),1)]),a("dl",null,[Ye,a("dd",null,[a("a",ze,[f(n(T(e(o).slippage))+" ",1),t(ie,{modelValue:e(o).slippageDialog,"onUpdate:modelValue":l[3]||(l[3]=u=>e(o).slippageDialog=u),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:s(()=>[t(P,null,{default:s(()=>[t(C,null,{default:s(()=>[t(ce,{modelValue:e(o).slippage,"onUpdate:modelValue":[l[2]||(l[2]=u=>e(o).slippage=u),e(h)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])]),a("dl",null,[Ge,a("dd",null,n(T(e(Y)))+" SOL",1)])]),t(Z,{class:"q-mt-md"}),t(J,{class:"q-mt-md q-mx-auto"}),a("div",Ze,[t(y,{loading:e(o).swapping,disable:!e(o).active||!e(c)||!e(I)||!e(o).from.amount,rounded:"",ripple:!1,onClick:e(k)},{default:s(()=>[f(" Swap "+n(e(o).from.symbol)+" / "+n(e(o).to.symbol),1)]),_:1},8,["loading","disable","onClick"])]),e(c)?(w(),S("div",eo,[a("div",oo," 1 "+n(e(o).from.symbol)+" ≈ "+n(e(p)(e(o).rate))+" "+n(e(o).to.symbol),1),a("div",ao,[t(y,{loading:e(g),class:"swap-card__reload",unelevated:"",color:_.$q.dark.isActive?"white":"primary",round:"",onClick:e(i)},{default:s(()=>[t(de,{name:e(re),color:_.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(w(),S("div",Je," Pool not found ")),a("div",to,[a("dl",null,[no,a("dd",null,n(T(e(o).impact)),1)]),a("dl",null,[a("dt",null,"Pool "+n(e(o).from.symbol)+" balance",1),a("dd",null,n(e(p)(e(j)))+" "+n(e(o).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+n(e(o).to.symbol)+" balance",1),a("dd",null,n(e(p)(e(H)))+" "+n(e(o).to.symbol),1)])])]),_:1}),t(me,{showing:e(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),lo={},io={class:"main-block row justify-center"};function co(q,r){const o=be,g=so,m=Se,h=Te,k=Me;return w(),S(he,null,[t(o,{class:"q-mt-lg"}),a("div",io,[t(g)]),t(m,{class:"q-mt-lg"}),t(h,{class:"q-mt-lg"}),t(k,{class:"q-mt-lg"})],64)}const yo=ge(lo,[["render",co]]);export{yo as default}; +import{V as F,y as $,u as ee,w as D,G as O,z as oe,a3 as e,o as w,Y as U,Z as s,a8 as y,a4 as K,ae,P as te,a0 as f,v as d,W as ne,H as E,af as x,C as se,$ as P,j as t,a1 as C,a2 as a,i as S,a5 as n,a6 as p,a7 as Q,ag as le,ah as ie,ai as ce,aj as de,ak as re,a9 as me,al as _e,X as ue,ab as pe,ac as fe,N as we,_ as ge,ad as he}from"./index-3e319056.js";import{b as ke,g as ve,m as ye}from"./index-6f941dc9.js";import{_ as be,a as Se,b as Te}from"./AppDescriptionTop-8f9fdf69.js";import{_ as Be}from"./PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js";import{_ as xe}from"./SelectPool.vue_vue_type_script_setup_true_lang-7446064a.js";import{o as Ce,_ as qe}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import{s as Ve}from"./swap-circle-a93e350f.js";import{u as Ae}from"./swap-6005a05e.js";import"./internal-446163cd.js";import"./PoolsListItem.vue_vue_type_script_setup_true_lang-6c98d733.js";import"./associatedTokenAccount-56e3fa33.js";const Me=F({__name:"MintTokenA",setup(q){const{publicKey:r}=$(),o=ee(),g=D(),m=O(!1),{notify:h}=oe();async function k(){if(r.value){m.value=!0,console.log("mintTokenB -------------------------");try{const i=ae.fromSecretKey(ke.decode("2QDdinbDitrdSrbvyddwrc1sdQEyRtMgXSisj5QfFgSikxgmPp4ggunwjQZChcvKFxr74XbUwYGmiqivq3SMARhx")),c=new te("6rdejLXbi2Ws2z3Ff1wRhRS9WqrXRDuM8YpSkiektRgw"),b=await ve(o.connection,i,c,r.value);await ye(o.connection,i,c,b.address,i,1e10),await g.getUserTokens(),h({type:"positive",message:"You got 10 TOKEN_B"})}catch(i){console.log("failed mint e:",i)}finally{m.value=!1}}}return(i,c)=>e(o).cluster==="devnet"&&e(r)?(w(),U(y,{key:0,class:"full-width",loading:e(m),unelevated:"",color:i.$q.dark.isActive?"white":"primary",onClick:k},{default:s(()=>[f(" Mint JSOL (fake) ")]),_:1},8,["loading","color"])):K("",!0)}}),Re={class:"swap-form"},Ne={class:"swap-field"},Ee={class:"swap-field__info"},Pe={class:"row items-end"},Qe=a("div",{class:"col swap-field__label"}," FROM: ",-1),Fe={class:"col-8 col-xs-10 row justify-end swap-field__balance"},$e={key:0,class:"insufficient-error"},De={class:"swap-change"},Oe=["innerHTML"],Ue={class:"swap-field"},Ke={class:"swap-field__info"},Le={class:"row"},je=a("div",{class:"col swap-field__label"}," TO: ",-1),He={class:"col swap-field__balance"},Ie={class:"swap-info q-mt-md q-pt-xs"},Xe={class:"text-weight-medium"},We=a("dt",null,"Minimum Received",-1),Ye=a("dt",null,"Slippage Tolerance",-1),ze={href:"#"},Ge=a("dt",null,"Swap fee",-1),Ze={class:"swap-submit q-mt-md"},Je={key:0,class:"text-weight-medium fs-13 text-center q-mt-md text-negative"},eo={key:1,class:"row q-mt-md text-center relative-position full-width"},oo={class:"swap-rate q-mx-auto"},ao={class:"absolute-right swap-rate__refresh"},to={class:"swap-info q-mt-md"},no=a("dt",null,"Price impact",-1),so=F({__name:"SwapCard",setup(q){const r=Ae(),{state:o,loadingPoolTokens:g,changeDirection:m,closeSlippage:h,swapSubmit:k,loadPoolTokenAccounts:i}=r,c=d(()=>r.tokenSwap),{handleSearchToken:b,handleFilterToken:L,tokens:V}=ne();L(E);const A=D(),j=d(()=>o.poolBalance[o.from.mint]?x(o.poolBalance[o.from.mint],o.from.decimals):0),H=d(()=>o.poolBalance[o.to.mint]?x(o.poolBalance[o.to.mint],o.to.decimals):0),{connected:I}=$(),T=_=>_e.format(_),M=O(0),X=d(()=>`transform: rotate(${M.value*180}deg)`),v=d(()=>A.tokenBalance(o.from.mint)),W=d(()=>A.tokenBalance(o.to.mint)),Y=d(()=>o.fees.ownerTrade+o.fees.trade);function z(){m(),M.value++}function R(_,l){o[l?"to":"from"]=_}function G(){o.from?.mint===E||o.from?.mint===ue?o.from.amount=v.value-pe-3*fe-we:o.from.amount=v.value}const B=d(()=>Number(o.from.amount)>v.value?"Insufficient funds":!1);return se([()=>o.from.amount,c,v],_=>{o.active=!B.value}),(_,l)=>{const N=qe,Z=xe,J=Be;return w(),U(P,{class:"swap-card swap-widget"},{default:s(()=>[t(C,{class:"swap-card__header"},{default:s(()=>[f(" Swap ")]),_:1}),t(C,{class:"swap-card__body"},{default:s(()=>[a("div",Re,[a("div",Ne,[a("div",Ee,[a("div",Pe,[Qe,a("div",Fe,[e(B)?(w(),S("div",$e,n(e(B)),1)):K("",!0),f(" Balance: "+n(e(p)(e(v)))+" "+n(e(o).from.symbol),1)])])]),t(Q,{modelValue:e(o).from.amount,"onUpdate:modelValue":l[0]||(l[0]=u=>e(o).from.amount=u),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input",onKeypress:e(Ce)},{append:s(()=>[t(y,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:G},{default:s(()=>[f(" MAX ")]),_:1}),t(N,{options:e(V),token:e(o).from,"swap-token":String(e(o).to.symbol),onHandleSearchToken:e(b),onSetToken:R},null,8,["options","token","swap-token","onHandleSearchToken"])]),_:1},8,["modelValue","onKeypress"])]),a("div",De,[t(y,{ripple:!1,dense:"",unelevated:"",style:le(e(X)),onClick:z},{default:s(()=>[a("i",{innerHTML:e(Ve)},null,8,Oe)]),_:1},8,["style"])]),a("div",Ue,[a("div",Ke,[a("div",Le,[je,a("div",He," Balance: "+n(e(p)(e(W)))+" "+n(e(o).to.symbol),1)])]),t(Q,{modelValue:e(o).to.amount,"onUpdate:modelValue":l[1]||(l[1]=u=>e(o).to.amount=u),readonly:"",maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input"},{append:s(()=>[t(N,{"swap-token":String(e(o).from.symbol),options:e(V),direction:!0,token:e(o).to,"destination-unavailable":!e(c),onHandleSearchToken:e(b),onSetToken:R},null,8,["swap-token","options","token","destination-unavailable","onHandleSearchToken"])]),_:1},8,["modelValue"])])]),a("div",Ie,[a("dl",Xe,[We,a("dd",null,n(e(p)(e(x)(e(o).minimumReceived,e(o).to.decimals)))+" "+n(e(o).to.symbol.toUpperCase()),1)]),a("dl",null,[Ye,a("dd",null,[a("a",ze,[f(n(T(e(o).slippage))+" ",1),t(ie,{modelValue:e(o).slippageDialog,"onUpdate:modelValue":l[3]||(l[3]=u=>e(o).slippageDialog=u),"transition-duration":"100","transition-show":"fade","transition-hide":"fade"},{default:s(()=>[t(P,null,{default:s(()=>[t(C,null,{default:s(()=>[t(ce,{modelValue:e(o).slippage,"onUpdate:modelValue":[l[2]||(l[2]=u=>e(o).slippage=u),e(h)],spread:"","no-caps":"",unelevated:"",ripple:!1,"toggle-color":"secondary",color:"white","text-color":"dark",options:[{label:"0.1%",value:.001},{label:"0.5%",value:.005},{label:"1%",value:.01},{label:"5%",value:.05}]},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])])]),a("dl",null,[Ge,a("dd",null,n(T(e(Y)))+" SOL",1)])]),t(Z,{class:"q-mt-md"}),t(J,{class:"q-mt-md q-mx-auto"}),a("div",Ze,[t(y,{loading:e(o).swapping,disable:!e(o).active||!e(c)||!e(I)||!e(o).from.amount,rounded:"",ripple:!1,onClick:e(k)},{default:s(()=>[f(" Swap "+n(e(o).from.symbol)+" / "+n(e(o).to.symbol),1)]),_:1},8,["loading","disable","onClick"])]),e(c)?(w(),S("div",eo,[a("div",oo," 1 "+n(e(o).from.symbol)+" ≈ "+n(e(p)(e(o).rate))+" "+n(e(o).to.symbol),1),a("div",ao,[t(y,{loading:e(g),class:"swap-card__reload",unelevated:"",color:_.$q.dark.isActive?"white":"primary",round:"",onClick:e(i)},{default:s(()=>[t(de,{name:e(re),color:_.$q.dark.isActive?"primary":"white"},null,8,["name","color"])]),_:1},8,["loading","color","onClick"])])])):(w(),S("div",Je," Pool not found ")),a("div",to,[a("dl",null,[no,a("dd",null,n(T(e(o).impact)),1)]),a("dl",null,[a("dt",null,"Pool "+n(e(o).from.symbol)+" balance",1),a("dd",null,n(e(p)(e(j)))+" "+n(e(o).from.symbol),1)]),a("dl",null,[a("dt",null,"Pool "+n(e(o).to.symbol)+" balance",1),a("dd",null,n(e(p)(e(H)))+" "+n(e(o).to.symbol),1)])])]),_:1}),t(me,{showing:e(o)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),lo={},io={class:"main-block row justify-center"};function co(q,r){const o=be,g=so,m=Se,h=Te,k=Me;return w(),S(he,null,[t(o,{class:"q-mt-lg"}),a("div",io,[t(g)]),t(m,{class:"q-mt-lg"}),t(h,{class:"q-mt-lg"}),t(k,{class:"q-mt-lg"})],64)}const yo=ge(lo,[["render",co]]);export{yo as default}; diff --git a/assets/swap-a8389507.js b/assets/swap-6005a05e.js similarity index 99% rename from assets/swap-a8389507.js rename to assets/swap-6005a05e.js index f9005b8..6cf27ad 100644 --- a/assets/swap-a8389507.js +++ b/assets/swap-6005a05e.js @@ -1 +1 @@ -import{m as d,aN as ge,aO as be,a as Ze,q as P,b7 as Ce,b8 as Ne,b9 as ut,ba as lt,bb as r,bc as h,n as x,bd as pt,S as Se,R as w,s as dt,u as mt,t as ft,w as kt,x as yt,y as ht,z as wt,v as St,K as Ke,P as At,G as D,A as Re,B as gt,be as Oe,W as bt,H as vt,C as B,ap as he,I as we,J as Tt,bf as Bt,bg as Mt,af as qe,a6 as Ft,aB as K,Q as Et,bh as R}from"./index-d1afe763.js";import{b as E,d as Xe,A as Ye,N as Le,g as Ue,T as Ge,a as Je,c as $e}from"./associatedTokenAccount-50901cf8.js";var L;(function(t){t[t.InitializeMint=0]="InitializeMint",t[t.InitializeAccount=1]="InitializeAccount",t[t.InitializeMultisig=2]="InitializeMultisig",t[t.Transfer=3]="Transfer",t[t.Approve=4]="Approve",t[t.Revoke=5]="Revoke",t[t.SetAuthority=6]="SetAuthority",t[t.MintTo=7]="MintTo",t[t.Burn=8]="Burn",t[t.CloseAccount=9]="CloseAccount",t[t.FreezeAccount=10]="FreezeAccount",t[t.ThawAccount=11]="ThawAccount",t[t.TransferChecked=12]="TransferChecked",t[t.ApproveChecked=13]="ApproveChecked",t[t.MintToChecked=14]="MintToChecked",t[t.BurnChecked=15]="BurnChecked",t[t.InitializeAccount2=16]="InitializeAccount2",t[t.SyncNative=17]="SyncNative",t[t.InitializeAccount3=18]="InitializeAccount3",t[t.InitializeMultisig2=19]="InitializeMultisig2",t[t.InitializeMint2=20]="InitializeMint2",t[t.GetAccountDataSize=21]="GetAccountDataSize",t[t.InitializeImmutableOwner=22]="InitializeImmutableOwner",t[t.AmountToUiAmount=23]="AmountToUiAmount",t[t.UiAmountToAmount=24]="UiAmountToAmount",t[t.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",t[t.TransferFeeExtension=26]="TransferFeeExtension",t[t.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",t[t.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",t[t.Reallocate=29]="Reallocate",t[t.MemoTransferExtension=30]="MemoTransferExtension",t[t.CreateNativeMint=31]="CreateNativeMint",t[t.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",t[t.InterestBearingMintExtension=33]="InterestBearingMintExtension",t[t.CpiGuardExtension=34]="CpiGuardExtension",t[t.InitializePermanentDelegate=35]="InitializePermanentDelegate",t[t.TransferHookExtension=36]="TransferHookExtension",t[t.MetadataPointerExtension=39]="MetadataPointerExtension"})(L||(L={}));function Pt(t,e,o){if(o.length){t.push({pubkey:e,isSigner:!1,isWritable:!1});for(const n of o)t.push({pubkey:n instanceof d?n:n.publicKey,isSigner:!0,isWritable:!1})}else t.push({pubkey:e,isSigner:!0,isWritable:!1});return t}const Ve=ge([be("instruction")]);function Wt(t,e,o,n=[],a=E){const l=Pt([{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}],o,n),y=Ze.Buffer.alloc(Ve.span);return Ve.encode({instruction:L.CloseAccount},y),new P({keys:l,programId:a,data:y})}const xt=ge([Ce("mintAuthorityOption"),Ne("mintAuthority"),ut("supply"),be("decimals"),lt("isInitialized"),Ce("freezeAuthorityOption"),Ne("freezeAuthority")]);xt.span;async function zt(t,e,o=!1,n=E,a=Ye){if(!o&&!d.isOnCurve(e.toBuffer()))throw new Xe;const[l]=await d.findProgramAddress([e.toBuffer(),n.toBuffer(),t.toBuffer()],a);return l}function He(t,e,o=!1,n=E,a=Ye){if(!o&&!d.isOnCurve(e.toBuffer()))throw new Xe;const[l]=d.findProgramAddressSync([e.toBuffer(),n.toBuffer(),t.toBuffer()],a);return l}const je=ge([be("instruction")]);function It(t,e=E){const o=[{pubkey:t,isSigner:!1,isWritable:!0}],n=Ze.Buffer.alloc(je.span);return je.encode({instruction:L.SyncNative},n),new P({keys:o,programId:e,data:n})}var Dt=Object.defineProperty,Ct=(t,e,o)=>e in t?Dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(t,e,o)=>(Ct(t,typeof e!="symbol"?e+"":e,o),o);const ve=new r.BeetArgsStruct([["tradeFeeNumerator",r.u64],["tradeFeeDenominator",r.u64],["ownerTradeFeeNumerator",r.u64],["ownerTradeFeeDenominator",r.u64],["ownerWithdrawFeeNumerator",r.u64],["ownerWithdrawFeeDenominator",r.u64],["hostFeeNumerator",r.u64],["hostFeeDenominator",r.u64]],"FeesInfo"),Te=new r.BeetArgsStruct([["curveType",r.u8],["curveParameters",r.uniformFixedSizeArray(r.u8,32)]],"CurveInfo"),Ae=[135,144,215,161,140,125,41,96];class F{constructor(e,o,n,a,l,y,T,S,A,v,u,W,I,i){this.isInitialized=e,this.bumpSeed=o,this.tokenProgramId=n,this.tokenA=a,this.tokenB=l,this.poolMint=y,this.tokenAMint=T,this.tokenBMint=S,this.poolFeeAccount=A,this.fees=v,this.curve=u,this.swapPolicy=W,this.addLiquidityPolicy=I,this.reserved=i}static fromArgs(e){return new F(e.isInitialized,e.bumpSeed,e.tokenProgramId,e.tokenA,e.tokenB,e.poolMint,e.tokenAMint,e.tokenBMint,e.poolFeeAccount,e.fees,e.curve,e.swapPolicy,e.addLiquidityPolicy,e.reserved)}static fromAccountInfo(e,o=0){return F.deserialize(e.data,o)}static async fromAccountAddress(e,o,n){const a=await e.getAccountInfo(o,n);if(a==null)throw new Error(`Unable to find TokenSwap account at ${o}`);return F.fromAccountInfo(a,0)[0]}static gpaBuilder(e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){return h.GpaBuilder.fromStruct(e,O)}static deserialize(e,o=0){return O.deserialize(e,o)}serialize(){return O.serialize({accountDiscriminator:Ae,...this})}static byteSize(e){const o=F.fromArgs(e);return O.toFixedFromValue({accountDiscriminator:Ae,...o}).byteSize}static async getMinimumBalanceForRentExemption(e,o,n){return o.getMinimumBalanceForRentExemption(F.byteSize(e),n)}pretty(){return{isInitialized:this.isInitialized,bumpSeed:this.bumpSeed,tokenProgramId:this.tokenProgramId.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),poolMint:this.poolMint.toBase58(),tokenAMint:this.tokenAMint.toBase58(),tokenBMint:this.tokenBMint.toBase58(),poolFeeAccount:this.poolFeeAccount.toBase58(),fees:this.fees,curve:this.curve,swapPolicy:this.swapPolicy,addLiquidityPolicy:this.addLiquidityPolicy,reserved:this.reserved}}}const O=new r.FixableBeetStruct([["accountDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["isInitialized",r.bool],["bumpSeed",r.u8],["tokenProgramId",h.publicKey],["tokenA",h.publicKey],["tokenB",h.publicKey],["poolMint",h.publicKey],["tokenAMint",h.publicKey],["tokenBMint",h.publicKey],["poolFeeAccount",h.publicKey],["fees",ve],["curve",Te],["swapPolicy",r.coption(h.publicKey)],["addLiquidityPolicy",r.coption(h.publicKey)],["reserved",r.uniformFixedSizeArray(r.u8,64)]],F.fromArgs,"TokenSwap"),f=new Map,k=new Map;class U extends Error{constructor(){super("Swap account already in use"),s(this,"code",6e3),s(this,"name","AlreadyInUse"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,U)}}f.set(6e3,()=>new U);k.set("AlreadyInUse",()=>new U);class G extends Error{constructor(){super("Invalid program address generated from bump seed and key"),s(this,"code",6001),s(this,"name","InvalidProgramAddress"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,G)}}f.set(6001,()=>new G);k.set("InvalidProgramAddress",()=>new G);class J extends Error{constructor(){super("Input account owner is not the program address"),s(this,"code",6002),s(this,"name","InvalidOwner"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,J)}}f.set(6002,()=>new J);k.set("InvalidOwner",()=>new J);class $ extends Error{constructor(){super("Output pool account owner cannot be the program address"),s(this,"code",6003),s(this,"name","InvalidOutputOwner"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$)}}f.set(6003,()=>new $);k.set("InvalidOutputOwner",()=>new $);class V extends Error{constructor(){super("Deserialized account is not an SPL Token mint"),s(this,"code",6004),s(this,"name","ExpectedMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,V)}}f.set(6004,()=>new V);k.set("ExpectedMint",()=>new V);class H extends Error{constructor(){super("Deserialized account is not an SPL Token account"),s(this,"code",6005),s(this,"name","ExpectedAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,H)}}f.set(6005,()=>new H);k.set("ExpectedAccount",()=>new H);class j extends Error{constructor(){super("Input token account empty"),s(this,"code",6006),s(this,"name","EmptySupply"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j)}}f.set(6006,()=>new j);k.set("EmptySupply",()=>new j);class Q extends Error{constructor(){super("Pool token mint has a non-zero supply"),s(this,"code",6007),s(this,"name","InvalidSupply"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Q)}}f.set(6007,()=>new Q);k.set("InvalidSupply",()=>new Q);class Z extends Error{constructor(){super("Token account has a delegate"),s(this,"code",6008),s(this,"name","InvalidDelegate"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Z)}}f.set(6008,()=>new Z);k.set("InvalidDelegate",()=>new Z);class X extends Error{constructor(){super("InvalidInput"),s(this,"code",6009),s(this,"name","InvalidInput"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,X)}}f.set(6009,()=>new X);k.set("InvalidInput",()=>new X);class Y extends Error{constructor(){super("Address of the provided swap token account is incorrect"),s(this,"code",6010),s(this,"name","IncorrectSwapAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Y)}}f.set(6010,()=>new Y);k.set("IncorrectSwapAccount",()=>new Y);class _ extends Error{constructor(){super("Address of the provided pool token mint is incorrect"),s(this,"code",6011),s(this,"name","IncorrectPoolMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,_)}}f.set(6011,()=>new _);k.set("IncorrectPoolMint",()=>new _);class ee extends Error{constructor(){super("InvalidOutput"),s(this,"code",6012),s(this,"name","InvalidOutput"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ee)}}f.set(6012,()=>new ee);k.set("InvalidOutput",()=>new ee);class te extends Error{constructor(){super("General calculation failure due to overflow or underflow"),s(this,"code",6013),s(this,"name","CalculationFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,te)}}f.set(6013,()=>new te);k.set("CalculationFailure",()=>new te);class oe extends Error{constructor(){super("Invalid instruction"),s(this,"code",6014),s(this,"name","InvalidInstruction"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,oe)}}f.set(6014,()=>new oe);k.set("InvalidInstruction",()=>new oe);class ne extends Error{constructor(){super("Swap input token accounts have the same mint"),s(this,"code",6015),s(this,"name","RepeatedMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ne)}}f.set(6015,()=>new ne);k.set("RepeatedMint",()=>new ne);class ie extends Error{constructor(){super("Swap instruction exceeds desired slippage limit"),s(this,"code",6016),s(this,"name","ExceededSlippage"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ie)}}f.set(6016,()=>new ie);k.set("ExceededSlippage",()=>new ie);class re extends Error{constructor(){super("Token account has a close authority"),s(this,"code",6017),s(this,"name","InvalidCloseAuthority"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,re)}}f.set(6017,()=>new re);k.set("InvalidCloseAuthority",()=>new re);class ae extends Error{constructor(){super("Pool token mint has a freeze authority"),s(this,"code",6018),s(this,"name","InvalidFreezeAuthority"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ae)}}f.set(6018,()=>new ae);k.set("InvalidFreezeAuthority",()=>new ae);class se extends Error{constructor(){super("Pool fee token account incorrect"),s(this,"code",6019),s(this,"name","IncorrectFeeAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,se)}}f.set(6019,()=>new se);k.set("IncorrectFeeAccount",()=>new se);class ce extends Error{constructor(){super("Given pool token amount results in zero trading tokens"),s(this,"code",6020),s(this,"name","ZeroTradingTokens"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ce)}}f.set(6020,()=>new ce);k.set("ZeroTradingTokens",()=>new ce);class ue extends Error{constructor(){super("Fee calculation failed due to overflow, underflow, or unexpected 0"),s(this,"code",6021),s(this,"name","FeeCalculationFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ue)}}f.set(6021,()=>new ue);k.set("FeeCalculationFailure",()=>new ue);class le extends Error{constructor(){super("Conversion to u64/u128 failed with an overflow or underflow"),s(this,"code",6022),s(this,"name","ConversionFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,le)}}f.set(6022,()=>new le);k.set("ConversionFailure",()=>new le);class pe extends Error{constructor(){super("The provided fee does not match the program owner's constraints"),s(this,"code",6023),s(this,"name","InvalidFee"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,pe)}}f.set(6023,()=>new pe);k.set("InvalidFee",()=>new pe);class de extends Error{constructor(){super("The provided token program does not match the token program expected by the swap"),s(this,"code",6024),s(this,"name","IncorrectTokenProgramId"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,de)}}f.set(6024,()=>new de);k.set("IncorrectTokenProgramId",()=>new de);class me extends Error{constructor(){super("The provided curve type is not supported by the program owner"),s(this,"code",6025),s(this,"name","UnsupportedCurveType"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me)}}f.set(6025,()=>new me);k.set("UnsupportedCurveType",()=>new me);class fe extends Error{constructor(){super("The provided curve parameters are invalid"),s(this,"code",6026),s(this,"name","InvalidCurve"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fe)}}f.set(6026,()=>new fe);k.set("InvalidCurve",()=>new fe);class ke extends Error{constructor(){super("The operation cannot be performed on the given curve"),s(this,"code",6027),s(this,"name","UnsupportedCurveOperation"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ke)}}f.set(6027,()=>new ke);k.set("UnsupportedCurveOperation",()=>new ke);const Nt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)]],"CloseInstructionArgs"),Kt=[98,165,201,177,108,65,206,96];function Rt(t,e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[o]=Nt.serialize({instructionDiscriminator:Kt}),n=[{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destTokenA,isWritable:!0,isSigner:!1},{pubkey:t.destTokenB,isWritable:!0,isSigner:!1},{pubkey:t.payer,isWritable:!0,isSigner:!0},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1},{pubkey:t.systemProgram??Se.programId,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const a of t.anchorRemainingAccounts)n.push(a);return new P({programId:e,keys:n,data:o})}const Ot=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["poolTokenAmount",r.u64],["maximumTokenAAmount",r.u64],["maximumTokenBAmount",r.u64]],"DepositAllTokenTypesInstructionArgs"),qt=[32,95,69,60,75,79,205,238];function Lt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Ot.serialize({instructionDiscriminator:qt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.userTokenA,isWritable:!0,isSigner:!1},{pubkey:t.userTokenB,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const Ut=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["sourceTokenAmount",r.u64],["minimumPoolTokenAmount",r.u64]],"DepositSingleTokenTypeInstructionArgs"),Gt=[175,0,152,41,199,0,148,43];function Jt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Ut.serialize({instructionDiscriminator:Gt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const $t=new r.FixableBeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["feesInput",ve],["curveInput",Te],["swapPolicy",r.coption(h.publicKey)],["addLiquidityPolicy",r.coption(h.publicKey)]],"InitializeInstructionArgs"),Vt=[175,175,109,31,13,152,155,237];function Ht(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=$t.serialize({instructionDiscriminator:Vt,...e}),a=[{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!0,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.tokenA,isWritable:!0,isSigner:!1},{pubkey:t.tokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const jt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["amountIn",r.u64],["minimumAmountOut",r.u64]],"SwapInstructionArgs"),Qt=[248,198,158,145,225,117,135,200];function Zt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=jt.serialize({instructionDiscriminator:Qt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.userSource,isWritable:!0,isSigner:!1},{pubkey:t.userDestination,isWritable:!0,isSigner:!1},{pubkey:t.poolSource,isWritable:!0,isSigner:!1},{pubkey:t.poolDestination,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.hostFeeAccount??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const Xt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["poolTokenAmount",r.u64],["minimumTokenAAmount",r.u64],["minimumTokenBAmount",r.u64]],"WithdrawAllTokenTypesInstructionArgs"),Yt=[189,254,156,174,210,9,164,216];function _t(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Xt.serialize({instructionDiscriminator:Yt,...e}),a=[{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destTokenA,isWritable:!0,isSigner:!1},{pubkey:t.destTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const eo=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["destinationTokenAmount",r.u64],["maximumPoolTokenAmount",r.u64]],"WithdrawSingleTokenTypeInstructionArgs"),to=[111,171,21,77,237,181,241,56];function oo(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=eo.serialize({instructionDiscriminator:to,...e}),a=[{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}var _e=(t=>(t[t.ConstantProduct=0]="ConstantProduct",t[t.ConstantPrice=1]="ConstantPrice",t[t.Offset=2]="Offset",t))(_e||{});r.fixedScalarEnum(_e);var et=(t=>(t[t.Floor=0]="Floor",t[t.Ceiling=1]="Ceiling",t))(et||{});r.fixedScalarEnum(et);var tt=(t=>(t[t.AtoB=0]="AtoB",t[t.BtoA=1]="BtoA",t))(tt||{});r.fixedScalarEnum(tt);const no="ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq",io=new d(no);class ro{constructor(e){s(this,"programId",io),this.provider=e}get connection(){return this.provider.connection}swapAuthority(e){return d.findProgramAddressSync([e.toBuffer()],this.programId)[0]}async closeTokenSwap(e,o){const n=new x,a=this.provider.publicKey,l=this.swapAuthority(e.tokenSwap),y=await this.load(e.tokenSwap),T=He(y.tokenAMint,a),S=He(y.tokenBMint,a);return await this.handleMissingTokenAccount(n,T,y.tokenAMint),await this.handleMissingTokenAccount(n,S,y.tokenBMint),n.add(Rt({payer:a,tokenSwap:e.tokenSwap,authority:l,destTokenA:T,destTokenB:S,swapTokenA:y.tokenA,swapTokenB:y.tokenB})),{signature:await this.provider.sendAndConfirm(n,[],o)}}async createTokenSwap(e,o){const n=new x,a=e.tokenSwap??pt.generate(),l=Array.from({length:32}),y=Array.from(e.curveParameters??[]);for(let u=0;u({pubkey:n,data:e.noData?null:F.fromAccountInfo(a)[0]}))}unwrapSol(e,o,n){n&&n.toBase58()===Le.toBase58()&&e.add(Wt(o,this.provider.publicKey,this.provider.publicKey))}async handleMissingTokenAccount(e,o,n){try{await Ue(this.connection,o)}catch(a){(a instanceof Ge||a instanceof Je)&&n&&e.add($e(this.provider.publicKey,o,this.provider.publicKey,n))}}async handleWrappedSol(e){var o;if(e.sourceTokenMint&&((o=e.sourceTokenMint)==null?void 0:o.toBase58())===Le.toBase58()){let n=0;try{if((await zt(e.sourceTokenMint,this.provider.publicKey)).toBase58()!==e.userSource.toBase58())return;const l=await Ue(this.connection,e.userSource);n=Number(l.amount)}catch(l){(l instanceof Ge||l instanceof Je)&&e.tx.add($e(this.provider.publicKey,e.userSource,this.provider.publicKey,e.sourceTokenMint))}const a=Number(e.amount);e.amount>n&&e.tx.add(Se.transfer({fromPubkey:this.provider.publicKey,toPubkey:e.userSource,lamports:a-n}),It(e.userSource))}}}const Qe=[135,144,215,161,140,125,41,96];class z{constructor(e,o,n,a,l,y,T,S,A,v,u,W){this.isInitialized=e,this.bumpSeed=o,this.tokenProgramId=n,this.tokenA=a,this.tokenB=l,this.poolMint=y,this.tokenAMint=T,this.tokenBMint=S,this.poolFeeAccount=A,this.fees=v,this.curve=u,this.policy=W}static fromArgs(e){return new z(e.isInitialized,e.bumpSeed,e.tokenProgramId,e.tokenA,e.tokenB,e.poolMint,e.tokenAMint,e.tokenBMint,e.poolFeeAccount,e.fees,e.curve,e.policy)}static fromAccountInfo(e,o=0){return z.deserialize(e.data,o)}static async fromAccountAddress(e,o,n){const a=await e.getAccountInfo(o,n);if(a==null)throw new Error(`Unable to find TokenSwap account at ${o}`);return z.fromAccountInfo(a,0)[0]}static gpaBuilder(e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){return h.GpaBuilder.fromStruct(e,q)}static deserialize(e,o=0){return q.deserialize(e,o)}serialize(){return q.serialize({accountDiscriminator:Qe,...this})}static byteSize(e){const o=z.fromArgs(e);return q.toFixedFromValue({accountDiscriminator:Qe,...o}).byteSize}static async getMinimumBalanceForRentExemption(e,o,n){return o.getMinimumBalanceForRentExemption(z.byteSize(e),n)}pretty(){return{isInitialized:this.isInitialized,bumpSeed:this.bumpSeed,tokenProgramId:this.tokenProgramId.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),poolMint:this.poolMint.toBase58(),tokenAMint:this.tokenAMint.toBase58(),tokenBMint:this.tokenBMint.toBase58(),poolFeeAccount:this.poolFeeAccount.toBase58(),fees:this.fees,curve:this.curve,policy:this.policy}}}const q=new r.FixableBeetStruct([["accountDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["isInitialized",r.bool],["bumpSeed",r.u8],["tokenProgramId",h.publicKey],["tokenA",h.publicKey],["tokenB",h.publicKey],["poolMint",h.publicKey],["tokenAMint",h.publicKey],["tokenBMint",h.publicKey],["poolFeeAccount",h.publicKey],["fees",ve],["curve",Te],["policy",r.coption(h.publicKey)]],z.fromArgs,"TokenSwap");var ao=(t=>(t[t.ASC=0]="ASC",t[t.DESC=1]="DESC",t))(ao||{});const lo=dt("swap",()=>{const t=mt(),e=ft(),o=kt(),n=yt(),{publicKey:a}=ht(),{notify:l}=wt(),y=St(()=>new ro(new Ke(t.connection,n.value??{publicKey:At.default},Ke.defaultOptions()))),T=D({}),S=D([]),A=D([]),v=D([]),u=D(),W=Re("token-a",""),I=Re("token-b",""),i=gt({loading:!1,slippageDialog:!1,poolBalance:{},poolTokenSupply:0,from:Oe,to:Oe,swapping:!1,active:!1,slippage:.01,rate:0,minimumReceived:0,impact:0,fees:{host:0,trade:0,ownerTrade:0,ownerWithdraw:0},direction:0}),{handleFilterToken:ot,tokens:M}=bt();ot(vt),B(M,()=>{if(M.value.length>=2){const c=M.value.find(m=>m.mint===W.value)??M.value[0];let p=M.value.find(m=>m.mint===I.value)??M.value[1];if(i.from=M.value.find(m=>m.mint===W.value)??M.value[0],i.to=M.value.find(m=>m.mint===I.value)??M.value[1],c===p){const m=M.value.find(g=>g.mint!==c.mint);m&&(p=m)}i.from=c,i.to=p}},{immediate:!0}),B(()=>i.from,()=>{i.from&&(W.value=i.from.mint)}),B(()=>i.to,()=>{i.to&&(I.value=i.to.mint)});const Be=he(async()=>{i.loading=!0;try{console.log("swapClient ================: ",y.value),S.value=await y.value.loadAll(),console.log("swaps ================: ",S.value)}catch(c){console.log(c),S.value=[]}finally{i.loading=!1}},400);B([n,()=>t.cluster],async c=>{Be()?.then(),c||it()},{immediate:!0});const Me=he(async()=>{if(a.value&&A.value.length>0){const c={};for(const p of A.value)try{const m=await we(p.data.poolMint,a.value),g=await Tt(t.connection,m);c[p.data.poolMint.toBase58()]=Number(g.amount),console.log("userAcc === ",g)}catch{}T.value=c}},500);B([a,A],Me,{immediate:!0});const ye=D(!1),C=he(async()=>{if(console.log("loadPoolTokenAccounts ========= "),!!u.value){ye.value=!0;try{const c=await Bt(t.connection,y.value.swapAuthority(u.value.pubkey)),p={};for(const g of c)p[`${g.mint}`]=g.amount;i.poolBalance=p;const m=await Mt(t.connection,u.value.data.poolMint);i.poolTokenSupply=Number(m.supply),console.log("[Pool Balance] poolMint",m),console.log("[Pool Balance]",i.poolBalance),console.log("[Pool Balance] poolTokenSupply",i.poolTokenSupply)}catch(c){console.log("[Pool Balance] error",c)}finally{ye.value=!1}}},500);setInterval(C,6e4);function nt(c){u.value=c,console.log("setTokenSwap: ",u.value)}B([S,()=>o.servicePolicy],async()=>{console.log("tokenSwapsAll: ",S.value),A.value=S.value.filter(c=>!!o.servicePolicy.find(p=>p.pubkey.toBase58()===c.data.swapPolicy?.toBase58())&&!!o.servicePolicy.find(p=>p.pubkey.toBase58()===c.data.addLiquidityPolicy?.toBase58())&&!!e.tokenByMint(c.data.tokenAMint.toBase58())&&!!e.tokenByMint(c.data.tokenBMint.toBase58()))},{immediate:!0}),B([A,()=>i.from?.mint,()=>i.to?.mint,()=>o.servicePolicy],async()=>{if(console.log("tokenSwapsAllFiltered: ",A.value),A.value&&i.from?.mint&&i.to?.mint&&i.from.mint!==i.to.mint&&o.servicePolicy.length)if(v.value=A.value.filter(c=>{const p=c.data?.tokenAMint.toBase58(),m=c.data?.tokenBMint.toBase58();return p===i.from.mint&&m===i.to.mint||p===i.to.mint&&m===i.from.mint}),v.value.length){if(v.value.length>1){const c=v.value.find(p=>o.state.certificates?.find(m=>m.data?.policy.toBase58()===p.data.swapPolicy?.toBase58()||m.data?.policy.toBase58()===p.data.addLiquidityPolicy?.toBase58()));c&&(u.value=c)}u.value=v.value[0]}else u.value=void 0;else v.value=[],u.value=void 0,o.setContractPolicy("","swap"),o.setContractPolicy("","liquidity"),i.poolBalance={}},{immediate:!0}),B([u],async()=>{console.log("Token SWAP: ",u.value),o.setContractPolicy(u.value?.data.swapPolicy?.toBase58()??"","swap"),o.setContractPolicy(u.value?.data.addLiquidityPolicy?.toBase58()??"","liquidity"),u.value&&(C(),u.value.data.tokenAMint.toBase58()===i.from.mint?i.direction=0:i.direction=1)},{immediate:!0});function it(){i.loading=!1,i.slippageDialog=!1,i.poolBalance={},i.poolTokenSupply=0}B([()=>i.direction,()=>i.from.amount,()=>i.poolBalance],async()=>{const c=Number(i.from.amount??0),p=qe(Number(i.poolBalance[i.from.mint]??0),i.from.decimals),m=qe(Number(i.poolBalance[i.to.mint]??0),i.to.decimals),g=1-i.fees.ownerTrade-i.fees.trade;if(c===0||Number.isNaN(c)){i.to.amount=0,i.rate=Number(m)/Number(p)*g,i.impact=0,i.minimumReceived=0;return}const b=m-p*m/(p+c*g);i.rate=c?b/c:m/p,i.to.amount=b?Number(Ft(b,i.to.decimals)):0,i.impact=c?1-b/c/g/(m/p):0,i.minimumReceived=K(i.to.amount-i.to.amount*i.slippage,i.to.decimals)},{immediate:!0});async function rt(){if(!o.certificateValid)return Et();if(!u.value||!a.value){console.log("Pool is not selected...");return}n.value.publicKey||l({type:"info",message:"Please connect your wallet first"});const p=Number(K(i.from.amount??0,i.from.decimals)),m=Number(K(o.tokenBalance(i.from.mint)??0,i.from.decimals)),g=Number(K(i.to.amount??0,i.to.decimals));if(p>m){l({type:"negative",message:"Insufficient balance."});return}try{i.swapping=!0;const b=i.direction===0?u.value.data.tokenAMint:u.value.data.tokenBMint,N=i.direction===0?u.value.data.tokenBMint:u.value.data.tokenAMint,Pe=i.direction===0?u.value.data.tokenA:u.value.data.tokenB,We=i.direction===0?u.value.data.tokenB:u.value.data.tokenA;console.log("userSourceMint = ",b.toBase58()),console.log("userDestinationMint = ",N.toBase58()),console.log("userSourceMint = ",b.toBase58()),console.log("userDestinationMint = ",N.toBase58());const xe=await we(b,n.value.publicKey),ze=await we(N,n.value.publicKey),Ie=p;console.log("toAmount = ",g),console.log("slippage = ",i.slippage),console.log("slippage 2 = ",g*i.slippage);const De=y.value.swapAuthority(u.value.pubkey);console.log("proofRequest = ",o.certificate?.pubkey.toBase58()),console.log("swapAuthority = ",De),console.log("tokenSwap = ",u.value.pubkey.toBase58()),console.log("userSource = ",xe.toBase58()),console.log("userDestination = ",ze.toBase58()),console.log("poolSource = ",Pe.toBase58()),console.log("poolDestination = ",We.toBase58()),console.log("poolMint = ",u.value.data.poolMint.toBase58()),console.log("poolFee = ",u.value.data.poolFeeAccount.toBase58()),console.log("amountIn = ",Ie),console.log("minimumAmountOut = ",i.minimumReceived);const ct=await y.value.swap({proofRequest:o.certificate?.pubkey,authority:De,tokenSwap:u.value.pubkey,userSource:xe,userDestination:ze,poolSource:Pe,poolDestination:We,poolMint:u.value.data.poolMint,poolFee:u.value.data.poolFeeAccount,amountIn:Ie,minimumAmountOut:i.minimumReceived,sourceTokenMint:b,destinationTokenMint:N},{commitment:"confirmed"});l({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${ct}?cluster=${t.cluster}`,onClick:()=>!1}]}),Fe()}catch(b){console.log(b),console.error(b.logs),`${b}`.includes("User rejected the request")||l({type:"negative",message:`${b}`})}finally{i.swapping=!1}}function at(){const{from:c,to:p}=i;i.rate=0,i.to={...c,amount:void 0},i.from={...p,amount:void 0},i.direction=i.direction===0?1:0}function st(){i.slippageDialog=!1}function Fe(){C(),i.from.amount=void 0,i.to.amount=void 0}B(()=>n.value?.publicKey,c=>{c||Fe()}),B(()=>i.to,c=>{c.amount&&(c.amount=void 0)});function Ee(c){return{host:R(c.fees.hostFeeNumerator,c.fees.hostFeeDenominator),trade:R(c.fees.tradeFeeNumerator,c.fees.tradeFeeDenominator),ownerTrade:R(c.fees.ownerTradeFeeNumerator,c.fees.ownerTradeFeeDenominator),ownerWithdraw:R(c.fees.ownerWithdrawFeeNumerator,c.fees.ownerWithdrawFeeDenominator)}}return B(u,c=>{if(!c)return;const p=Ee(c.data);i.fees.host=p.host,i.fees.trade=p.trade,i.fees.ownerTrade=p.ownerTrade,i.fees.ownerWithdraw=p.ownerWithdraw,console.log("fees ==== ",i.fees)}),{state:i,tokenSwapsAllFiltered:A,tokenSwaps:v,tokenSwap:u,swapClient:y,loadingPoolTokens:ye,loadPoolTokenAccounts:C,setTokenSwap:nt,closeSlippage:st,changeDirection:at,swapSubmit:rt,getPoolFee:Ee,init:Be,tokenAMint:W,tokenBMint:I,userPoolsTokens:T,reloadUserLP:Me}});export{ao as S,_e as k,lo as u}; +import{m as d,aN as ge,aO as be,a as Ze,q as P,b7 as Ce,b8 as Ne,b9 as ut,ba as lt,bb as r,bc as h,n as x,bd as pt,S as Se,R as w,s as dt,u as mt,t as ft,w as kt,x as yt,y as ht,z as wt,v as St,K as Ke,P as At,G as D,A as Re,B as gt,be as Oe,W as bt,H as vt,C as B,ap as he,I as we,J as Tt,bf as Bt,bg as Mt,af as qe,a6 as Ft,aB as K,Q as Et,bh as R}from"./index-3e319056.js";import{b as E,d as Xe,A as Ye,N as Le,g as Ue,T as Ge,a as Je,c as $e}from"./associatedTokenAccount-56e3fa33.js";var L;(function(t){t[t.InitializeMint=0]="InitializeMint",t[t.InitializeAccount=1]="InitializeAccount",t[t.InitializeMultisig=2]="InitializeMultisig",t[t.Transfer=3]="Transfer",t[t.Approve=4]="Approve",t[t.Revoke=5]="Revoke",t[t.SetAuthority=6]="SetAuthority",t[t.MintTo=7]="MintTo",t[t.Burn=8]="Burn",t[t.CloseAccount=9]="CloseAccount",t[t.FreezeAccount=10]="FreezeAccount",t[t.ThawAccount=11]="ThawAccount",t[t.TransferChecked=12]="TransferChecked",t[t.ApproveChecked=13]="ApproveChecked",t[t.MintToChecked=14]="MintToChecked",t[t.BurnChecked=15]="BurnChecked",t[t.InitializeAccount2=16]="InitializeAccount2",t[t.SyncNative=17]="SyncNative",t[t.InitializeAccount3=18]="InitializeAccount3",t[t.InitializeMultisig2=19]="InitializeMultisig2",t[t.InitializeMint2=20]="InitializeMint2",t[t.GetAccountDataSize=21]="GetAccountDataSize",t[t.InitializeImmutableOwner=22]="InitializeImmutableOwner",t[t.AmountToUiAmount=23]="AmountToUiAmount",t[t.UiAmountToAmount=24]="UiAmountToAmount",t[t.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",t[t.TransferFeeExtension=26]="TransferFeeExtension",t[t.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",t[t.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",t[t.Reallocate=29]="Reallocate",t[t.MemoTransferExtension=30]="MemoTransferExtension",t[t.CreateNativeMint=31]="CreateNativeMint",t[t.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",t[t.InterestBearingMintExtension=33]="InterestBearingMintExtension",t[t.CpiGuardExtension=34]="CpiGuardExtension",t[t.InitializePermanentDelegate=35]="InitializePermanentDelegate",t[t.TransferHookExtension=36]="TransferHookExtension",t[t.MetadataPointerExtension=39]="MetadataPointerExtension"})(L||(L={}));function Pt(t,e,o){if(o.length){t.push({pubkey:e,isSigner:!1,isWritable:!1});for(const n of o)t.push({pubkey:n instanceof d?n:n.publicKey,isSigner:!0,isWritable:!1})}else t.push({pubkey:e,isSigner:!0,isWritable:!1});return t}const Ve=ge([be("instruction")]);function Wt(t,e,o,n=[],a=E){const l=Pt([{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}],o,n),y=Ze.Buffer.alloc(Ve.span);return Ve.encode({instruction:L.CloseAccount},y),new P({keys:l,programId:a,data:y})}const xt=ge([Ce("mintAuthorityOption"),Ne("mintAuthority"),ut("supply"),be("decimals"),lt("isInitialized"),Ce("freezeAuthorityOption"),Ne("freezeAuthority")]);xt.span;async function zt(t,e,o=!1,n=E,a=Ye){if(!o&&!d.isOnCurve(e.toBuffer()))throw new Xe;const[l]=await d.findProgramAddress([e.toBuffer(),n.toBuffer(),t.toBuffer()],a);return l}function He(t,e,o=!1,n=E,a=Ye){if(!o&&!d.isOnCurve(e.toBuffer()))throw new Xe;const[l]=d.findProgramAddressSync([e.toBuffer(),n.toBuffer(),t.toBuffer()],a);return l}const je=ge([be("instruction")]);function It(t,e=E){const o=[{pubkey:t,isSigner:!1,isWritable:!0}],n=Ze.Buffer.alloc(je.span);return je.encode({instruction:L.SyncNative},n),new P({keys:o,programId:e,data:n})}var Dt=Object.defineProperty,Ct=(t,e,o)=>e in t?Dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(t,e,o)=>(Ct(t,typeof e!="symbol"?e+"":e,o),o);const ve=new r.BeetArgsStruct([["tradeFeeNumerator",r.u64],["tradeFeeDenominator",r.u64],["ownerTradeFeeNumerator",r.u64],["ownerTradeFeeDenominator",r.u64],["ownerWithdrawFeeNumerator",r.u64],["ownerWithdrawFeeDenominator",r.u64],["hostFeeNumerator",r.u64],["hostFeeDenominator",r.u64]],"FeesInfo"),Te=new r.BeetArgsStruct([["curveType",r.u8],["curveParameters",r.uniformFixedSizeArray(r.u8,32)]],"CurveInfo"),Ae=[135,144,215,161,140,125,41,96];class F{constructor(e,o,n,a,l,y,T,S,A,v,u,W,I,i){this.isInitialized=e,this.bumpSeed=o,this.tokenProgramId=n,this.tokenA=a,this.tokenB=l,this.poolMint=y,this.tokenAMint=T,this.tokenBMint=S,this.poolFeeAccount=A,this.fees=v,this.curve=u,this.swapPolicy=W,this.addLiquidityPolicy=I,this.reserved=i}static fromArgs(e){return new F(e.isInitialized,e.bumpSeed,e.tokenProgramId,e.tokenA,e.tokenB,e.poolMint,e.tokenAMint,e.tokenBMint,e.poolFeeAccount,e.fees,e.curve,e.swapPolicy,e.addLiquidityPolicy,e.reserved)}static fromAccountInfo(e,o=0){return F.deserialize(e.data,o)}static async fromAccountAddress(e,o,n){const a=await e.getAccountInfo(o,n);if(a==null)throw new Error(`Unable to find TokenSwap account at ${o}`);return F.fromAccountInfo(a,0)[0]}static gpaBuilder(e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){return h.GpaBuilder.fromStruct(e,O)}static deserialize(e,o=0){return O.deserialize(e,o)}serialize(){return O.serialize({accountDiscriminator:Ae,...this})}static byteSize(e){const o=F.fromArgs(e);return O.toFixedFromValue({accountDiscriminator:Ae,...o}).byteSize}static async getMinimumBalanceForRentExemption(e,o,n){return o.getMinimumBalanceForRentExemption(F.byteSize(e),n)}pretty(){return{isInitialized:this.isInitialized,bumpSeed:this.bumpSeed,tokenProgramId:this.tokenProgramId.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),poolMint:this.poolMint.toBase58(),tokenAMint:this.tokenAMint.toBase58(),tokenBMint:this.tokenBMint.toBase58(),poolFeeAccount:this.poolFeeAccount.toBase58(),fees:this.fees,curve:this.curve,swapPolicy:this.swapPolicy,addLiquidityPolicy:this.addLiquidityPolicy,reserved:this.reserved}}}const O=new r.FixableBeetStruct([["accountDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["isInitialized",r.bool],["bumpSeed",r.u8],["tokenProgramId",h.publicKey],["tokenA",h.publicKey],["tokenB",h.publicKey],["poolMint",h.publicKey],["tokenAMint",h.publicKey],["tokenBMint",h.publicKey],["poolFeeAccount",h.publicKey],["fees",ve],["curve",Te],["swapPolicy",r.coption(h.publicKey)],["addLiquidityPolicy",r.coption(h.publicKey)],["reserved",r.uniformFixedSizeArray(r.u8,64)]],F.fromArgs,"TokenSwap"),f=new Map,k=new Map;class U extends Error{constructor(){super("Swap account already in use"),s(this,"code",6e3),s(this,"name","AlreadyInUse"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,U)}}f.set(6e3,()=>new U);k.set("AlreadyInUse",()=>new U);class G extends Error{constructor(){super("Invalid program address generated from bump seed and key"),s(this,"code",6001),s(this,"name","InvalidProgramAddress"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,G)}}f.set(6001,()=>new G);k.set("InvalidProgramAddress",()=>new G);class J extends Error{constructor(){super("Input account owner is not the program address"),s(this,"code",6002),s(this,"name","InvalidOwner"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,J)}}f.set(6002,()=>new J);k.set("InvalidOwner",()=>new J);class $ extends Error{constructor(){super("Output pool account owner cannot be the program address"),s(this,"code",6003),s(this,"name","InvalidOutputOwner"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$)}}f.set(6003,()=>new $);k.set("InvalidOutputOwner",()=>new $);class V extends Error{constructor(){super("Deserialized account is not an SPL Token mint"),s(this,"code",6004),s(this,"name","ExpectedMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,V)}}f.set(6004,()=>new V);k.set("ExpectedMint",()=>new V);class H extends Error{constructor(){super("Deserialized account is not an SPL Token account"),s(this,"code",6005),s(this,"name","ExpectedAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,H)}}f.set(6005,()=>new H);k.set("ExpectedAccount",()=>new H);class j extends Error{constructor(){super("Input token account empty"),s(this,"code",6006),s(this,"name","EmptySupply"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j)}}f.set(6006,()=>new j);k.set("EmptySupply",()=>new j);class Q extends Error{constructor(){super("Pool token mint has a non-zero supply"),s(this,"code",6007),s(this,"name","InvalidSupply"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Q)}}f.set(6007,()=>new Q);k.set("InvalidSupply",()=>new Q);class Z extends Error{constructor(){super("Token account has a delegate"),s(this,"code",6008),s(this,"name","InvalidDelegate"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Z)}}f.set(6008,()=>new Z);k.set("InvalidDelegate",()=>new Z);class X extends Error{constructor(){super("InvalidInput"),s(this,"code",6009),s(this,"name","InvalidInput"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,X)}}f.set(6009,()=>new X);k.set("InvalidInput",()=>new X);class Y extends Error{constructor(){super("Address of the provided swap token account is incorrect"),s(this,"code",6010),s(this,"name","IncorrectSwapAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Y)}}f.set(6010,()=>new Y);k.set("IncorrectSwapAccount",()=>new Y);class _ extends Error{constructor(){super("Address of the provided pool token mint is incorrect"),s(this,"code",6011),s(this,"name","IncorrectPoolMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,_)}}f.set(6011,()=>new _);k.set("IncorrectPoolMint",()=>new _);class ee extends Error{constructor(){super("InvalidOutput"),s(this,"code",6012),s(this,"name","InvalidOutput"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ee)}}f.set(6012,()=>new ee);k.set("InvalidOutput",()=>new ee);class te extends Error{constructor(){super("General calculation failure due to overflow or underflow"),s(this,"code",6013),s(this,"name","CalculationFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,te)}}f.set(6013,()=>new te);k.set("CalculationFailure",()=>new te);class oe extends Error{constructor(){super("Invalid instruction"),s(this,"code",6014),s(this,"name","InvalidInstruction"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,oe)}}f.set(6014,()=>new oe);k.set("InvalidInstruction",()=>new oe);class ne extends Error{constructor(){super("Swap input token accounts have the same mint"),s(this,"code",6015),s(this,"name","RepeatedMint"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ne)}}f.set(6015,()=>new ne);k.set("RepeatedMint",()=>new ne);class ie extends Error{constructor(){super("Swap instruction exceeds desired slippage limit"),s(this,"code",6016),s(this,"name","ExceededSlippage"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ie)}}f.set(6016,()=>new ie);k.set("ExceededSlippage",()=>new ie);class re extends Error{constructor(){super("Token account has a close authority"),s(this,"code",6017),s(this,"name","InvalidCloseAuthority"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,re)}}f.set(6017,()=>new re);k.set("InvalidCloseAuthority",()=>new re);class ae extends Error{constructor(){super("Pool token mint has a freeze authority"),s(this,"code",6018),s(this,"name","InvalidFreezeAuthority"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ae)}}f.set(6018,()=>new ae);k.set("InvalidFreezeAuthority",()=>new ae);class se extends Error{constructor(){super("Pool fee token account incorrect"),s(this,"code",6019),s(this,"name","IncorrectFeeAccount"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,se)}}f.set(6019,()=>new se);k.set("IncorrectFeeAccount",()=>new se);class ce extends Error{constructor(){super("Given pool token amount results in zero trading tokens"),s(this,"code",6020),s(this,"name","ZeroTradingTokens"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ce)}}f.set(6020,()=>new ce);k.set("ZeroTradingTokens",()=>new ce);class ue extends Error{constructor(){super("Fee calculation failed due to overflow, underflow, or unexpected 0"),s(this,"code",6021),s(this,"name","FeeCalculationFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ue)}}f.set(6021,()=>new ue);k.set("FeeCalculationFailure",()=>new ue);class le extends Error{constructor(){super("Conversion to u64/u128 failed with an overflow or underflow"),s(this,"code",6022),s(this,"name","ConversionFailure"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,le)}}f.set(6022,()=>new le);k.set("ConversionFailure",()=>new le);class pe extends Error{constructor(){super("The provided fee does not match the program owner's constraints"),s(this,"code",6023),s(this,"name","InvalidFee"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,pe)}}f.set(6023,()=>new pe);k.set("InvalidFee",()=>new pe);class de extends Error{constructor(){super("The provided token program does not match the token program expected by the swap"),s(this,"code",6024),s(this,"name","IncorrectTokenProgramId"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,de)}}f.set(6024,()=>new de);k.set("IncorrectTokenProgramId",()=>new de);class me extends Error{constructor(){super("The provided curve type is not supported by the program owner"),s(this,"code",6025),s(this,"name","UnsupportedCurveType"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,me)}}f.set(6025,()=>new me);k.set("UnsupportedCurveType",()=>new me);class fe extends Error{constructor(){super("The provided curve parameters are invalid"),s(this,"code",6026),s(this,"name","InvalidCurve"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fe)}}f.set(6026,()=>new fe);k.set("InvalidCurve",()=>new fe);class ke extends Error{constructor(){super("The operation cannot be performed on the given curve"),s(this,"code",6027),s(this,"name","UnsupportedCurveOperation"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ke)}}f.set(6027,()=>new ke);k.set("UnsupportedCurveOperation",()=>new ke);const Nt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)]],"CloseInstructionArgs"),Kt=[98,165,201,177,108,65,206,96];function Rt(t,e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[o]=Nt.serialize({instructionDiscriminator:Kt}),n=[{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destTokenA,isWritable:!0,isSigner:!1},{pubkey:t.destTokenB,isWritable:!0,isSigner:!1},{pubkey:t.payer,isWritable:!0,isSigner:!0},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1},{pubkey:t.systemProgram??Se.programId,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const a of t.anchorRemainingAccounts)n.push(a);return new P({programId:e,keys:n,data:o})}const Ot=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["poolTokenAmount",r.u64],["maximumTokenAAmount",r.u64],["maximumTokenBAmount",r.u64]],"DepositAllTokenTypesInstructionArgs"),qt=[32,95,69,60,75,79,205,238];function Lt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Ot.serialize({instructionDiscriminator:qt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.userTokenA,isWritable:!0,isSigner:!1},{pubkey:t.userTokenB,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const Ut=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["sourceTokenAmount",r.u64],["minimumPoolTokenAmount",r.u64]],"DepositSingleTokenTypeInstructionArgs"),Gt=[175,0,152,41,199,0,148,43];function Jt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Ut.serialize({instructionDiscriminator:Gt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const $t=new r.FixableBeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["feesInput",ve],["curveInput",Te],["swapPolicy",r.coption(h.publicKey)],["addLiquidityPolicy",r.coption(h.publicKey)]],"InitializeInstructionArgs"),Vt=[175,175,109,31,13,152,155,237];function Ht(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=$t.serialize({instructionDiscriminator:Vt,...e}),a=[{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!0,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.tokenA,isWritable:!0,isSigner:!1},{pubkey:t.tokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const jt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["amountIn",r.u64],["minimumAmountOut",r.u64]],"SwapInstructionArgs"),Qt=[248,198,158,145,225,117,135,200];function Zt(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=jt.serialize({instructionDiscriminator:Qt,...e}),a=[{pubkey:t.proofRequest??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.userSource,isWritable:!0,isSigner:!1},{pubkey:t.userDestination,isWritable:!0,isSigner:!1},{pubkey:t.poolSource,isWritable:!0,isSigner:!1},{pubkey:t.poolDestination,isWritable:!0,isSigner:!1},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.hostFeeAccount??o,isWritable:!1,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const Xt=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["poolTokenAmount",r.u64],["minimumTokenAAmount",r.u64],["minimumTokenBAmount",r.u64]],"WithdrawAllTokenTypesInstructionArgs"),Yt=[189,254,156,174,210,9,164,216];function _t(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=Xt.serialize({instructionDiscriminator:Yt,...e}),a=[{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destTokenA,isWritable:!0,isSigner:!1},{pubkey:t.destTokenB,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}const eo=new r.BeetArgsStruct([["instructionDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["destinationTokenAmount",r.u64],["maximumPoolTokenAmount",r.u64]],"WithdrawSingleTokenTypeInstructionArgs"),to=[111,171,21,77,237,181,241,56];function oo(t,e,o=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){const[n]=eo.serialize({instructionDiscriminator:to,...e}),a=[{pubkey:t.tokenSwap,isWritable:!1,isSigner:!1},{pubkey:t.authority,isWritable:!1,isSigner:!1},{pubkey:t.userTransferAuthority,isWritable:!1,isSigner:!0},{pubkey:t.poolMint,isWritable:!0,isSigner:!1},{pubkey:t.source,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenA,isWritable:!0,isSigner:!1},{pubkey:t.swapTokenB,isWritable:!0,isSigner:!1},{pubkey:t.destination,isWritable:!0,isSigner:!1},{pubkey:t.poolFee,isWritable:!0,isSigner:!1},{pubkey:t.tokenProgram??E,isWritable:!1,isSigner:!1}];if(t.anchorRemainingAccounts!=null)for(const l of t.anchorRemainingAccounts)a.push(l);return new P({programId:o,keys:a,data:n})}var _e=(t=>(t[t.ConstantProduct=0]="ConstantProduct",t[t.ConstantPrice=1]="ConstantPrice",t[t.Offset=2]="Offset",t))(_e||{});r.fixedScalarEnum(_e);var et=(t=>(t[t.Floor=0]="Floor",t[t.Ceiling=1]="Ceiling",t))(et||{});r.fixedScalarEnum(et);var tt=(t=>(t[t.AtoB=0]="AtoB",t[t.BtoA=1]="BtoA",t))(tt||{});r.fixedScalarEnum(tt);const no="ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq",io=new d(no);class ro{constructor(e){s(this,"programId",io),this.provider=e}get connection(){return this.provider.connection}swapAuthority(e){return d.findProgramAddressSync([e.toBuffer()],this.programId)[0]}async closeTokenSwap(e,o){const n=new x,a=this.provider.publicKey,l=this.swapAuthority(e.tokenSwap),y=await this.load(e.tokenSwap),T=He(y.tokenAMint,a),S=He(y.tokenBMint,a);return await this.handleMissingTokenAccount(n,T,y.tokenAMint),await this.handleMissingTokenAccount(n,S,y.tokenBMint),n.add(Rt({payer:a,tokenSwap:e.tokenSwap,authority:l,destTokenA:T,destTokenB:S,swapTokenA:y.tokenA,swapTokenB:y.tokenB})),{signature:await this.provider.sendAndConfirm(n,[],o)}}async createTokenSwap(e,o){const n=new x,a=e.tokenSwap??pt.generate(),l=Array.from({length:32}),y=Array.from(e.curveParameters??[]);for(let u=0;u({pubkey:n,data:e.noData?null:F.fromAccountInfo(a)[0]}))}unwrapSol(e,o,n){n&&n.toBase58()===Le.toBase58()&&e.add(Wt(o,this.provider.publicKey,this.provider.publicKey))}async handleMissingTokenAccount(e,o,n){try{await Ue(this.connection,o)}catch(a){(a instanceof Ge||a instanceof Je)&&n&&e.add($e(this.provider.publicKey,o,this.provider.publicKey,n))}}async handleWrappedSol(e){var o;if(e.sourceTokenMint&&((o=e.sourceTokenMint)==null?void 0:o.toBase58())===Le.toBase58()){let n=0;try{if((await zt(e.sourceTokenMint,this.provider.publicKey)).toBase58()!==e.userSource.toBase58())return;const l=await Ue(this.connection,e.userSource);n=Number(l.amount)}catch(l){(l instanceof Ge||l instanceof Je)&&e.tx.add($e(this.provider.publicKey,e.userSource,this.provider.publicKey,e.sourceTokenMint))}const a=Number(e.amount);e.amount>n&&e.tx.add(Se.transfer({fromPubkey:this.provider.publicKey,toPubkey:e.userSource,lamports:a-n}),It(e.userSource))}}}const Qe=[135,144,215,161,140,125,41,96];class z{constructor(e,o,n,a,l,y,T,S,A,v,u,W){this.isInitialized=e,this.bumpSeed=o,this.tokenProgramId=n,this.tokenA=a,this.tokenB=l,this.poolMint=y,this.tokenAMint=T,this.tokenBMint=S,this.poolFeeAccount=A,this.fees=v,this.curve=u,this.policy=W}static fromArgs(e){return new z(e.isInitialized,e.bumpSeed,e.tokenProgramId,e.tokenA,e.tokenB,e.poolMint,e.tokenAMint,e.tokenBMint,e.poolFeeAccount,e.fees,e.curve,e.policy)}static fromAccountInfo(e,o=0){return z.deserialize(e.data,o)}static async fromAccountAddress(e,o,n){const a=await e.getAccountInfo(o,n);if(a==null)throw new Error(`Unable to find TokenSwap account at ${o}`);return z.fromAccountInfo(a,0)[0]}static gpaBuilder(e=new d("ASWfaoztykN8Lz1P2uwuvwWR61SvFrvn6acM1sJpxKtq")){return h.GpaBuilder.fromStruct(e,q)}static deserialize(e,o=0){return q.deserialize(e,o)}serialize(){return q.serialize({accountDiscriminator:Qe,...this})}static byteSize(e){const o=z.fromArgs(e);return q.toFixedFromValue({accountDiscriminator:Qe,...o}).byteSize}static async getMinimumBalanceForRentExemption(e,o,n){return o.getMinimumBalanceForRentExemption(z.byteSize(e),n)}pretty(){return{isInitialized:this.isInitialized,bumpSeed:this.bumpSeed,tokenProgramId:this.tokenProgramId.toBase58(),tokenA:this.tokenA.toBase58(),tokenB:this.tokenB.toBase58(),poolMint:this.poolMint.toBase58(),tokenAMint:this.tokenAMint.toBase58(),tokenBMint:this.tokenBMint.toBase58(),poolFeeAccount:this.poolFeeAccount.toBase58(),fees:this.fees,curve:this.curve,policy:this.policy}}}const q=new r.FixableBeetStruct([["accountDiscriminator",r.uniformFixedSizeArray(r.u8,8)],["isInitialized",r.bool],["bumpSeed",r.u8],["tokenProgramId",h.publicKey],["tokenA",h.publicKey],["tokenB",h.publicKey],["poolMint",h.publicKey],["tokenAMint",h.publicKey],["tokenBMint",h.publicKey],["poolFeeAccount",h.publicKey],["fees",ve],["curve",Te],["policy",r.coption(h.publicKey)]],z.fromArgs,"TokenSwap");var ao=(t=>(t[t.ASC=0]="ASC",t[t.DESC=1]="DESC",t))(ao||{});const lo=dt("swap",()=>{const t=mt(),e=ft(),o=kt(),n=yt(),{publicKey:a}=ht(),{notify:l}=wt(),y=St(()=>new ro(new Ke(t.connection,n.value??{publicKey:At.default},Ke.defaultOptions()))),T=D({}),S=D([]),A=D([]),v=D([]),u=D(),W=Re("token-a",""),I=Re("token-b",""),i=gt({loading:!1,slippageDialog:!1,poolBalance:{},poolTokenSupply:0,from:Oe,to:Oe,swapping:!1,active:!1,slippage:.01,rate:0,minimumReceived:0,impact:0,fees:{host:0,trade:0,ownerTrade:0,ownerWithdraw:0},direction:0}),{handleFilterToken:ot,tokens:M}=bt();ot(vt),B(M,()=>{if(M.value.length>=2){const c=M.value.find(m=>m.mint===W.value)??M.value[0];let p=M.value.find(m=>m.mint===I.value)??M.value[1];if(i.from=M.value.find(m=>m.mint===W.value)??M.value[0],i.to=M.value.find(m=>m.mint===I.value)??M.value[1],c===p){const m=M.value.find(g=>g.mint!==c.mint);m&&(p=m)}i.from=c,i.to=p}},{immediate:!0}),B(()=>i.from,()=>{i.from&&(W.value=i.from.mint)}),B(()=>i.to,()=>{i.to&&(I.value=i.to.mint)});const Be=he(async()=>{i.loading=!0;try{console.log("swapClient ================: ",y.value),S.value=await y.value.loadAll(),console.log("swaps ================: ",S.value)}catch(c){console.log(c),S.value=[]}finally{i.loading=!1}},400);B([n,()=>t.cluster],async c=>{Be()?.then(),c||it()},{immediate:!0});const Me=he(async()=>{if(a.value&&A.value.length>0){const c={};for(const p of A.value)try{const m=await we(p.data.poolMint,a.value),g=await Tt(t.connection,m);c[p.data.poolMint.toBase58()]=Number(g.amount),console.log("userAcc === ",g)}catch{}T.value=c}},500);B([a,A],Me,{immediate:!0});const ye=D(!1),C=he(async()=>{if(console.log("loadPoolTokenAccounts ========= "),!!u.value){ye.value=!0;try{const c=await Bt(t.connection,y.value.swapAuthority(u.value.pubkey)),p={};for(const g of c)p[`${g.mint}`]=g.amount;i.poolBalance=p;const m=await Mt(t.connection,u.value.data.poolMint);i.poolTokenSupply=Number(m.supply),console.log("[Pool Balance] poolMint",m),console.log("[Pool Balance]",i.poolBalance),console.log("[Pool Balance] poolTokenSupply",i.poolTokenSupply)}catch(c){console.log("[Pool Balance] error",c)}finally{ye.value=!1}}},500);setInterval(C,6e4);function nt(c){u.value=c,console.log("setTokenSwap: ",u.value)}B([S,()=>o.servicePolicy],async()=>{console.log("tokenSwapsAll: ",S.value),A.value=S.value.filter(c=>!!o.servicePolicy.find(p=>p.pubkey.toBase58()===c.data.swapPolicy?.toBase58())&&!!o.servicePolicy.find(p=>p.pubkey.toBase58()===c.data.addLiquidityPolicy?.toBase58())&&!!e.tokenByMint(c.data.tokenAMint.toBase58())&&!!e.tokenByMint(c.data.tokenBMint.toBase58()))},{immediate:!0}),B([A,()=>i.from?.mint,()=>i.to?.mint,()=>o.servicePolicy],async()=>{if(console.log("tokenSwapsAllFiltered: ",A.value),A.value&&i.from?.mint&&i.to?.mint&&i.from.mint!==i.to.mint&&o.servicePolicy.length)if(v.value=A.value.filter(c=>{const p=c.data?.tokenAMint.toBase58(),m=c.data?.tokenBMint.toBase58();return p===i.from.mint&&m===i.to.mint||p===i.to.mint&&m===i.from.mint}),v.value.length){if(v.value.length>1){const c=v.value.find(p=>o.state.certificates?.find(m=>m.data?.policy.toBase58()===p.data.swapPolicy?.toBase58()||m.data?.policy.toBase58()===p.data.addLiquidityPolicy?.toBase58()));c&&(u.value=c)}u.value=v.value[0]}else u.value=void 0;else v.value=[],u.value=void 0,o.setContractPolicy("","swap"),o.setContractPolicy("","liquidity"),i.poolBalance={}},{immediate:!0}),B([u],async()=>{console.log("Token SWAP: ",u.value),o.setContractPolicy(u.value?.data.swapPolicy?.toBase58()??"","swap"),o.setContractPolicy(u.value?.data.addLiquidityPolicy?.toBase58()??"","liquidity"),u.value&&(C(),u.value.data.tokenAMint.toBase58()===i.from.mint?i.direction=0:i.direction=1)},{immediate:!0});function it(){i.loading=!1,i.slippageDialog=!1,i.poolBalance={},i.poolTokenSupply=0}B([()=>i.direction,()=>i.from.amount,()=>i.poolBalance],async()=>{const c=Number(i.from.amount??0),p=qe(Number(i.poolBalance[i.from.mint]??0),i.from.decimals),m=qe(Number(i.poolBalance[i.to.mint]??0),i.to.decimals),g=1-i.fees.ownerTrade-i.fees.trade;if(c===0||Number.isNaN(c)){i.to.amount=0,i.rate=Number(m)/Number(p)*g,i.impact=0,i.minimumReceived=0;return}const b=m-p*m/(p+c*g);i.rate=c?b/c:m/p,i.to.amount=b?Number(Ft(b,i.to.decimals)):0,i.impact=c?1-b/c/g/(m/p):0,i.minimumReceived=K(i.to.amount-i.to.amount*i.slippage,i.to.decimals)},{immediate:!0});async function rt(){if(!o.certificateValid)return Et();if(!u.value||!a.value){console.log("Pool is not selected...");return}n.value.publicKey||l({type:"info",message:"Please connect your wallet first"});const p=Number(K(i.from.amount??0,i.from.decimals)),m=Number(K(o.tokenBalance(i.from.mint)??0,i.from.decimals)),g=Number(K(i.to.amount??0,i.to.decimals));if(p>m){l({type:"negative",message:"Insufficient balance."});return}try{i.swapping=!0;const b=i.direction===0?u.value.data.tokenAMint:u.value.data.tokenBMint,N=i.direction===0?u.value.data.tokenBMint:u.value.data.tokenAMint,Pe=i.direction===0?u.value.data.tokenA:u.value.data.tokenB,We=i.direction===0?u.value.data.tokenB:u.value.data.tokenA;console.log("userSourceMint = ",b.toBase58()),console.log("userDestinationMint = ",N.toBase58()),console.log("userSourceMint = ",b.toBase58()),console.log("userDestinationMint = ",N.toBase58());const xe=await we(b,n.value.publicKey),ze=await we(N,n.value.publicKey),Ie=p;console.log("toAmount = ",g),console.log("slippage = ",i.slippage),console.log("slippage 2 = ",g*i.slippage);const De=y.value.swapAuthority(u.value.pubkey);console.log("proofRequest = ",o.certificate?.pubkey.toBase58()),console.log("swapAuthority = ",De),console.log("tokenSwap = ",u.value.pubkey.toBase58()),console.log("userSource = ",xe.toBase58()),console.log("userDestination = ",ze.toBase58()),console.log("poolSource = ",Pe.toBase58()),console.log("poolDestination = ",We.toBase58()),console.log("poolMint = ",u.value.data.poolMint.toBase58()),console.log("poolFee = ",u.value.data.poolFeeAccount.toBase58()),console.log("amountIn = ",Ie),console.log("minimumAmountOut = ",i.minimumReceived);const ct=await y.value.swap({proofRequest:o.certificate?.pubkey,authority:De,tokenSwap:u.value.pubkey,userSource:xe,userDestination:ze,poolSource:Pe,poolDestination:We,poolMint:u.value.data.poolMint,poolFee:u.value.data.poolFeeAccount,amountIn:Ie,minimumAmountOut:i.minimumReceived,sourceTokenMint:b,destinationTokenMint:N},{commitment:"confirmed"});l({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${ct}?cluster=${t.cluster}`,onClick:()=>!1}]}),Fe()}catch(b){console.log(b),console.error(b.logs),`${b}`.includes("User rejected the request")||l({type:"negative",message:`${b}`})}finally{i.swapping=!1}}function at(){const{from:c,to:p}=i;i.rate=0,i.to={...c,amount:void 0},i.from={...p,amount:void 0},i.direction=i.direction===0?1:0}function st(){i.slippageDialog=!1}function Fe(){C(),i.from.amount=void 0,i.to.amount=void 0}B(()=>n.value?.publicKey,c=>{c||Fe()}),B(()=>i.to,c=>{c.amount&&(c.amount=void 0)});function Ee(c){return{host:R(c.fees.hostFeeNumerator,c.fees.hostFeeDenominator),trade:R(c.fees.tradeFeeNumerator,c.fees.tradeFeeDenominator),ownerTrade:R(c.fees.ownerTradeFeeNumerator,c.fees.ownerTradeFeeDenominator),ownerWithdraw:R(c.fees.ownerWithdrawFeeNumerator,c.fees.ownerWithdrawFeeDenominator)}}return B(u,c=>{if(!c)return;const p=Ee(c.data);i.fees.host=p.host,i.fees.trade=p.trade,i.fees.ownerTrade=p.ownerTrade,i.fees.ownerWithdraw=p.ownerWithdraw,console.log("fees ==== ",i.fees)}),{state:i,tokenSwapsAllFiltered:A,tokenSwaps:v,tokenSwap:u,swapClient:y,loadingPoolTokens:ye,loadPoolTokenAccounts:C,setTokenSwap:nt,closeSlippage:st,changeDirection:at,swapSubmit:rt,getPoolFee:Ee,init:Be,tokenAMint:W,tokenBMint:I,userPoolsTokens:T,reloadUserLP:Me}});export{ao as S,_e as k,lo as u}; diff --git a/assets/transfer-ee9232a0.js b/assets/transfer-a0398881.js similarity index 95% rename from assets/transfer-ee9232a0.js rename to assets/transfer-a0398881.js index 447393c..5b2a34f 100644 --- a/assets/transfer-ee9232a0.js +++ b/assets/transfer-a0398881.js @@ -1 +1 @@ -import{_ as ie,a as re,b as ce}from"./AppDescriptionTop-ae09eb9e.js";import{_ as le}from"./PolicyCard.vue_vue_type_script_setup_true_lang-e90adfeb.js";import{o as ue,_ as de}from"./SelectToken.vue_vue_type_script_setup_true_lang-9ad50b98.js";import{k,m as K,n as O,S as G,q as J,s as fe,u as pe,t as me,v as u,w as P,x as ve,y as H,z as _e,A as ke,B as ge,C as h,F as M,P as w,G as V,H as B,I as j,J as ye,K as D,L as be,M as Te,N as Y,O as he,Q as we,R as L,U as Se,V as Ae,W as xe,X as Ne,o as W,Y as Re,Z as S,$ as Ee,j as c,a0 as C,a1 as $,a2 as r,a3 as i,i as Z,a4 as qe,a5 as U,a6 as X,a7 as Q,a8 as z,a9 as Ce,aa as Me,ab as Fe,ac as Ie,_ as Pe,ad as Be}from"./index-d1afe763.js";import{g as We,T as Ke,a as Oe,c as Ve,b as je}from"./associatedTokenAccount-50901cf8.js";var De=Object.defineProperty,Le=(s,e,t)=>e in s?De(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$e=(s,e,t)=>(Le(s,typeof e!="symbol"?e+"":e,t),t);const Ue=new k.BeetArgsStruct([["instructionDiscriminator",k.uniformFixedSizeArray(k.u8,8)],["amount",k.u64]],"SplTransferInstructionArgs"),Xe=[67,186,237,99,235,243,166,198];function Qe(s,e,t=new K("ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe")){const[o]=Ue.serialize({instructionDiscriminator:Xe,...e}),d=[{pubkey:s.sender,isWritable:!0,isSigner:!0},{pubkey:s.receiver,isWritable:!0,isSigner:!1},{pubkey:s.tokenMint,isWritable:!1,isSigner:!1},{pubkey:s.source,isWritable:!0,isSigner:!1},{pubkey:s.destination,isWritable:!0,isSigner:!1},{pubkey:s.policy,isWritable:!1,isSigner:!1},{pubkey:s.proofRequest,isWritable:!1,isSigner:!1},{pubkey:s.tokenProgram??je,isWritable:!1,isSigner:!1},{pubkey:s.systemProgram??G.programId,isWritable:!1,isSigner:!1}];if(s.anchorRemainingAccounts!=null)for(const f of s.anchorRemainingAccounts)d.push(f);return new J({programId:t,keys:d,data:o})}const ze=new k.BeetArgsStruct([["instructionDiscriminator",k.uniformFixedSizeArray(k.u8,8)],["amount",k.u64]],"TransferInstructionArgs"),Ge=[163,52,200,231,140,3,69,186];function Je(s,e,t=new K("ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe")){const[o]=ze.serialize({instructionDiscriminator:Ge,...e}),d=[{pubkey:s.sender,isWritable:!0,isSigner:!0},{pubkey:s.receiver,isWritable:!0,isSigner:!1},{pubkey:s.policy,isWritable:!1,isSigner:!1},{pubkey:s.proofRequest,isWritable:!1,isSigner:!1},{pubkey:s.systemProgram??G.programId,isWritable:!1,isSigner:!1}];if(s.anchorRemainingAccounts!=null)for(const f of s.anchorRemainingAccounts)d.push(f);return new J({programId:t,keys:d,data:o})}const He="ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe",Ye=new K(He);class Ze{constructor(e){$e(this,"programId",Ye),this.provider=e}get connection(){return this.provider.connection}async transfer(e,t){const o=this.createTransferTx(e);return this.provider.sendAndConfirm(o,[],t)}createTransferTx(e){const t=Je({proofRequest:e.proofRequest,policy:e.policy,sender:this.provider.publicKey,receiver:e.receiver},{amount:e.amount});return new O().add(t)}async getTransferFee(e){const t=this.createTransferTx(e);return this.transactionFee(t)}async transferToken(e,t){const o=await this.createTransferTokenTx(e);return this.provider.sendAndConfirm(o,[],t)}async createTransferTokenTx(e){const t=new O;try{await We(this.connection,e.destination)}catch(o){(o instanceof Ke||o instanceof Oe)&&t.add(Ve(this.provider.publicKey,e.destination,e.receiver,e.tokenMint))}return t.add(Qe({proofRequest:e.proofRequest,policy:e.policy,sender:this.provider.publicKey,receiver:e.receiver,source:e.source,destination:e.destination,tokenMint:e.tokenMint},{amount:e.amount})),t}async getTransferTokenFee(e){const t=await this.createTransferTokenTx(e);return this.transactionFee(t)}async transactionFee(e){e.recentBlockhash=(await this.connection.getLatestBlockhash("finalized")).blockhash,e.feePayer=this.provider.publicKey;const{value:t}=await this.connection.getFeeForMessage(e.compileMessage(),"confirmed");return Number(t)}}const en=fe("transfer",()=>{const s=pe(),e=me(),t=u(()=>e.tokens),o=P(),{state:d,getUserTokens:f}=P(),p=u(()=>o.certificate),R=u(()=>o.requiredPolicy),F=u(()=>o.certificateValid),A=0,b=ve(),{publicKey:E}=H(),{notify:v}=_e(),g=ke("token-transfer",""),n=ge({address:"",value:void 0,loading:!1,token:void 0,fee:A,valid:!1});h(t,()=>{t.value.length&&(console.log("find token ===================== ",t.value.find(a=>a.mint===g.value)),n.token=t.value.find(a=>a.mint===g.value)??t.value[0])},{immediate:!0});function x(){n.value=void 0,n.fee=A}h(()=>n.token,()=>{x(),o.policySpec=n.token?.name??"",console.log("state token ===================== ",n.token),n.token&&(g.value=n.token.mint,console.log("transfer token ===================== ",g.value))}),h(()=>b.value?.publicKey,a=>{a||(x(),n.address="")}),h(()=>n.address,async()=>{n.valid=M(n.address)});const _=u(()=>{const a=n.token?.mint??"";return M(a)?new w(a):""}),y=u(()=>M(n.address)?new w(n.address):""),m=V(),l=V(!1);h([_,y,()=>n.valid],async()=>{if(n.token?.mint===B)return l.value=!0;if(_.value&&y.value&&n.valid)try{return m.value=await j(_.value,y.value),await ye(s.connection,m.value),l.value=!0}catch{l.value=!1}l.value=!1}),h([()=>n.valid,()=>n.value,m],()=>{n.valid&&Number(n.value)>0?I():n.fee=A});const q=u(()=>new Ze(new D(s.connection,b.value??{publicKey:w.default},D.defaultOptions())));async function I(){const a=await be(b.value?.publicKey,n.address,Number(n.value),s.connection),T=await Te(a,s.connection)+Y;return n.fee=l.value?T:T+he}async function N(){try{if(n.loading=!0,console.log("[debug] on transfer certificate === ",p.value),F.value){let a;n.token?.mint===B?a=await ee():a=await ne(),v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${a}?cluster=${s.cluster}`,onClick:()=>!1}]}),x(),await f()}else we()}catch(a){console.error("verifyTransfer error: ",a),`${a}`.includes("User rejected the request")||v({type:"negative",message:`${a}`})}finally{n.loading=!1}}async function ee(){if(p.value){const a=new L(Number(n.value)*Se),T=new w(n.address);return await q.value.transfer({amount:a,receiver:T,proofRequest:p.value.pubkey,policy:new w(R.value)})}}async function ne(){if(!E.value||!n.token?.mint)return;const a=d.tokens.find(oe=>oe.mint===n.token?.mint);if(!a||!_.value||!y.value||!b.value||!p.value)return;const T=await j(_.value,E.value),ae=new L(Number(n.value)*10**a.decimals);return await q.value.transferToken({destination:m.value,source:T,tokenMint:_.value,amount:ae,receiver:y.value,proofRequest:p.value.pubkey,policy:new w(R.value)})}function te(a){n.value=a}function se(a){console.log("set token ======== ",a),n.token=a}return{state:n,setMax:te,setToken:se,verifyTransfer:N}}),nn={class:"swap-form"},tn={class:"swap-field"},sn={class:"swap-field__info"},an={class:"row"},on=r("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),rn={class:"col row justify-end swap-field__balance q-pr-sm"},cn={key:0,class:"insufficient-error"},ln=r("div",{class:"token-select swap-field__label q-pl-sm"}," ASSET ",-1),un={class:"row justify-between",style:{gap:"10px"}},dn={class:"transfer-address"},fn=r("div",{class:"col transfer-address__label"}," Address ",-1),pn={class:"swap-info q-mt-md"},mn=r("dt",null,"Transfer fee:",-1),vn={class:"swap-submit"},_n=Ae({__name:"TransferCard",setup(s){const{state:e,setMax:t,setToken:o,verifyTransfer:d}=en(),{state:f,tokenBalance:p}=P(),{handleSearchToken:R,handleFilterToken:F,tokens:A}=xe();F(Ne);const b=u(()=>[...A.value].sort((m,l)=>p(l.symbol)-p(m.symbol))),{connected:E}=H(),v=u(()=>e.token?.mint?p(e.token.mint):0),g=u(()=>v.value===0),n=u(()=>Number(e.value)>v.value);async function x(){const m=n.value?"Insufficient funds":"Not valid address";if(!e.valid||n.value)return Me.create({type:"negative",timeout:2e3,message:m});d()}function _(){t(v.value),e.token?.mint===B&&(e.value=v.value-Fe-3*Ie-Y)}const y=u(()=>E.value&&Number(e.value)>0&&M(e.address));return(m,l)=>{const q=de,I=le;return W(),Re(Ee,{class:"swap-card transfer-card"},{default:S(()=>[c($,{class:"swap-card__header"},{default:S(()=>[C(" Transfer ")]),_:1}),c($,{class:"swap-card__body"},{default:S(()=>[r("div",nn,[r("div",tn,[r("div",sn,[r("div",an,[on,r("div",rn,[i(n)?(W(),Z("div",cn," Insufficient funds ")):qe("",!0),C(" Balance: "+U(i(X)(i(v))),1)]),ln])]),r("div",un,[c(Q,{modelValue:i(e).value,"onUpdate:modelValue":l[0]||(l[0]=N=>i(e).value=N),disable:i(g),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:i(ue)},{append:S(()=>[c(z,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:_},{default:S(()=>[C(" MAX ")]),_:1})]),_:1},8,["modelValue","disable","onKeypress"]),c(q,{token:i(e).token,options:i(b),onHandleSearchToken:i(R),onSetToken:i(o)},null,8,["token","options","onHandleSearchToken","onSetToken"])])])]),r("div",dn,[fn,c(Q,{modelValue:i(e).address,"onUpdate:modelValue":l[1]||(l[1]=N=>i(e).address=N),disable:i(g),maxlength:50,outlined:"",class:"swap-input col"},null,8,["modelValue","disable"])]),r("div",pn,[r("dl",null,[mn,r("dd",null,U(i(X)(i(e).fee,6)),1)])]),c(I,{class:"q-my-md q-mx-auto"}),r("div",vn,[c(z,{loading:i(e)?.loading,disable:!i(y),rounded:"",ripple:!1,onClick:x},{default:S(()=>[C(" Send ")]),_:1},8,["loading","disable"])])]),_:1}),c(Ce,{showing:i(f)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),kn={},gn={class:"main-block row justify-center"};function yn(s,e){const t=ie,o=_n,d=re,f=ce;return W(),Z(Be,null,[c(t,{class:"q-mt-lg"}),r("div",gn,[c(o)]),c(d,{class:"q-mt-lg"}),c(f,{class:"q-mt-lg"})],64)}const An=Pe(kn,[["render",yn]]);export{An as default}; +import{_ as ie,a as re,b as ce}from"./AppDescriptionTop-8f9fdf69.js";import{_ as le}from"./PolicyCard.vue_vue_type_script_setup_true_lang-a8a3092d.js";import{o as ue,_ as de}from"./SelectToken.vue_vue_type_script_setup_true_lang-4b560017.js";import{k,m as K,n as O,S as G,q as J,s as fe,u as pe,t as me,v as u,w as P,x as ve,y as H,z as _e,A as ke,B as ge,C as h,F as M,P as w,G as V,H as B,I as j,J as ye,K as D,L as be,M as Te,N as Y,O as he,Q as we,R as L,U as Se,V as Ae,W as xe,X as Ne,o as W,Y as Re,Z as S,$ as Ee,j as c,a0 as C,a1 as $,a2 as r,a3 as i,i as Z,a4 as qe,a5 as U,a6 as X,a7 as Q,a8 as z,a9 as Ce,aa as Me,ab as Fe,ac as Ie,_ as Pe,ad as Be}from"./index-3e319056.js";import{g as We,T as Ke,a as Oe,c as Ve,b as je}from"./associatedTokenAccount-56e3fa33.js";var De=Object.defineProperty,Le=(s,e,t)=>e in s?De(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$e=(s,e,t)=>(Le(s,typeof e!="symbol"?e+"":e,t),t);const Ue=new k.BeetArgsStruct([["instructionDiscriminator",k.uniformFixedSizeArray(k.u8,8)],["amount",k.u64]],"SplTransferInstructionArgs"),Xe=[67,186,237,99,235,243,166,198];function Qe(s,e,t=new K("ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe")){const[o]=Ue.serialize({instructionDiscriminator:Xe,...e}),d=[{pubkey:s.sender,isWritable:!0,isSigner:!0},{pubkey:s.receiver,isWritable:!0,isSigner:!1},{pubkey:s.tokenMint,isWritable:!1,isSigner:!1},{pubkey:s.source,isWritable:!0,isSigner:!1},{pubkey:s.destination,isWritable:!0,isSigner:!1},{pubkey:s.policy,isWritable:!1,isSigner:!1},{pubkey:s.proofRequest,isWritable:!1,isSigner:!1},{pubkey:s.tokenProgram??je,isWritable:!1,isSigner:!1},{pubkey:s.systemProgram??G.programId,isWritable:!1,isSigner:!1}];if(s.anchorRemainingAccounts!=null)for(const f of s.anchorRemainingAccounts)d.push(f);return new J({programId:t,keys:d,data:o})}const ze=new k.BeetArgsStruct([["instructionDiscriminator",k.uniformFixedSizeArray(k.u8,8)],["amount",k.u64]],"TransferInstructionArgs"),Ge=[163,52,200,231,140,3,69,186];function Je(s,e,t=new K("ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe")){const[o]=ze.serialize({instructionDiscriminator:Ge,...e}),d=[{pubkey:s.sender,isWritable:!0,isSigner:!0},{pubkey:s.receiver,isWritable:!0,isSigner:!1},{pubkey:s.policy,isWritable:!1,isSigner:!1},{pubkey:s.proofRequest,isWritable:!1,isSigner:!1},{pubkey:s.systemProgram??G.programId,isWritable:!1,isSigner:!1}];if(s.anchorRemainingAccounts!=null)for(const f of s.anchorRemainingAccounts)d.push(f);return new J({programId:t,keys:d,data:o})}const He="ATRh9CiamTjKiJ3XcsbxmGtDoeqg6XujUvgPLemEMCBe",Ye=new K(He);class Ze{constructor(e){$e(this,"programId",Ye),this.provider=e}get connection(){return this.provider.connection}async transfer(e,t){const o=this.createTransferTx(e);return this.provider.sendAndConfirm(o,[],t)}createTransferTx(e){const t=Je({proofRequest:e.proofRequest,policy:e.policy,sender:this.provider.publicKey,receiver:e.receiver},{amount:e.amount});return new O().add(t)}async getTransferFee(e){const t=this.createTransferTx(e);return this.transactionFee(t)}async transferToken(e,t){const o=await this.createTransferTokenTx(e);return this.provider.sendAndConfirm(o,[],t)}async createTransferTokenTx(e){const t=new O;try{await We(this.connection,e.destination)}catch(o){(o instanceof Ke||o instanceof Oe)&&t.add(Ve(this.provider.publicKey,e.destination,e.receiver,e.tokenMint))}return t.add(Qe({proofRequest:e.proofRequest,policy:e.policy,sender:this.provider.publicKey,receiver:e.receiver,source:e.source,destination:e.destination,tokenMint:e.tokenMint},{amount:e.amount})),t}async getTransferTokenFee(e){const t=await this.createTransferTokenTx(e);return this.transactionFee(t)}async transactionFee(e){e.recentBlockhash=(await this.connection.getLatestBlockhash("finalized")).blockhash,e.feePayer=this.provider.publicKey;const{value:t}=await this.connection.getFeeForMessage(e.compileMessage(),"confirmed");return Number(t)}}const en=fe("transfer",()=>{const s=pe(),e=me(),t=u(()=>e.tokens),o=P(),{state:d,getUserTokens:f}=P(),p=u(()=>o.certificate),R=u(()=>o.requiredPolicy),F=u(()=>o.certificateValid),A=0,b=ve(),{publicKey:E}=H(),{notify:v}=_e(),g=ke("token-transfer",""),n=ge({address:"",value:void 0,loading:!1,token:void 0,fee:A,valid:!1});h(t,()=>{t.value.length&&(console.log("find token ===================== ",t.value.find(a=>a.mint===g.value)),n.token=t.value.find(a=>a.mint===g.value)??t.value[0])},{immediate:!0});function x(){n.value=void 0,n.fee=A}h(()=>n.token,()=>{x(),o.policySpec=n.token?.name??"",console.log("state token ===================== ",n.token),n.token&&(g.value=n.token.mint,console.log("transfer token ===================== ",g.value))}),h(()=>b.value?.publicKey,a=>{a||(x(),n.address="")}),h(()=>n.address,async()=>{n.valid=M(n.address)});const _=u(()=>{const a=n.token?.mint??"";return M(a)?new w(a):""}),y=u(()=>M(n.address)?new w(n.address):""),m=V(),l=V(!1);h([_,y,()=>n.valid],async()=>{if(n.token?.mint===B)return l.value=!0;if(_.value&&y.value&&n.valid)try{return m.value=await j(_.value,y.value),await ye(s.connection,m.value),l.value=!0}catch{l.value=!1}l.value=!1}),h([()=>n.valid,()=>n.value,m],()=>{n.valid&&Number(n.value)>0?I():n.fee=A});const q=u(()=>new Ze(new D(s.connection,b.value??{publicKey:w.default},D.defaultOptions())));async function I(){const a=await be(b.value?.publicKey,n.address,Number(n.value),s.connection),T=await Te(a,s.connection)+Y;return n.fee=l.value?T:T+he}async function N(){try{if(n.loading=!0,console.log("[debug] on transfer certificate === ",p.value),F.value){let a;n.token?.mint===B?a=await ee():a=await ne(),v({message:"Transaction confirmed",type:"positive",actions:[{label:"Explore",color:"white",target:"_blank",href:`https://explorer.solana.com/tx/${a}?cluster=${s.cluster}`,onClick:()=>!1}]}),x(),await f()}else we()}catch(a){console.error("verifyTransfer error: ",a),`${a}`.includes("User rejected the request")||v({type:"negative",message:`${a}`})}finally{n.loading=!1}}async function ee(){if(p.value){const a=new L(Number(n.value)*Se),T=new w(n.address);return await q.value.transfer({amount:a,receiver:T,proofRequest:p.value.pubkey,policy:new w(R.value)})}}async function ne(){if(!E.value||!n.token?.mint)return;const a=d.tokens.find(oe=>oe.mint===n.token?.mint);if(!a||!_.value||!y.value||!b.value||!p.value)return;const T=await j(_.value,E.value),ae=new L(Number(n.value)*10**a.decimals);return await q.value.transferToken({destination:m.value,source:T,tokenMint:_.value,amount:ae,receiver:y.value,proofRequest:p.value.pubkey,policy:new w(R.value)})}function te(a){n.value=a}function se(a){console.log("set token ======== ",a),n.token=a}return{state:n,setMax:te,setToken:se,verifyTransfer:N}}),nn={class:"swap-form"},tn={class:"swap-field"},sn={class:"swap-field__info"},an={class:"row"},on=r("div",{class:"col-2 swap-field__label"}," AMOUNT ",-1),rn={class:"col row justify-end swap-field__balance q-pr-sm"},cn={key:0,class:"insufficient-error"},ln=r("div",{class:"token-select swap-field__label q-pl-sm"}," ASSET ",-1),un={class:"row justify-between",style:{gap:"10px"}},dn={class:"transfer-address"},fn=r("div",{class:"col transfer-address__label"}," Address ",-1),pn={class:"swap-info q-mt-md"},mn=r("dt",null,"Transfer fee:",-1),vn={class:"swap-submit"},_n=Ae({__name:"TransferCard",setup(s){const{state:e,setMax:t,setToken:o,verifyTransfer:d}=en(),{state:f,tokenBalance:p}=P(),{handleSearchToken:R,handleFilterToken:F,tokens:A}=xe();F(Ne);const b=u(()=>[...A.value].sort((m,l)=>p(l.symbol)-p(m.symbol))),{connected:E}=H(),v=u(()=>e.token?.mint?p(e.token.mint):0),g=u(()=>v.value===0),n=u(()=>Number(e.value)>v.value);async function x(){const m=n.value?"Insufficient funds":"Not valid address";if(!e.valid||n.value)return Me.create({type:"negative",timeout:2e3,message:m});d()}function _(){t(v.value),e.token?.mint===B&&(e.value=v.value-Fe-3*Ie-Y)}const y=u(()=>E.value&&Number(e.value)>0&&M(e.address));return(m,l)=>{const q=de,I=le;return W(),Re(Ee,{class:"swap-card transfer-card"},{default:S(()=>[c($,{class:"swap-card__header"},{default:S(()=>[C(" Transfer ")]),_:1}),c($,{class:"swap-card__body"},{default:S(()=>[r("div",nn,[r("div",tn,[r("div",sn,[r("div",an,[on,r("div",rn,[i(n)?(W(),Z("div",cn," Insufficient funds ")):qe("",!0),C(" Balance: "+U(i(X)(i(v))),1)]),ln])]),r("div",un,[c(Q,{modelValue:i(e).value,"onUpdate:modelValue":l[0]||(l[0]=N=>i(e).value=N),disable:i(g),maxlength:14,outlined:"",placeholder:"0.0",class:"swap-input col",onKeypress:i(ue)},{append:S(()=>[c(z,{dense:"",unelevated:"",ripple:!1,class:"swap-input__max",onClick:_},{default:S(()=>[C(" MAX ")]),_:1})]),_:1},8,["modelValue","disable","onKeypress"]),c(q,{token:i(e).token,options:i(b),onHandleSearchToken:i(R),onSetToken:i(o)},null,8,["token","options","onHandleSearchToken","onSetToken"])])])]),r("div",dn,[fn,c(Q,{modelValue:i(e).address,"onUpdate:modelValue":l[1]||(l[1]=N=>i(e).address=N),disable:i(g),maxlength:50,outlined:"",class:"swap-input col"},null,8,["modelValue","disable"])]),r("div",pn,[r("dl",null,[mn,r("dd",null,U(i(X)(i(e).fee,6)),1)])]),c(I,{class:"q-my-md q-mx-auto"}),r("div",vn,[c(z,{loading:i(e)?.loading,disable:!i(y),rounded:"",ripple:!1,onClick:x},{default:S(()=>[C(" Send ")]),_:1},8,["loading","disable"])])]),_:1}),c(Ce,{showing:i(f)?.loading,class:"swap-loading",color:"grey"},null,8,["showing"])]),_:1})}}}),kn={},gn={class:"main-block row justify-center"};function yn(s,e){const t=ie,o=_n,d=re,f=ce;return W(),Z(Be,null,[c(t,{class:"q-mt-lg"}),r("div",gn,[c(o)]),c(d,{class:"q-mt-lg"}),c(f,{class:"q-mt-lg"})],64)}const An=Pe(kn,[["render",yn]]);export{An as default}; diff --git a/assets/v4-84582c03.js b/assets/v4-0cd80fc6.js similarity index 98% rename from assets/v4-84582c03.js rename to assets/v4-0cd80fc6.js index a457844..2df664e 100644 --- a/assets/v4-84582c03.js +++ b/assets/v4-0cd80fc6.js @@ -1 +1 @@ -import{c as C}from"./index-d1afe763.js";var U={exports:{}};(function(o){var s=Object.prototype.hasOwnProperty,l="~";function h(){}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(l=!1));function _(i,t,n){this.fn=i,this.context=t,this.once=n||!1}function E(i,t,n,r,v){if(typeof n!="function")throw new TypeError("The listener must be a function");var a=new _(n,r||i,v),u=l?l+t:t;return i._events[u]?i._events[u].fn?i._events[u]=[i._events[u],a]:i._events[u].push(a):(i._events[u]=a,i._eventsCount++),i}function g(i,t){--i._eventsCount===0?i._events=new h:delete i._events[t]}function p(){this._events=new h,this._eventsCount=0}p.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)s.call(n,r)&&t.push(l?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t},p.prototype.listeners=function(t){var n=l?l+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var v=0,a=r.length,u=new Array(a);v - +