-1){var s=o.getAttribute("href");if(s)if(-1===s.toLowerCase().indexOf("https:")&&-1===s.toLowerCase().indexOf("http:")&&0!==s.indexOf("//")){var c=t.protocol+"//"+t.host;if(0===s.indexOf("/"))c+=s;else{var u=t.pathname.split("/");u.pop(),c+=u.join("/")+"/"+s}r.push(c)}else if(0===s.indexOf("//")){var p=t.protocol+s;r.push(p)}else r.push(s)}}return r}(),name:i}}},83145:function(e,t){function n(e){var t=void 0;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){var t=n(e);if(!t)throw new Error("".concat(e," is not defined in Window"));return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=n,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return n("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return n("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return n("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return n("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return n("localStorage")}},74944:function(e,t,n){var r=n(83145)},62047:function(e){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}}]);
\ No newline at end of file
diff --git a/static/js/7919.af2f37ab.chunk.js.LICENSE.txt b/static/js/7919.bbbca1cb.chunk.js.LICENSE.txt
similarity index 100%
rename from static/js/7919.af2f37ab.chunk.js.LICENSE.txt
rename to static/js/7919.bbbca1cb.chunk.js.LICENSE.txt
diff --git a/static/js/792.577a9e8e.chunk.js b/static/js/792.7c08d233.chunk.js
similarity index 95%
rename from static/js/792.577a9e8e.chunk.js
rename to static/js/792.7c08d233.chunk.js
index 8f755f8d..ec1121dc 100644
--- a/static/js/792.577a9e8e.chunk.js
+++ b/static/js/792.7c08d233.chunk.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[792],{40792:function(t,n,e){e.r(n),e.d(n,{PartnersPrograms:function(){return d}});var r=e(7276),s=e(54447),a=e(55967),i=e(15542),c=e(3498),o=e(2092),l=e(45263),d=function(){var t=(0,r.useMemo)((function(){return{institutions:{url:"https://docs.idle.finance/products/get-involved/institutions-program"},integrators:{url:"https://docs.idle.finance/products/get-involved/integrators-program"},security:{url:"https://docs.idle.finance/developers/security"}}}),[]);return(0,l.jsx)(c.MI,{spacing:6,width:"full",columns:[1,3],children:Object.keys(t).map((function(n,e){return(0,l.jsx)(s.Card.Flex,{flexDirection:"column",alignItems:"flex-start",children:(0,l.jsxs)(c.gC,{flex:1,spacing:6,alignItems:"flex-start",children:[(0,l.jsx)(o.Ee,{src:"images/partners/".concat(n,".png"),width:16,height:16}),(0,l.jsx)(i.Translation,{height:12,isHtml:!0,translation:"partnerPrograms.".concat(n,".title"),component:c.X6,as:"h3",fontSize:"h3"}),(0,l.jsx)(i.Translation,{translation:"partnerPrograms.".concat(n,".body"),textStyle:"captionSmall"}),(0,l.jsxs)(c.Ug,{flex:1,spacing:1,alignItems:"flex-end",children:[(0,l.jsx)(i.Translation,{href:t[n].url,component:c.rU,isExternal:!0,translation:"partnerPrograms.".concat(n,".cta"),textStyle:["ctaStatic","clickable"]}),(0,l.jsx)(a.AeI,{size:24})]})]})},"program_".concat(e))}))})}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[792],{40792:function(t,n,e){e.r(n),e.d(n,{PartnersPrograms:function(){return d}});var r=e(7276),s=e(54447),a=e(84849),i=e(15542),c=e(3498),o=e(2092),l=e(45263),d=function(){var t=(0,r.useMemo)((function(){return{institutions:{url:"https://docs.idle.finance/products/get-involved/institutions-program"},integrators:{url:"https://docs.idle.finance/products/get-involved/integrators-program"},security:{url:"https://docs.idle.finance/developers/security"}}}),[]);return(0,l.jsx)(c.MI,{spacing:6,width:"full",columns:[1,3],children:Object.keys(t).map((function(n,e){return(0,l.jsx)(s.Card.Flex,{flexDirection:"column",alignItems:"flex-start",children:(0,l.jsxs)(c.gC,{flex:1,spacing:6,alignItems:"flex-start",children:[(0,l.jsx)(o.Ee,{src:"images/partners/".concat(n,".png"),width:16,height:16}),(0,l.jsx)(i.Translation,{height:12,isHtml:!0,translation:"partnerPrograms.".concat(n,".title"),component:c.X6,as:"h3",fontSize:"h3"}),(0,l.jsx)(i.Translation,{translation:"partnerPrograms.".concat(n,".body"),textStyle:"captionSmall"}),(0,l.jsxs)(c.Ug,{flex:1,spacing:1,alignItems:"flex-end",children:[(0,l.jsx)(i.Translation,{href:t[n].url,component:c.rU,isExternal:!0,translation:"partnerPrograms.".concat(n,".cta"),textStyle:["ctaStatic","clickable"]}),(0,l.jsx)(a.AeI,{size:24})]})]})},"program_".concat(e))}))})}}}]);
\ No newline at end of file
diff --git a/static/js/8129.c36577d4.chunk.js b/static/js/8129.c1cc66ee.chunk.js
similarity index 98%
rename from static/js/8129.c36577d4.chunk.js
rename to static/js/8129.c1cc66ee.chunk.js
index 1b0dfb54..1a445509 100644
--- a/static/js/8129.c36577d4.chunk.js
+++ b/static/js/8129.c1cc66ee.chunk.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[8129],{88129:function(e,t,i){i.r(t),i.d(t,{StrategyOverview:function(){return x}});var n=i(1413),s=i(29439),a=i(23537),r=i(7276),l=i(86059),o=i(15542),u=i(1669),d=i(9597),c=i(3498),p=i(43127),g=i(89030),f=i(1494),y=i(45263),x=function(e){var t=e.textProps,i=e.showHeader,x=void 0===i||i,m=e.showLoading,v=void 0===m||m,A=e.strategies,b=(0,r.useState)(!0),h=(0,s.Z)(b,2),j=h[0],z=h[1],S=(0,u.w)(),w=S.isPortfolioAccountReady,Z=S.vaultsPositions,P=(0,f.O)({assetIds:Object.keys(Z),strategies:A}).compositions,I=(0,r.useMemo)((function(){return P.strategies.filter((function(e){return A.includes(e.extraData.strategy.type)})).reduce((function(e,t){return e.redeemable=e.redeemable.plus(t.value),e.earnings=e.earnings.plus(t.extraData.earnings),e.deposited=e.deposited.plus(t.extraData.deposited),e.realizedApy=e.realizedApy.plus((0,a.gA)(t.extraData.avgRealizedApy).times(t.value)),e}),{earnings:(0,a.gA)(0),deposited:(0,a.gA)(0),redeemable:(0,a.gA)(0),realizedApy:(0,a.gA)(0)})}),[P,A]);return I.realizedApy=I.redeemable.gt(0)?I.realizedApy.div(I.redeemable):(0,a.gA)(0),v||w?(0,y.jsxs)(c.gC,{spacing:4,width:"full",alignItems:"flex-start",children:[x&&(0,y.jsxs)(c.Ug,{height:10,spacing:2,children:[(0,y.jsx)(o.Translation,{translation:"defi.yourWallet",textStyle:"heading",color:"primary",fontSize:"lg"}),(0,y.jsx)(p.zx,{variant:"unstyled",onClick:function(){return z((function(e){return!e}))},children:j?(0,y.jsx)(d.Zju,{size:24,color:"white"}):(0,y.jsx)(d.I0d,{size:24,color:"white"})})]}),(0,y.jsxs)(c.MI,{columns:3,width:"full",spacing:[2,10],justifyContent:"space-between",children:[(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.deposits",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Usd,(0,n.Z)({value:I.deposited,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]}),(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.earnings",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Usd,(0,n.Z)({value:I.earnings,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]}),(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.realizedApy",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Percentage,(0,n.Z)({value:I.realizedApy,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]})]})]}):null}},1494:function(e,t,i){i.d(t,{O:function(){return c}});var n=i(93433),s=i(4942),a=i(1413),r=i(7276),l=i(23537),o=i(79681),u=i(12056),d=i(1669),c=function(e){var t=e.assetIds,i=e.strategies,c=(0,o.qM)(),p=(0,d.w)().selectors,g=p.selectAssetById,f=p.selectAssetsByIds,y=(0,r.useMemo)((function(){return f?f(t):[]}),[t,f]),x=Object.keys(u.A).reduce((function(e,t){return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},t,{balance:(0,l.gA)(0),earnings:(0,l.gA)(0),deposited:(0,l.gA)(0),weightedRealizedApy:(0,l.gA)(0)}))}),{}),m=(0,r.useMemo)((function(){return y.filter((function(e){return e.type&&(!i||i.includes(e.type))})).reduce((function(e,t){var i;return t.type&&t.vaultPosition?(e[t.type].earnings=e[t.type].earnings.plus(t.vaultPosition.usd.earnings),e[t.type].balance=e[t.type].balance.plus(t.vaultPosition.usd.redeemable),e[t.type].deposited=e[t.type].deposited.plus(t.vaultPosition.usd.deposited),(0,l.gA)(null===(i=t.vaultPosition)||void 0===i?void 0:i.realizedApy).gt(0)&&(e[t.type].weightedRealizedApy=e[t.type].weightedRealizedApy.plus(t.vaultPosition.realizedApy.times(t.vaultPosition.usd.redeemable))),e):e}),x)}),[y,i,x]),v=(0,r.useMemo)((function(){return y.filter((function(e){return e.type&&(!i||i.includes(e.type))})).reduce((function(e,t){if(!t.underlyingId||!t.vaultPosition)return e;var i=g(t.underlyingId);return i?(e[i.id]||(e[i.id]=(0,l.gA)(0)),e[i.id]=e[i.id].plus(t.vaultPosition.usd.redeemable),e):e}),{})}),[y,i,g]),A={assets:[],strategies:[]};A.strategies=(0,r.useMemo)((function(){return Object.keys(m).map((function(e){return{label:c(u.A[e].label),extraData:{avgRealizedApy:m[e].balance.gt(0)?parseFloat(m[e].weightedRealizedApy.div(m[e].balance)):0,strategy:u.A[e],earnings:parseFloat(m[e].earnings),deposited:parseFloat(m[e].deposited)},value:parseFloat(m[e].balance)}}))}),[m,c]),A.assets=(0,r.useMemo)((function(){return Object.keys(v).reduce((function(e,t){var s=g(t);return!s||s.type&&(!i||i.includes(s.type))?e:[].concat((0,n.Z)(e),[{label:s.name,extraData:{asset:s},value:parseFloat(v[t])}])}),[])}),[v,g,i]);var b={assets:{},strategies:{}};return b.strategies=(0,r.useMemo)((function(){return Object.values(u.A).reduce((function(e,t){var i=c(t.label);return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},i,t.color))}),{})}),[c]),b.assets=(0,r.useMemo)((function(){return Object.keys(v).reduce((function(e,t){var i=g(t);if(!i)return e;var n=i.name;return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},n,i.color))}),{})}),[v,g]),{colors:b,compositions:A}}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[8129],{88129:function(e,t,i){i.r(t),i.d(t,{StrategyOverview:function(){return x}});var n=i(1413),s=i(29439),a=i(23537),r=i(7276),l=i(86059),o=i(15542),u=i(1669),d=i(1645),c=i(3498),p=i(43127),g=i(89030),f=i(1494),y=i(45263),x=function(e){var t=e.textProps,i=e.showHeader,x=void 0===i||i,m=e.showLoading,v=void 0===m||m,A=e.strategies,b=(0,r.useState)(!0),h=(0,s.Z)(b,2),j=h[0],z=h[1],S=(0,u.w)(),w=S.isPortfolioAccountReady,Z=S.vaultsPositions,P=(0,f.O)({assetIds:Object.keys(Z),strategies:A}).compositions,I=(0,r.useMemo)((function(){return P.strategies.filter((function(e){return A.includes(e.extraData.strategy.type)})).reduce((function(e,t){return e.redeemable=e.redeemable.plus(t.value),e.earnings=e.earnings.plus(t.extraData.earnings),e.deposited=e.deposited.plus(t.extraData.deposited),e.realizedApy=e.realizedApy.plus((0,a.gA)(t.extraData.avgRealizedApy).times(t.value)),e}),{earnings:(0,a.gA)(0),deposited:(0,a.gA)(0),redeemable:(0,a.gA)(0),realizedApy:(0,a.gA)(0)})}),[P,A]);return I.realizedApy=I.redeemable.gt(0)?I.realizedApy.div(I.redeemable):(0,a.gA)(0),v||w?(0,y.jsxs)(c.gC,{spacing:4,width:"full",alignItems:"flex-start",children:[x&&(0,y.jsxs)(c.Ug,{height:10,spacing:2,children:[(0,y.jsx)(o.Translation,{translation:"defi.yourWallet",textStyle:"heading",color:"primary",fontSize:"lg"}),(0,y.jsx)(p.zx,{variant:"unstyled",onClick:function(){return z((function(e){return!e}))},children:j?(0,y.jsx)(d.Zju,{size:24,color:"white"}):(0,y.jsx)(d.I0d,{size:24,color:"white"})})]}),(0,y.jsxs)(c.MI,{columns:3,width:"full",spacing:[2,10],justifyContent:"space-between",children:[(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.deposits",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Usd,(0,n.Z)({value:I.deposited,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]}),(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.earnings",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Usd,(0,n.Z)({value:I.earnings,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]}),(0,y.jsxs)(c.gC,{spacing:2,alignItems:"flex-start",children:[(0,y.jsx)(o.Translation,{translation:"defi.realizedApy",textStyle:"captionSmall",fontSize:["xs","sm"]}),(0,y.jsx)(g.N2,{noOfLines:2,isLoaded:!!w,minW:"100%",children:(0,y.jsx)(l.Amount.Percentage,(0,n.Z)({value:I.realizedApy,textStyle:"ctaStatic",fontSize:"xl",lineHeight:"initial",sx:j?{}:{filter:"blur(7px)"}},t))})]})]})]}):null}},1494:function(e,t,i){i.d(t,{O:function(){return c}});var n=i(93433),s=i(4942),a=i(1413),r=i(7276),l=i(23537),o=i(79681),u=i(12056),d=i(1669),c=function(e){var t=e.assetIds,i=e.strategies,c=(0,o.qM)(),p=(0,d.w)().selectors,g=p.selectAssetById,f=p.selectAssetsByIds,y=(0,r.useMemo)((function(){return f?f(t):[]}),[t,f]),x=Object.keys(u.A).reduce((function(e,t){return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},t,{balance:(0,l.gA)(0),earnings:(0,l.gA)(0),deposited:(0,l.gA)(0),weightedRealizedApy:(0,l.gA)(0)}))}),{}),m=(0,r.useMemo)((function(){return y.filter((function(e){return e.type&&(!i||i.includes(e.type))})).reduce((function(e,t){var i;return t.type&&t.vaultPosition?(e[t.type].earnings=e[t.type].earnings.plus(t.vaultPosition.usd.earnings),e[t.type].balance=e[t.type].balance.plus(t.vaultPosition.usd.redeemable),e[t.type].deposited=e[t.type].deposited.plus(t.vaultPosition.usd.deposited),(0,l.gA)(null===(i=t.vaultPosition)||void 0===i?void 0:i.realizedApy).gt(0)&&(e[t.type].weightedRealizedApy=e[t.type].weightedRealizedApy.plus(t.vaultPosition.realizedApy.times(t.vaultPosition.usd.redeemable))),e):e}),x)}),[y,i,x]),v=(0,r.useMemo)((function(){return y.filter((function(e){return e.type&&(!i||i.includes(e.type))})).reduce((function(e,t){if(!t.underlyingId||!t.vaultPosition)return e;var i=g(t.underlyingId);return i?(e[i.id]||(e[i.id]=(0,l.gA)(0)),e[i.id]=e[i.id].plus(t.vaultPosition.usd.redeemable),e):e}),{})}),[y,i,g]),A={assets:[],strategies:[]};A.strategies=(0,r.useMemo)((function(){return Object.keys(m).map((function(e){return{label:c(u.A[e].label),extraData:{avgRealizedApy:m[e].balance.gt(0)?parseFloat(m[e].weightedRealizedApy.div(m[e].balance)):0,strategy:u.A[e],earnings:parseFloat(m[e].earnings),deposited:parseFloat(m[e].deposited)},value:parseFloat(m[e].balance)}}))}),[m,c]),A.assets=(0,r.useMemo)((function(){return Object.keys(v).reduce((function(e,t){var s=g(t);return!s||s.type&&(!i||i.includes(s.type))?e:[].concat((0,n.Z)(e),[{label:s.name,extraData:{asset:s},value:parseFloat(v[t])}])}),[])}),[v,g,i]);var b={assets:{},strategies:{}};return b.strategies=(0,r.useMemo)((function(){return Object.values(u.A).reduce((function(e,t){var i=c(t.label);return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},i,t.color))}),{})}),[c]),b.assets=(0,r.useMemo)((function(){return Object.keys(v).reduce((function(e,t){var i=g(t);if(!i)return e;var n=i.name;return(0,a.Z)((0,a.Z)({},e),{},(0,s.Z)({},n,i.color))}),{})}),[v,g]),{colors:b,compositions:A}}}}]);
\ No newline at end of file
diff --git a/static/js/8354.378d0a1c.chunk.js b/static/js/8354.378d0a1c.chunk.js
new file mode 100644
index 00000000..85b75020
--- /dev/null
+++ b/static/js/8354.378d0a1c.chunk.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[8354],{58354:function(e,n,u){u.r(n),u.d(n,{CreditVaultPage:function(){return r}});var r=function(){return null}}}]);
\ No newline at end of file
diff --git a/static/js/8415.5460062a.chunk.js b/static/js/8415.3e1f3d35.chunk.js
similarity index 99%
rename from static/js/8415.5460062a.chunk.js
rename to static/js/8415.3e1f3d35.chunk.js
index 39a69221..4b9c0c37 100644
--- a/static/js/8415.5460062a.chunk.js
+++ b/static/js/8415.3e1f3d35.chunk.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkidle_dashboard_new=self.webpackChunkidle_dashboard_new||[]).push([[8415,9949,9058,1805],{19949:function(t,e,n){n.r(e),n.d(e,{DiscountedFeesTable:function(){return y}});var a=n(1413),i=n(29439),s=n(45987),o=n(79681),l=n(72877),r=n(54447),c=n(66288),d=n(58316),u=n(1805),p=n(7276),x=n(10956),h=n(97778),m=n(15542),f=n(1669),g=n(3498),v=n(89030),j=n(10658),k=n(23537),w=n(45263),S=["showHeader"],y=function(t){var e=t.showHeader,n=void 0===e||e,y=(0,s.Z)(t,S),C=(0,o.qM)(),I=(0,c.X)().theme,b=(0,p.useState)(1),T=(0,i.Z)(b,2),D=T[0],M=T[1],A=(0,f.w)(),E=A.isPortfolioLoaded,z=A.discountedFees,L=(0,p.useMemo)((function(){return(0,k.xb)(z)?[]:(0,k.Pf)((0,k.mB)(Object.values(z).flat(),"hash"),"timeStamp","desc")}),[z]),P=(0,p.useMemo)((function(){return Math.ceil(L.length/l.qh)}),[L]),F=(0,p.useCallback)((function(){return!!D&&(M((function(t){return Math.max(1,t-1)})),!0)}),[M,D]),U=(0,p.useCallback)((function(){if(D===P)return!1;M((function(t){return Math.min(P,t+1)}))}),[M,D,P]),Z=(0,p.useMemo)((function(){return{sortBy:[{id:"tier",desc:!0}]}}),[]),W=(0,p.useMemo)((function(){return[{id:"id",Header:"#",accessor:"hash",display:"none"},{id:"asset",accessor:"assetId",Header:C("defi.asset"),Cell:function(t){var e=t.value;return(0,w.jsxs)(g.Ug,{spacing:2,width:"full",alignItems:"center",justifyContent:"space-between",children:[(0,w.jsx)(u.TableField,{field:"asset",value:E,assetId:e}),(0,w.jsx)(u.TableField,{field:"productTagWithRisk",value:E,assetId:e})]})}},{accessor:"value",Header:C("transactionRow.amount"),Cell:function(t){var e=t.value,n=t.row;return(0,w.jsx)(v.N2,{noOfLines:2,isLoaded:!!e,children:(0,w.jsx)(h.TokenAmount,{assetId:n.original.assetId,amount:e,showIcon:!1,textStyle:"tableCell"})})},sortType:k._O},{accessor:"timeStamp",Header:C("transactionRow.date"),Cell:function(t){var e=t.value;return(0,w.jsx)(g.xv,{textStyle:"tableCell",children:(0,k.p6)(e,"YYYY/MM/DD HH:mm",!0)})},sortType:k._O},{id:"hash",accessor:"hash",Header:C("transactionRow.hash"),Cell:function(t){var e=t.value,n=t.row;return(0,w.jsx)(g.Ug,{width:"full",justifyContent:"flex-start",children:(0,w.jsx)(j.TransactionLink,{hash:e,chainId:n.original.chainId})})},sortType:k._O}]}),[C,E]);return L.length?(0,w.jsxs)(r.Card,(0,a.Z)((0,a.Z)({p:0},y),{},{children:[n&&(0,w.jsx)(m.Translation,{translation:"defi.discountedFees",fontSize:"lg",component:r.Card.Heading}),(0,k.xb)(L)?(0,w.jsx)(g.gC,{py:6,width:"full",alignItems:"center",justifyContent:"center",children:(0,w.jsx)(m.Translation,{textAlign:"center",translation:"feeDiscount.table.stakingEmpty",color:"cta",isHtml:!0})}):(0,w.jsx)(d.ReactTable,{columns:W,data:L,page:D,rowsPerPage:l.qh,initialState:Z,onRowClick:function(t){return(0,k.xw)((0,k.QG)(t.original.chainId,t.original.hash))}}),P>1&&(0,w.jsx)(x.Pagination,{activePage:D,pages:P,justifyContent:"center",onPrevArrowClick:function(){D&&F()},onNextArrowClick:function(){D1&&(0,w.jsx)(x.Pagination,{activePage:D,pages:P,justifyContent:"center",onPrevArrowClick:function(){D&&F()},onNextArrowClick:function(){D
0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"===typeof n.disableReloadOnDisconnect&&n.disableReloadOnDisconnect(),n;var r=this.coinbaseBrowser;if(r)return r;var i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||i.setConnectDisabled(!0),new u.CoinbaseWalletProvider({relayProvider:function(){return Promise.resolve(i)},relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}},{key:"setAppInfo",value:function(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,f.getFavicon)();var r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}},{key:"disconnect",value:function(){var e,t=this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}},{key:"getQrUrl",value:function(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}},{key:"getCoinbaseWalletLogo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;return(0,o.walletLogo)(e,t)}},{key:"walletExtension",get:function(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}},{key:"coinbaseBrowser",get:function(){var e,t;try{var n=null!==(e=window.ethereum)&&void 0!==e?e:null===(t=window.top)||void 0===t?void 0:t.ethereum;if(!n)return;return"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch(r){return}}},{key:"isCipherProvider",value:function(e){return"boolean"===typeof e.isCipher&&e.isCipher}}]),e}();t.CoinbaseWalletSDK=p,p.VERSION=d},62354:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0;t.walletLogo=function(e,t){var n;switch(e){case"standard":default:return n=t,"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E ");case"circle":return n=t,"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='".concat(t,"' height='").concat(n,"' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E");case"text":return n=(.1*t).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E");case"textWithLogo":return n=(.25*t).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E");case"textLight":return n=(.1*t).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E");case"textWithLogoLight":return n=(.25*t).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E")}}},29741:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-item.light.selected{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark.selected{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item.selected{border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"},64751:function(e,t,n){"use strict";var r=n(27424).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseAppSteps=t.CoinbaseWalletSteps=t.ConnectItem=t.ConnectContent=void 0;var o=i(n(15171)),s=n(41943),u=n(6637),a=n(78504),c=n(21787),l=n(53517),f=i(n(85810)),h=i(n(89188)),d=n(12984),p=i(n(21226)),v=i(n(60123)),b=n(17338),y=n(72481),g=n(81844),m=i(n(29741)),_={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:h.default,steps:k},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:f.default,steps:x}},w=function(e){return"light"===e?"#FFFFFF":"#0A0B0D"};function E(e){var t=e.title,n=e.description,r=e.icon,i=e.selected,u=e.theme,a=e.onClick;return(0,s.h)("div",{onClick:a,class:(0,o.default)("-cbwsdk-connect-item",u,{selected:i})},(0,s.h)("div",null,(0,s.h)("img",{src:r,alt:t})),(0,s.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,s.h)("h3",{class:"-cbwsdk-connect-item-title"},t),(0,s.h)("p",{class:"-cbwsdk-connect-item-description"},n)))}function k(e){var t=e.theme;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,o.default)("-cbwsdk-wallet-steps-item",t)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,s.h)("li",{class:(0,o.default)("-cbwsdk-wallet-steps-item",t)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,s.h)("span",null,"Tap ",(0,s.h)("strong",null,"Scan")," "),(0,s.h)("span",{class:(0,o.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(d.QRCodeIcon,{fill:w(t)})))))}function x(e){var t=e.theme;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,o.default)("-cbwsdk-wallet-steps-item",t)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,s.h)("li",{class:(0,o.default)("-cbwsdk-wallet-steps-item",t)},(0,s.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,s.h)("span",null,"Tap ",(0,s.h)("strong",null,"More")),(0,s.h)("span",{class:(0,o.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(b.StatusDotIcon,{fill:w(t)})),(0,s.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,s.h)("strong",null,"Scan")),(0,s.h)("span",{class:(0,o.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(d.QRCodeIcon,{fill:w(t)})))))}t.ConnectContent=function(e){var t=e.theme,n=(0,u.useState)("coinbase-wallet-app"),i=r(n,2),f=i[0],h=i[1],d=(0,u.useCallback)((function(e){h(e)}),[]),b=(0,a.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId);if(!f)return null;var w,k=_[f].steps,x="coinbase-app"===f;return(0,s.h)("div",{"data-testid":"connect-content",class:(0,o.default)("-cbwsdk-connect-content",t)},(0,s.h)("style",null,m.default),(0,s.h)("div",{class:"-cbwsdk-connect-content-header"},(0,s.h)("h2",{class:(0,o.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with one of our mobile apps"),e.onCancel&&(0,s.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,s.h)(l.CloseIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,s.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,s.h)("div",null,Object.entries(_).map((function(e){var n=r(e,2),i=n[0],o=n[1];return(0,s.h)(E,{key:i,title:o.title,description:o.description,icon:o.icon,selected:f===i,onClick:function(){return d(i)},theme:t})}))),x&&(0,s.h)("div",{class:(0,o.default)("-cbwsdk-connect-content-update-app",t)},"Don\u2019t see a ",(0,s.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,s.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,s.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,s.h)(y.QRCode,{content:b,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:(w=f,"coinbase-app"===w?p.default:v.default),width:25,height:25}}),(0,s.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:c.LIB_VERSION}),(0,s.h)("input",{type:"hidden",value:b})),(0,s.h)(k,{theme:t}),!e.isConnected&&(0,s.h)("div",{"data-testid":"connecting-spinner",class:(0,o.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,s.h)(g.Spinner,{size:36,color:"dark"===t?"#FFF":"#000"}),(0,s.h)("p",null,"Connecting...")))))},t.ConnectItem=E,t.CoinbaseWalletSteps=k,t.CoinbaseAppSteps=x},44692:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"},14731:function(e,t,n){"use strict";var r=n(27424).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectDialog=void 0;var o=i(n(15171)),s=n(41943),u=n(6637),a=n(64751),c=n(38893),l=i(n(44692));t.ConnectDialog=function(e){var t=e.isOpen,n=e.darkMode,i=(0,u.useState)(!t),f=r(i,2),h=f[0],d=f[1],p=(0,u.useState)(!t),v=r(p,2),b=v[0],y=v[1];(0,u.useEffect)((function(){var e=[window.setTimeout((function(){y(!t)}),10)];return t?d(!1):e.push(window.setTimeout((function(){d(!0)}),360)),function(){e.forEach(window.clearTimeout)}}),[e.isOpen]);var g=n?"dark":"light";return(0,s.h)("div",{class:(0,o.default)("-cbwsdk-connect-dialog-container",h&&"-cbwsdk-connect-dialog-container-hidden")},(0,s.h)("style",null,l.default),(0,s.h)("div",{class:(0,o.default)("-cbwsdk-connect-dialog-backdrop",g,b&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,s.h)("div",{class:"-cbwsdk-connect-dialog"},(0,s.h)("div",{class:(0,o.default)("-cbwsdk-connect-dialog-box",b&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,s.h)(a.ConnectContent,{theme:g,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,s.h)(c.TryExtensionContent,{theme:g}))))}},40358:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;var o=n(41943),s=n(66829),u=n(14731),a=function(){function e(t){r(this,e),this.extensionUI$=new s.BehaviorSubject({}),this.subscriptions=new s.Subscription,this.isConnected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$,this.chainId$=t.chainId$}return i(e,[{key:"attach",value:function(e){var t=this;this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((function(e){t.isConnected!==e&&(t.isConnected=e,t.render())}))),this.subscriptions.add(this.chainId$.subscribe((function(e){t.chainId!==e&&(t.chainId=e,t.render())})))}},{key:"detach",value:function(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,o.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}},{key:"setConnectDisabled",value:function(e){this.connectDisabled=e}},{key:"open",value:function(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}},{key:"close",value:function(){this.isOpen=!1,this.onCancel=null,this.render()}},{key:"render",value:function(){var e=this;if(this.root){var t=this.extensionUI$.subscribe((function(){e.root&&(0,o.render)((0,o.h)(u.ConnectDialog,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isOpen:e.isOpen,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel,connectDisabled:e.connectDisabled}),e.root)}));this.subscriptions.add(t)}}}]),e}();t.LinkFlow=a},72481:function(e,t,n){"use strict";var r=n(79955).lW,i=n(27424).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;var s=n(41943),u=n(6637),a=o(n(77793));t.QRCode=function(e){var t=(0,u.useState)(""),n=i(t,2),o=n[0],c=n[1];return(0,u.useEffect)((function(){var t,n,i=new a.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(t=e.width)&&void 0!==t?t:256,height:null!==(n=e.height)&&void 0!==n?n:256,padding:0,image:e.image}),o=r.from(i.svg(),"utf8").toString("base64");c("data:image/svg+xml;base64,".concat(o))})),o?(0,s.h)("img",{src:o,alt:"QR Code"}):null}},53602:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},32822:function(e,t,n){"use strict";var r=n(27424).default,i=n(56690).default,o=n(89728).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;var u=s(n(15171)),a=n(41943),c=n(6637),l=s(n(53602));function f(e){return"coinbase-app"===e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}var h=function(){function e(t){i(this,e),this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}return o(e,[{key:"attach",value:function(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}},{key:"presentItem",value:function(e){var t=this,n=this.nextItemKey++;return this.items.set(n,e),this.render(),function(){t.items.delete(n),t.render()}}},{key:"clear",value:function(){this.items.clear(),this.render()}},{key:"render",value:function(){this.root&&(0,a.render)((0,a.h)("div",null,(0,a.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((function(e){var n=r(e,2),i=n[0],o=n[1];return(0,a.h)(t.SnackbarInstance,Object.assign({},o,{key:i}))})))),this.root)}}]),e}();t.Snackbar=h;t.SnackbarContainer=function(e){return(0,a.h)("div",{class:(0,u.default)("-cbwsdk-snackbar-container")},(0,a.h)("style",null,l.default),(0,a.h)("div",{class:"-cbwsdk-snackbar"},e.children))};t.SnackbarInstance=function(e){var t=e.autoExpand,n=e.message,i=e.menuItems,o=e.appSrc,s=(0,c.useState)(!0),l=r(s,2),h=l[0],d=l[1],p=(0,c.useState)(null!==t&&void 0!==t&&t),v=r(p,2),b=v[0],y=v[1];(0,c.useEffect)((function(){var e=[window.setTimeout((function(){d(!1)}),1),window.setTimeout((function(){y(!0)}),1e4)];return function(){e.forEach(window.clearTimeout)}}));return(0,a.h)("div",{class:(0,u.default)("-cbwsdk-snackbar-instance",h&&"-cbwsdk-snackbar-instance-hidden",b&&"-cbwsdk-snackbar-instance-expanded")},(0,a.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:function(){y(!b)}},(0,a.h)("img",{src:f(o),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,a.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,a.h)("div",{class:"-gear-container"},!b&&(0,a.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,a.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),i&&i.length>0&&(0,a.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},i.map((function(e,t){return(0,a.h)("div",{class:(0,u.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,a.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,a.h)("span",{class:(0,u.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))}))))}},85731:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},81844:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var i=n(41943),o=r(n(85731));t.Spinner=function(e){var t,n=null!==(t=e.size)&&void 0!==t?t:64,r=e.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},70651:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"},38893:function(e,t,n){"use strict";var r=n(27424).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionContent=void 0;var o=i(n(15171)),s=n(41943),u=n(6637),a=n(68777),c=n(74093),l=n(25853),f=i(n(70651));t.TryExtensionContent=function(e){var t=e.theme,n=(0,u.useState)(!1),i=r(n,2),h=i[0],d=i[1],p=(0,u.useCallback)((function(){window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}),[]),v=(0,u.useCallback)((function(){h?window.location.reload():(p(),d(!0))}),[p,h]);return(0,s.h)("div",{class:(0,o.default)("-cbwsdk-try-extension",t)},(0,s.h)("style",null,f.default),(0,s.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,s.h)("h3",{class:(0,o.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,s.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,s.h)("button",{class:(0,o.default)("-cbwsdk-try-extension-cta",t),onClick:v},h?"Refresh":"Install"),(0,s.h)("div",null,!h&&(0,s.h)(a.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:"light"===t?"#0052FF":"#588AF5"})))),(0,s.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,s.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,s.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,s.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,s.h)("span",{class:(0,o.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,s.h)(c.LaptopIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:(0,o.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,s.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,s.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,s.h)("span",{class:(0,o.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,s.h)(l.SafeIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:(0,o.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}},68777:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowLeftIcon=void 0;var r=n(41943);t.ArrowLeftIcon=function(e){return(0,r.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}},53517:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;var r=n(41943);t.CloseIcon=function(e){return(0,r.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}},74093:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaptopIcon=void 0;var r=n(41943);t.LaptopIcon=function(e){return(0,r.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,r.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}},12984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeIcon=void 0;var r=n(41943);t.QRCodeIcon=function(e){return(0,r.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{d:"M8.2271 1.77124L7.0271 1.77124V2.97124H8.2271V1.77124Z"}),(0,r.h)("path",{d:"M5.44922 0.199219L5.44922 4.54922L9.79922 4.54922V0.199219L5.44922 0.199219ZM8.89922 3.64922L6.34922 3.64922L6.34922 1.09922L8.89922 1.09922V3.64922Z"}),(0,r.h)("path",{d:"M2.97124 1.77124L1.77124 1.77124L1.77124 2.97124H2.97124V1.77124Z"}),(0,r.h)("path",{d:"M0.199219 4.54922L4.54922 4.54922L4.54922 0.199219L0.199219 0.199219L0.199219 4.54922ZM1.09922 1.09922L3.64922 1.09922L3.64922 3.64922L1.09922 3.64922L1.09922 1.09922Z"}),(0,r.h)("path",{d:"M2.97124 7.0271H1.77124L1.77124 8.2271H2.97124V7.0271Z"}),(0,r.h)("path",{d:"M0.199219 9.79922H4.54922L4.54922 5.44922L0.199219 5.44922L0.199219 9.79922ZM1.09922 6.34922L3.64922 6.34922L3.64922 8.89922H1.09922L1.09922 6.34922Z"}),(0,r.h)("path",{d:"M8.89922 7.39912H7.99922V5.40112H5.44922L5.44922 9.79912H6.34922L6.34922 6.30112H7.09922V8.29912H9.79922V5.40112H8.89922V7.39912Z"}),(0,r.h)("path",{d:"M7.99912 8.89917H7.09912V9.79917H7.99912V8.89917Z"}),(0,r.h)("path",{d:"M9.79917 8.89917H8.89917V9.79917H9.79917V8.89917Z"}))}},21226:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default='\n \n'},60123:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='\n \n'},25853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeIcon=void 0;var r=n(41943);t.SafeIcon=function(e){return(0,r.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}},17338:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusDotIcon=void 0;var r=n(41943);t.StatusDotIcon=function(e){return(0,r.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},e),(0,r.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.29995 4.99995C2.29995 5.57985 1.82985 6.04995 1.24995 6.04995C0.670052 6.04995 0.199951 5.57985 0.199951 4.99995C0.199951 4.42005 0.670052 3.94995 1.24995 3.94995C1.82985 3.94995 2.29995 4.42005 2.29995 4.99995ZM4.99995 6.04995C5.57985 6.04995 6.04995 5.57985 6.04995 4.99995C6.04995 4.42005 5.57985 3.94995 4.99995 3.94995C4.42005 3.94995 3.94995 4.42005 3.94995 4.99995C3.94995 5.57985 4.42005 6.04995 4.99995 6.04995ZM8.74995 6.04995C9.32985 6.04995 9.79995 5.57985 9.79995 4.99995C9.79995 4.42005 9.32985 3.94995 8.74995 3.94995C8.17005 3.94995 7.69995 4.42005 7.69995 4.99995C7.69995 5.57985 8.17005 6.04995 8.74995 6.04995Z"}))}},85810:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4="},89188:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg=="},96994:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientMessagePublishEvent=t.ClientMessageSetSessionConfig=t.ClientMessageGetSessionConfig=t.ClientMessageIsLinked=t.ClientMessageHostSession=void 0,t.ClientMessageHostSession=function(e){return Object.assign({type:"HostSession"},e)},t.ClientMessageIsLinked=function(e){return Object.assign({type:"IsLinked"},e)},t.ClientMessageGetSessionConfig=function(e){return Object.assign({type:"GetSessionConfig"},e)},t.ClientMessageSetSessionConfig=function(e){return Object.assign({type:"SetSessionConfig"},e)},t.ClientMessagePublishEvent=function(e){return Object.assign({type:"PublishEvent"},e)}},35002:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},30079:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;var o,s=n(66829),u=n(68354);!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(o=t.ConnectionState||(t.ConnectionState={}));var a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;r(this,e),this.WebSocketClass=n,this.webSocket=null,this.connectionStateSubject=new s.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new s.Subject,this.url=t.replace(/^http/,"ws")}return i(e,[{key:"connect",value:function(){var e=this;return this.webSocket?(0,s.throwError)(new Error("webSocket object is not null")):new s.Observable((function(t){var n;try{e.webSocket=n=new e.WebSocketClass(e.url)}catch(r){return void t.error(r)}e.connectionStateSubject.next(o.CONNECTING),n.onclose=function(n){e.clearWebSocket(),t.error(new Error("websocket error ".concat(n.code,": ").concat(n.reason))),e.connectionStateSubject.next(o.DISCONNECTED)},n.onopen=function(n){t.next(),t.complete(),e.connectionStateSubject.next(o.CONNECTED)},n.onmessage=function(t){e.incomingDataSubject.next(t.data)}})).pipe((0,u.take)(1))}},{key:"disconnect",value:function(){var e=this.webSocket;if(e){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{e.close()}catch(t){}}}},{key:"connectionState$",get:function(){return this.connectionStateSubject.asObservable()}},{key:"incomingData$",get:function(){return this.incomingDataSubject.asObservable()}},{key:"incomingJSONData$",get:function(){return this.incomingData$.pipe((0,u.flatMap)((function(e){var t;try{t=JSON.parse(e)}catch(n){return(0,s.empty)()}return(0,s.of)(t)})))}},{key:"sendData",value:function(e){var t=this.webSocket;if(!t)throw new Error("websocket is not connected");t.send(e)}},{key:"clearWebSocket",value:function(){var e=this.webSocket;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}]),e}();t.RxWebSocket=a},21133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"===typeof e.id&&"string"===typeof e.sessionId&&"string"===typeof e.error}},57026:function(e,t,n){"use strict";var r=n(38416).default,i=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKConnection=void 0;var s=n(66829),u=n(68354),a=n(28588),c=n(19406),l=n(96994),f=n(35002),h=n(30079),d=n(21133),p=1e4,v=function(){function e(t,n,r,o){var l=this,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;i(this,e),this.sessionId=t,this.sessionKey=n,this.diagnostic=o,this.subscriptions=new s.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,c.IntNumber)(1),this.connectedSubject=new s.BehaviorSubject(!1),this.linkedSubject=new s.BehaviorSubject(!1),this.sessionConfigSubject=new s.ReplaySubject(1);var v=new h.RxWebSocket(r+"/rpc",d);this.ws=v,this.subscriptions.add(v.connectionState$.pipe((0,u.tap)((function(e){var n;return null===(n=l.diagnostic)||void 0===n?void 0:n.log(f.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:a.Session.hash(t)})})),(0,u.skip)(1),(0,u.filter)((function(e){return e===h.ConnectionState.DISCONNECTED&&!l.destroyed})),(0,u.delay)(5e3),(0,u.filter)((function(e){return!l.destroyed})),(0,u.flatMap)((function(e){return v.connect()})),(0,u.retry)()).subscribe()),this.subscriptions.add(v.connectionState$.pipe((0,u.skip)(2),(0,u.switchMap)((function(e){return(0,s.iif)((function(){return e===h.ConnectionState.CONNECTED}),l.authenticate().pipe((0,u.tap)((function(e){return l.sendIsLinked()})),(0,u.tap)((function(e){return l.sendGetSessionConfig()})),(0,u.map)((function(e){return!0}))),(0,s.of)(!1))})),(0,u.distinctUntilChanged)(),(0,u.catchError)((function(e){return(0,s.of)(!1)}))).subscribe((function(e){return l.connectedSubject.next(e)}))),this.subscriptions.add(v.connectionState$.pipe((0,u.skip)(1),(0,u.switchMap)((function(e){return(0,s.iif)((function(){return e===h.ConnectionState.CONNECTED}),(0,s.timer)(0,p))}))).subscribe((function(e){return 0===e?l.updateLastHeartbeat():l.heartbeat()}))),this.subscriptions.add(v.incomingData$.pipe((0,u.filter)((function(e){return"h"===e}))).subscribe((function(e){return l.updateLastHeartbeat()}))),this.subscriptions.add(v.incomingJSONData$.pipe((0,u.filter)((function(e){return["IsLinkedOK","Linked"].includes(e.type)}))).subscribe((function(e){var n,r=e;null===(n=l.diagnostic)||void 0===n||n.log(f.EVENTS.LINKED,{sessionIdHash:a.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),l.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(v.incomingJSONData$.pipe((0,u.filter)((function(e){return["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)}))).subscribe((function(e){var n,r=e;null===(n=l.diagnostic)||void 0===n||n.log(f.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:a.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),l.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}return o(e,[{key:"connect",value:function(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.diagnostic)||void 0===e||e.log(f.EVENTS.STARTED_CONNECTING,{sessionIdHash:a.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}},{key:"destroy",value:function(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(e=this.diagnostic)||void 0===e||e.log(f.EVENTS.DISCONNECTED,{sessionIdHash:a.Session.hash(this.sessionId)}),this.destroyed=!0}},{key:"isDestroyed",get:function(){return this.destroyed}},{key:"connected$",get:function(){return this.connectedSubject.asObservable()}},{key:"onceConnected$",get:function(){return this.connected$.pipe((0,u.filter)((function(e){return e})),(0,u.take)(1),(0,u.map)((function(){})))}},{key:"linked$",get:function(){return this.linkedSubject.asObservable()}},{key:"onceLinked$",get:function(){return this.linked$.pipe((0,u.filter)((function(e){return e})),(0,u.take)(1),(0,u.map)((function(){})))}},{key:"sessionConfig$",get:function(){return this.sessionConfigSubject.asObservable()}},{key:"incomingEvent$",get:function(){return this.ws.incomingJSONData$.pipe((0,u.filter)((function(e){if("Event"!==e.type)return!1;var t=e;return"string"===typeof t.sessionId&&"string"===typeof t.eventId&&"string"===typeof t.event&&"string"===typeof t.data})),(0,u.map)((function(e){return e})))}},{key:"setSessionMetadata",value:function(e,t){var n=this,i=(0,l.ClientMessageSetSessionConfig)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:r({},e,t)});return this.onceConnected$.pipe((0,u.flatMap)((function(e){return n.makeRequest(i)})),(0,u.map)((function(e){if((0,d.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}},{key:"publishEvent",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,l.ClientMessagePublishEvent)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:r});return this.onceLinked$.pipe((0,u.flatMap)((function(e){return n.makeRequest(i)})),(0,u.map)((function(e){if((0,d.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId})))}},{key:"sendData",value:function(e){this.ws.sendData(JSON.stringify(e))}},{key:"updateLastHeartbeat",value:function(){this.lastHeartbeatResponse=Date.now()}},{key:"heartbeat",value:function(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}},{key:"makeRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,n=e.id;try{this.sendData(e)}catch(r){return(0,s.throwError)(r)}return this.ws.incomingJSONData$.pipe((0,u.timeoutWith)(t,(0,s.throwError)(new Error("request ".concat(n," timed out")))),(0,u.filter)((function(e){return e.id===n})),(0,u.take)(1))}},{key:"authenticate",value:function(){var e=(0,l.ClientMessageHostSession)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,u.map)((function(e){if((0,d.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}},{key:"sendIsLinked",value:function(){var e=(0,l.ClientMessageIsLinked)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}},{key:"sendGetSessionConfig",value:function(){var e=(0,l.ClientMessageGetSessionConfig)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}]),e}();t.WalletSDKConnection=v},72751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;var r=n(77115),i=n(58674),o=n(21787);t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},r.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},r.errorCodes.provider),{unsupportedChain:4902}))})),t.standardErrorMessage=function(e){return void 0!==e?(0,r.getMessageFromCode)(e):"Unknown error"},t.standardErrors=Object.freeze(Object.assign(Object.assign({},r.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},r.ethErrors.provider),{unsupportedChain:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:"Unrecognized chain ID ".concat(e,". Try adding the chain using wallet_addEthereumChain first.")})}}))})),t.serializeError=function(e,n){var s=(0,r.serializeError)(function(e){return"string"===typeof e?{message:e,code:t.standardErrorCodes.rpc.internal}:(0,i.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method,result:e.result}}):e}(e),{shouldIncludeStack:!0}),u=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");u.searchParams.set("version",o.LIB_VERSION),u.searchParams.set("code",s.code.toString());var a=function(e,t){var n,r=null===(n=e)||void 0===n?void 0:n.method;if(r)return r;return void 0===t?void 0:"string"===typeof t?t:Array.isArray(t)?t.length>0?t[0].method:void 0:t.method}(s.data,n);return a&&u.searchParams.set("method",a),u.searchParams.set("message",s.message),Object.assign(Object.assign({},s),{docUrl:u.href})},t.getErrorCode=function(e){var t;return"number"===typeof e?e:function(e){return"object"===typeof e&&null!==e&&("number"===typeof e.code||"number"===typeof e.errorCode)}(e)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0}},89452:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;var r=n(41089),i=n(33553),o=n(41089);Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=n(33553);Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),t.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},11406:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;var o=function(){function e(t){r(this,e),this.scope=t}return i(e,[{key:"setItem",value:function(e,t){localStorage.setItem(this.scopedKey(e),t)}},{key:"getItem",value:function(e){return localStorage.getItem(this.scopedKey(e))}},{key:"removeItem",value:function(e){localStorage.removeItem(this.scopedKey(e))}},{key:"clear",value:function(){for(var e=this.scopedKey(""),t=[],n=0;n0&&r.initializeRelay(),window.addEventListener("message",(function(e){var t;if(e.origin===location.origin&&e.source===window&&"walletLinkMessage"===e.data.type){if("defaultChainChanged"===e.data.data.action||"dappChainSwitched"===e.data.data.action){var n=e.data.data.chainId,i=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:r.jsonRpcUrl;r.updateProviderInfo(i,Number(n))}"addressChanged"===e.data.data.action&&r._setAddresses([e.data.data.address])}})),r}return a(n,[{key:"selectedAddress",get:function(){return this._addresses[0]||void 0}},{key:"networkVersion",get:function(){return this.getChainId().toString(10)}},{key:"chainId",get:function(){return(0,w.prepend0x)(this.getChainId().toString(16))}},{key:"isWalletLink",get:function(){return!0}},{key:"isMetaMask",get:function(){return this._overrideIsMetaMask}},{key:"host",get:function(){return this.jsonRpcUrl}},{key:"connected",get:function(){return!0}},{key:"isConnected",value:function(){return!0}},{key:"jsonRpcUrl",get:function(){var e;return null!==(e=this._storage.getItem(A))&&void 0!==e?e:this._jsonRpcUrlFromOpts},set:function(e){this._storage.setItem(A,e)}},{key:"disableReloadOnDisconnect",value:function(){this.reloadOnDisconnect=!1}},{key:"setProviderInfo",value:function(e,t){this.isLedger||this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}},{key:"updateProviderInfo",value:function(e,t){this.jsonRpcUrl=e;var n=this.getChainId();this._storage.setItem(C,t.toString(10)),!((0,w.ensureIntNumber)(t)!==n)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}},{key:"watchAsset",value:function(){var e=s(o().mark((function e(t,n,r,i,s,u){var a,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return a=e.sent,e.next=5,a.watchAsset(t,n,r,i,s,null===u||void 0===u?void 0:u.toString()).promise;case 5:return c=e.sent,e.abrupt("return",!!c.result);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,o,s){return e.apply(this,arguments)}}()},{key:"addEthereumChain",value:function(){var e=s(o().mark((function e(t,n,r,i,s,u){var a,c,l,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,w.ensureIntNumber)(t)!==this.getChainId()){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this.initializeRelay();case 4:if(l=e.sent,f=l.inlineAddEthereumChain(t.toString()),this._isAuthorized()||f){e.next=9;break}return e.next=9,l.requestEthereumAccounts().promise;case 9:return e.next=11,l.addEthereumChain(t.toString(),n,s,r,i,u).promise;case 11:return h=e.sent,!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)&&this.updateProviderInfo(n[0],t),e.abrupt("return",!0===(null===(c=h.result)||void 0===c?void 0:c.isApproved));case 14:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,o,s){return e.apply(this,arguments)}}()},{key:"switchEthereumChain",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return n=e.sent,e.next=5,n.switchEthereumChain(t.toString(10),this.selectedAddress||void 0).promise;case 5:if(r=e.sent,!(0,_.isErrorResponse)(r)||!r.errorCode){e.next=12;break}if(r.errorCode!==b.standardErrorCodes.provider.unsupportedChain){e.next=11;break}throw b.standardErrors.provider.unsupportedChain(t);case 11:throw b.standardErrors.provider.custom({message:r.errorMessage,code:r.errorCode});case 12:(i=r.result).isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,t);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppInfo",value:function(e,t){this.initializeRelay().then((function(n){return n.setAppInfo(e,t)}))}},{key:"enable",value:function(){var e=s(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.diagnostic)||void 0===t||t.log(v.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?y.Session.hash(this._relay.session.id):void 0}),!(this._addresses.length>0)){e.next=3;break}return e.abrupt("return",i(this._addresses));case 3:return e.next=5,this.send(x.JSONRPCMethod.eth_requestAccounts);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:e.sent.resetAndReload();case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"send",value:function(e,t){try{var n=this._send(e,t);if(n instanceof Promise)return n.catch((function(t){throw(0,b.serializeError)(t,e)}))}catch(r){throw(0,b.serializeError)(r,e)}}},{key:"_send",value:function(e,t){var n=this;if("string"===typeof e){var r={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(r).then((function(e){return e.result}))}if("function"===typeof t){var i=e,o=t;return this._sendAsync(i,o)}if(Array.isArray(e))return e.map((function(e){return n._sendRequest(e)}));var s=e;return this._sendRequest(s)}},{key:"sendAsync",value:function(){var e=s(o().mark((function e(t,n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",this._sendAsync(t,n).catch((function(e){throw(0,b.serializeError)(e,t)})));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",Promise.reject((0,b.serializeError)(e.t0,t)));case 7:case"end":return e.stop()}}),e,this,[[0,4]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_sendAsync",value:function(){var e=s(o().mark((function e(t,n){var r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"===typeof n){e.next=2;break}throw new Error("callback is required");case 2:if(!Array.isArray(t)){e.next=6;break}return r=n,this._sendMultipleRequestsAsync(t).then((function(e){return r(null,e)})).catch((function(e){return r(e,null)})),e.abrupt("return");case 6:return i=n,e.abrupt("return",this._sendRequestAsync(t).then((function(e){return i(null,e)})).catch((function(e){return i(e,null)})));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"request",value:function(){var e=s(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",this._request(t).catch((function(e){throw(0,b.serializeError)(e,t.method)})));case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return",Promise.reject((0,b.serializeError)(e.t0,t.method)));case 7:case"end":return e.stop()}}),e,this,[[0,4]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_request",value:function(){var e=s(o().mark((function e(t){var n,r,i,s,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"object"===typeof t&&!Array.isArray(t)){e.next=2;break}throw b.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});case 2:if(n=t.method,r=t.params,"string"===typeof n&&0!==n.length){e.next=5;break}throw b.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});case 5:if(void 0===r||Array.isArray(r)||"object"===typeof r&&null!==r){e.next=7;break}throw b.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});case 7:return i=void 0===r?[]:r,s=this._relayEventManager.makeRequestId(),e.next=11,this._sendRequestAsync({method:n,params:i,jsonrpc:"2.0",id:s});case 11:return u=e.sent,e.abrupt("return",u.result);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"scanQRCode",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return r=e.sent,e.next=5,r.scanQRCode((0,w.ensureRegExpString)(t)).promise;case 5:if("string"===typeof(i=e.sent).result){e.next=8;break}throw(0,b.serializeError)(null!==(n=i.errorMessage)&&void 0!==n?n:"result was not a string",m.Web3Method.scanQRCode);case 8:return e.abrupt("return",i.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"genericRequest",value:function(){var e=s(o().mark((function e(t,n){var r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return i=e.sent,e.next=5,i.genericRequest(t,n).promise;case 5:if("string"===typeof(s=e.sent).result){e.next=8;break}throw(0,b.serializeError)(null!==(r=s.errorMessage)&&void 0!==r?r:"result was not a string",m.Web3Method.generic);case 8:return e.abrupt("return",s.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"selectProvider",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return r=e.sent,e.next=5,r.selectProvider(t).promise;case 5:if("string"===typeof(i=e.sent).result){e.next=8;break}throw(0,b.serializeError)(null!==(n=i.errorMessage)&&void 0!==n?n:"result was not a string",m.Web3Method.selectProvider);case 8:return e.abrupt("return",i.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"supportsSubscriptions",value:function(){return!1}},{key:"subscribe",value:function(){throw new Error("Subscriptions are not supported")}},{key:"unsubscribe",value:function(){throw new Error("Subscriptions are not supported")}},{key:"disconnect",value:function(){return!0}},{key:"_sendRequest",value:function(e){var t={jsonrpc:"2.0",id:e.id},n=e.method;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error("Coinbase Wallet does not support calling ".concat(n," synchronously without ")+"a callback. Please provide a callback parameter to call ".concat(n," ")+"asynchronously.");return t}},{key:"_setAddresses",value:function(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");var n=e.map((function(e){return(0,w.ensureAddressString)(e)}));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching&&!t||(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(g.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" "))))}},{key:"_sendRequestAsync",value:function(e){var t=this;return new Promise((function(n,r){try{var i=t._handleSynchronousMethods(e);if(void 0!==i)return n({jsonrpc:"2.0",id:e.id,result:i});var o=t._handleAsynchronousFilterMethods(e);if(void 0!==o)return void o.then((function(t){return n(Object.assign(Object.assign({},t),{id:e.id}))})).catch((function(e){return r(e)}));var s=t._handleSubscriptionMethods(e);if(void 0!==s)return void s.then((function(t){return n({jsonrpc:"2.0",id:e.id,result:t.result})})).catch((function(e){return r(e)}))}catch(u){return r(u)}t._handleAsynchronousMethods(e).then((function(t){return t&&n(Object.assign(Object.assign({},t),{id:e.id}))})).catch((function(e){return r(e)}))}))}},{key:"_sendMultipleRequestsAsync",value:function(e){var t=this;return Promise.all(e.map((function(e){return t._sendRequestAsync(e)})))}},{key:"_handleSynchronousMethods",value:function(e){var t=e.method,n=e.params||[];switch(t){case x.JSONRPCMethod.eth_accounts:return this._eth_accounts();case x.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case x.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case x.JSONRPCMethod.net_version:return this._net_version();case x.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}},{key:"_handleAsynchronousMethods",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.method,r=t.params||[],e.t0=n,e.next=e.t0===x.JSONRPCMethod.eth_requestAccounts?5:e.t0===x.JSONRPCMethod.eth_sign?6:e.t0===x.JSONRPCMethod.eth_ecRecover?7:e.t0===x.JSONRPCMethod.personal_sign?8:e.t0===x.JSONRPCMethod.personal_ecRecover?9:e.t0===x.JSONRPCMethod.eth_signTransaction?10:e.t0===x.JSONRPCMethod.eth_sendRawTransaction?11:e.t0===x.JSONRPCMethod.eth_sendTransaction?12:e.t0===x.JSONRPCMethod.eth_signTypedData_v1?13:e.t0===x.JSONRPCMethod.eth_signTypedData_v2?14:e.t0===x.JSONRPCMethod.eth_signTypedData_v3?15:e.t0===x.JSONRPCMethod.eth_signTypedData_v4||e.t0===x.JSONRPCMethod.eth_signTypedData?16:e.t0===x.JSONRPCMethod.cbWallet_arbitrary?17:e.t0===x.JSONRPCMethod.wallet_addEthereumChain?18:e.t0===x.JSONRPCMethod.wallet_switchEthereumChain?19:e.t0===x.JSONRPCMethod.wallet_watchAsset?20:21;break;case 5:return e.abrupt("return",this._eth_requestAccounts());case 6:return e.abrupt("return",this._eth_sign(r));case 7:return e.abrupt("return",this._eth_ecRecover(r));case 8:return e.abrupt("return",this._personal_sign(r));case 9:return e.abrupt("return",this._personal_ecRecover(r));case 10:return e.abrupt("return",this._eth_signTransaction(r));case 11:return e.abrupt("return",this._eth_sendRawTransaction(r));case 12:return e.abrupt("return",this._eth_sendTransaction(r));case 13:return e.abrupt("return",this._eth_signTypedData_v1(r));case 14:return e.abrupt("return",this._throwUnsupportedMethodError());case 15:return e.abrupt("return",this._eth_signTypedData_v3(r));case 16:return e.abrupt("return",this._eth_signTypedData_v4(r));case 17:return e.abrupt("return",this._cbwallet_arbitrary(r));case 18:return e.abrupt("return",this._wallet_addEthereumChain(r));case 19:return e.abrupt("return",this._wallet_switchEthereumChain(r));case 20:return e.abrupt("return",this._wallet_watchAsset(r));case 21:return e.next=23,this.initializeRelay();case 23:return i=e.sent,e.abrupt("return",i.makeEthereumJSONRPCRequest(t,this.jsonRpcUrl));case 25:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_handleAsynchronousFilterMethods",value:function(e){var t=e.method,n=e.params||[];switch(t){case x.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case x.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case x.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case x.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case x.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}},{key:"_handleSubscriptionMethods",value:function(e){switch(e.method){case x.JSONRPCMethod.eth_subscribe:case x.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}},{key:"_isKnownAddress",value:function(e){try{var t=(0,w.ensureAddressString)(e);return this._addresses.map((function(e){return(0,w.ensureAddressString)(e)})).includes(t)}catch(n){}return!1}},{key:"_ensureKnownAddress",value:function(e){var t;if(!this._isKnownAddress(e))throw null===(t=this.diagnostic)||void 0===t||t.log(v.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}},{key:"_prepareTransactionParams",value:function(e){var t=e.from?(0,w.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(t),{fromAddress:t,toAddress:e.to?(0,w.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,w.ensureBN)(e.value):new p.default(0),data:e.data?(0,w.ensureBuffer)(e.data):r.alloc(0),nonce:null!=e.nonce?(0,w.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,w.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,w.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,w.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,w.ensureBN)(e.gas):null,chainId:this.getChainId()}}},{key:"_isAuthorized",value:function(){return this._addresses.length>0}},{key:"_requireAuthorization",value:function(){if(!this._isAuthorized())throw b.standardErrors.provider.unauthorized({})}},{key:"_throwUnsupportedMethodError",value:function(){throw b.standardErrors.provider.unsupportedMethod({})}},{key:"_signEthereumMessage",value:function(){var e=s(o().mark((function e(t,n,r,i){var s,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._ensureKnownAddress(n),e.prev=1,e.next=4,this.initializeRelay();case 4:return s=e.sent,e.next=7,s.signEthereumMessage(t,n,r,i).promise;case 7:return u=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:u.result});case 11:if(e.prev=11,e.t0=e.catch(1),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=15;break}throw b.standardErrors.provider.userRejectedRequest("User denied message signature");case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,this,[[1,11]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_ethereumAddressFromSignedMessage",value:function(){var e=s(o().mark((function e(t,n,r){var i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return i=e.sent,e.next=5,i.ethereumAddressFromSignedMessage(t,n,r).promise;case 5:return s=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:s.result});case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_eth_accounts",value:function(){return i(this._addresses)}},{key:"_eth_coinbase",value:function(){return this.selectedAddress||null}},{key:"_net_version",value:function(){return this.getChainId().toString(10)}},{key:"_eth_chainId",value:function(){return(0,w.hexStringFromIntNumber)(this.getChainId())}},{key:"getChainId",value:function(){var e=this._storage.getItem(C);if(!e)return(0,w.ensureIntNumber)(this._chainIdFromOpts);var t=parseInt(e,10);return(0,w.ensureIntNumber)(t)}},{key:"_eth_requestAccounts",value:function(){var e=s(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.diagnostic)||void 0===t||t.log(v.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?y.Session.hash(this._relay.session.id):void 0}),!(this._addresses.length>0)){e.next=3;break}return e.abrupt("return",Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses}));case 3:return e.prev=3,e.next=6,this.initializeRelay();case 6:return r=e.sent,e.next=9,r.requestEthereumAccounts().promise;case 9:n=e.sent,e.next=17;break;case 12:if(e.prev=12,e.t0=e.catch(3),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=16;break}throw b.standardErrors.provider.userRejectedRequest("User denied account authorization");case 16:throw e.t0;case 17:if(n.result){e.next=19;break}throw new Error("accounts received is empty");case 19:if(this._setAddresses(n.result),this.isLedger||this.isCoinbaseBrowser){e.next=23;break}return e.next=23,this.switchEthereumChain(this.getChainId());case 23:return e.abrupt("return",{jsonrpc:"2.0",id:0,result:this._addresses});case 24:case"end":return e.stop()}}),e,this,[[3,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_sign",value:function(e){this._requireAuthorization();var t=(0,w.ensureAddressString)(e[0]),n=(0,w.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}},{key:"_eth_ecRecover",value:function(e){var t=(0,w.ensureBuffer)(e[0]),n=(0,w.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}},{key:"_personal_sign",value:function(e){this._requireAuthorization();var t=(0,w.ensureBuffer)(e[0]),n=(0,w.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}},{key:"_personal_ecRecover",value:function(e){var t=(0,w.ensureBuffer)(e[0]),n=(0,w.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}},{key:"_eth_signTransaction",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=this._prepareTransactionParams(t[0]||{}),e.prev=2,e.next=5,this.initializeRelay();case 5:return r=e.sent,e.next=8,r.signEthereumTransaction(n).promise;case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 12:if(e.prev=12,e.t0=e.catch(2),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=16;break}throw b.standardErrors.provider.userRejectedRequest("User denied transaction signature");case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_sendRawTransaction",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,w.ensureBuffer)(t[0]),e.next=3,this.initializeRelay();case 3:return r=e.sent,e.next=6,r.submitEthereumTransaction(n,this.getChainId()).promise;case 6:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_sendTransaction",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=this._prepareTransactionParams(t[0]||{}),e.prev=2,e.next=5,this.initializeRelay();case 5:return r=e.sent,e.next=8,r.signAndSubmitEthereumTransaction(n).promise;case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 12:if(e.prev=12,e.t0=e.catch(2),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=16;break}throw b.standardErrors.provider.userRejectedRequest("User denied transaction signature");case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v1",value:function(){var e=s(o().mark((function e(t){var n,r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,w.ensureParsedJSONObject)(t[0]),r=(0,w.ensureAddressString)(t[1]),this._ensureKnownAddress(r),i=E.default.hashForSignTypedDataLegacy({data:n}),s=JSON.stringify(n,null,2),e.abrupt("return",this._signEthereumMessage(i,r,!1,s));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v3",value:function(){var e=s(o().mark((function e(t){var n,r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,w.ensureAddressString)(t[0]),r=(0,w.ensureParsedJSONObject)(t[1]),this._ensureKnownAddress(n),i=E.default.hashForSignTypedData_v3({data:r}),s=JSON.stringify(r,null,2),e.abrupt("return",this._signEthereumMessage(i,n,!1,s));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v4",value:function(){var e=s(o().mark((function e(t){var n,r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,w.ensureAddressString)(t[0]),r=(0,w.ensureParsedJSONObject)(t[1]),this._ensureKnownAddress(n),i=E.default.hashForSignTypedData_v4({data:r}),s=JSON.stringify(r,null,2),e.abrupt("return",this._signEthereumMessage(i,n,!1,s));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_cbwallet_arbitrary",value:function(){var e=s(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t[0],"string"===typeof(r=t[1])){e.next=4;break}throw new Error("parameter must be a string");case 4:if("object"===typeof n&&null!==n){e.next=6;break}throw new Error("parameter must be an object");case 6:return e.next=8,this.genericRequest(n,r);case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i});case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_addEthereumChain",value:function(){var e=s(o().mark((function e(t){var n,r,i,s,u,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t[0],0!==(null===(n=u.rpcUrls)||void 0===n?void 0:n.length)){e.next=3;break}return e.abrupt("return",{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}});case 3:if(u.chainName&&""!==u.chainName.trim()){e.next=5;break}throw b.standardErrors.rpc.invalidParams("chainName is a required field");case 5:if(u.nativeCurrency){e.next=7;break}throw b.standardErrors.rpc.invalidParams("nativeCurrency is a required field");case 7:return a=parseInt(u.chainId,16),e.next=10,this.addEthereumChain(a,null!==(r=u.rpcUrls)&&void 0!==r?r:[],null!==(i=u.blockExplorerUrls)&&void 0!==i?i:[],u.chainName,null!==(s=u.iconUrls)&&void 0!==s?s:[],u.nativeCurrency);case 10:if(!e.sent){e.next=15;break}return e.abrupt("return",{jsonrpc:"2.0",id:0,result:null});case 15:return e.abrupt("return",{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}});case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_switchEthereumChain",value:function(){var e=s(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],e.next=3,this.switchEthereumChain(parseInt(n.chainId,16));case 3:return e.abrupt("return",{jsonrpc:"2.0",id:0,result:null});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_watchAsset",value:function(){var e=s(o().mark((function e(t){var n,r,i,s,u,a,c,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=Array.isArray(t)?t[0]:t).type){e.next=3;break}throw b.standardErrors.rpc.invalidParams("Type is required");case 3:if("ERC20"===(null===n||void 0===n?void 0:n.type)){e.next=5;break}throw b.standardErrors.rpc.invalidParams("Asset of type '".concat(n.type,"' is not supported"));case 5:if(null===n||void 0===n?void 0:n.options){e.next=7;break}throw b.standardErrors.rpc.invalidParams("Options are required");case 7:if(null===n||void 0===n?void 0:n.options.address){e.next=9;break}throw b.standardErrors.rpc.invalidParams("Address is required");case 9:return r=this.getChainId(),i=n.options,s=i.address,u=i.symbol,a=i.image,c=i.decimals,e.next=13,this.watchAsset(n.type,s,u,c,a,r);case 13:return l=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:l});case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_uninstallFilter",value:function(e){var t=(0,w.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}},{key:"_eth_newFilter",value:function(){var e=s(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],e.next=3,this._filterPolyfill.newFilter(n);case 3:return r=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:r});case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_newBlockFilter",value:function(){var e=s(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._filterPolyfill.newBlockFilter();case 2:return t=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:t});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_newPendingTransactionFilter",value:function(){var e=s(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._filterPolyfill.newPendingTransactionFilter();case 2:return t=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:t});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_getFilterChanges",value:function(e){var t=(0,w.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}},{key:"_eth_getFilterLogs",value:function(e){var t=(0,w.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}},{key:"initializeRelay",value:function(){var e=this;return this._relay?Promise.resolve(this._relay):this._relayProvider().then((function(t){return t.setAccountsCallback((function(t,n){return e._setAddresses(t,n)})),t.setChainCallback((function(t,n){e.updateProviderInfo(n,parseInt(t,10))})),t.setDappDefaultChainCallback(e._chainIdFromOpts),e._relay=t,t}))}}]),n}(d.default);t.CoinbaseWalletProvider=I},86737:function(e,t,n){"use strict";var r=n(861).default,i=n(17061).default,o=n(17156).default,s=n(56690).default,u=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;var a=n(19406),c=n(78504),l={jsonrpc:"2.0",id:0},f=function(){function e(t){s(this,e),this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,a.IntNumber)(1),this.provider=t}return u(e,[{key:"newFilter",value:function(){var e=o(i().mark((function e(t){var n,r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=h(t),r=this.makeFilterId(),e.next=4,this.setInitialCursorPosition(r,n.fromBlock);case 4:return o=e.sent,console.log("Installing new log filter(".concat(r,"):"),n,"initial cursor position:",o),this.logFilters.set(r,n),this.setFilterTimeout(r),e.abrupt("return",(0,c.hexStringFromIntNumber)(r));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"newBlockFilter",value:function(){var e=o(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return n=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),n),this.blockFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,c.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"newPendingTransactionFilter",value:function(){var e=o(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return n=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),n),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,c.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"uninstallFilter",value:function(e){var t=(0,c.intNumberFromHexString)(e);return console.log("Uninstalling filter (".concat(t,")")),this.deleteFilter(t),!0}},{key:"getFilterChanges",value:function(e){var t=(0,c.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(b())}},{key:"getFilterLogs",value:function(){var e=o(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,c.intNumberFromHexString)(t),r=this.logFilters.get(n)){e.next=4;break}return e.abrupt("return",b());case 4:return e.abrupt("return",this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getLogs",params:[d(r)]})));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"makeFilterId",value:function(){return(0,a.IntNumber)(++this.nextFilterId)}},{key:"sendAsyncPromise",value:function(e){var t=this;return new Promise((function(n,r){t.provider.sendAsync(e,(function(e,t){return e?r(e):Array.isArray(t)||null==t?r(new Error("unexpected response received: ".concat(JSON.stringify(t)))):void n(t)}))}))}},{key:"deleteFilter",value:function(e){console.log("Deleting filter (".concat(e,")")),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}},{key:"getLogFilterChanges",value:function(){var e=o(i().mark((function e(t){var n,o,s,u,f,h,p,v;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.logFilters.get(t),(o=this.cursors.get(t))&&n){e.next=4;break}return e.abrupt("return",b());case 4:return e.next=6,this.getCurrentBlockHeight();case 6:if(s=e.sent,u="latest"===n.toBlock?s:n.toBlock,!(o>s)){e.next=10;break}return e.abrupt("return",y());case 10:if(!(o>n.toBlock)){e.next=12;break}return e.abrupt("return",y());case 12:return console.log("Fetching logs from ".concat(o," to ").concat(u," for filter ").concat(t)),e.next=15,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getLogs",params:[d(Object.assign(Object.assign({},n),{fromBlock:o,toBlock:u}))]}));case 15:return f=e.sent,Array.isArray(f.result)&&(h=f.result.map((function(e){return(0,c.intNumberFromHexString)(e.blockNumber||"0x0")})),(p=Math.max.apply(Math,r(h)))&&p>o&&(v=(0,a.IntNumber)(p+1),console.log("Moving cursor position for filter (".concat(t,") from ").concat(o," to ").concat(v)),this.cursors.set(t,v))),e.abrupt("return",f);case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getBlockFilterChanges",value:function(){var e=o(i().mark((function e(t){var n,r,o,s,u=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.cursors.get(t)){e.next=3;break}return e.abrupt("return",b());case 3:return e.next=5,this.getCurrentBlockHeight();case 5:if(r=e.sent,!(n>r)){e.next=8;break}return e.abrupt("return",y());case 8:return console.log("Fetching blocks from ".concat(n," to ").concat(r," for filter (").concat(t,")")),e.next=11,Promise.all((0,c.range)(n,r+1).map((function(e){return u.getBlockHashByNumber((0,a.IntNumber)(e))})));case 11:return o=e.sent.filter((function(e){return!!e})),s=(0,a.IntNumber)(n+o.length),console.log("Moving cursor position for filter (".concat(t,") from ").concat(n," to ").concat(s)),this.cursors.set(t,s),e.abrupt("return",Object.assign(Object.assign({},l),{result:o}));case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getPendingTransactionFilterChanges",value:function(){var e=o(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(y()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setInitialCursorPosition",value:function(){var e=o(i().mark((function e(t,n){var r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentBlockHeight();case 2:return r=e.sent,o="number"===typeof n&&n>r?n:r,this.cursors.set(t,o),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setFilterTimeout",value:function(e){var t=this,n=this.timeouts.get(e);n&&window.clearTimeout(n);var r=window.setTimeout((function(){console.log("Filter (".concat(e,") timed out")),t.deleteFilter(e)}),3e5);this.timeouts.set(e,r)}},{key:"getCurrentBlockHeight",value:function(){var e=o(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_blockNumber",params:[]}));case 2:return t=e.sent,n=t.result,e.abrupt("return",(0,c.intNumberFromHexString)((0,c.ensureHexString)(n)));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getBlockHashByNumber",value:function(){var e=o(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getBlockByNumber",params:[(0,c.hexStringFromIntNumber)(t),!1]}));case 2:if(!(n=e.sent).result||"string"!==typeof n.result.hash){e.next=5;break}return e.abrupt("return",(0,c.ensureHexString)(n.result.hash));case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function h(e){return{fromBlock:p(e.fromBlock),toBlock:p(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function d(e){var t={fromBlock:v(e.fromBlock),toBlock:v(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function p(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,a.IntNumber)(0);if((0,c.isHexString)(e))return(0,c.intNumberFromHexString)(e);throw new Error("Invalid block option: ".concat(String(e)))}function v(e){return"latest"===e?e:(0,c.hexStringFromIntNumber)(e)}function b(){return Object.assign(Object.assign({},l),{error:{code:-32e3,message:"filter not found"}})}function y(){return Object.assign(Object.assign({},l),{result:[]})}t.FilterPolyfill=f,t.filterFromParam=h},16587:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))},28501:function(e,t,n){"use strict";var r=n(17061).default,i=n(17156).default,o=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;var u=n(23129),a=n(40390),c=function(){},l=function(){function e(t){o(this,e);var n=new u.PollingBlockTracker({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),r=a({blockTracker:n,provider:t}),i=r.events,s=r.middleware;this.events=i,this.subscriptionMiddleware=s}return s(e,[{key:"handleRequest",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,this.subscriptionMiddleware(t,n,c,c);case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this.subscriptionMiddleware.destroy()}}]),e}();t.SubscriptionManager=l},14597:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKUI=void 0;var o=n(40358),s=n(32822),u=n(29179),a=function(){function e(t){r(this,e),this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new s.Snackbar({darkMode:t.darkMode}),this.linkFlow=new o.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,chainId$:t.chainId$,isParentConnection:!1})}return i(e,[{key:"attach",value:function(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");var e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,u.injectCssReset)()}},{key:"setConnectDisabled",value:function(e){this.linkFlow.setConnectDisabled(e)}},{key:"addEthereumChain",value:function(e){}},{key:"watchAsset",value:function(e){}},{key:"switchEthereumChain",value:function(e){}},{key:"requestEthereumAccounts",value:function(e){this.linkFlow.open({onCancel:e.onCancel})}},{key:"hideRequestEthereumAccounts",value:function(){this.linkFlow.close()}},{key:"signEthereumMessage",value:function(e){}},{key:"signEthereumTransaction",value:function(e){}},{key:"submitEthereumTransaction",value:function(e){}},{key:"ethereumAddressFromSignedMessage",value:function(e){}},{key:"showConnecting",value:function(e){var t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",appSrc:this.appSrc,menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",appSrc:this.appSrc,menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}},{key:"setAppSrc",value:function(e){this.appSrc=e}},{key:"reloadUI",value:function(){document.location.reload()}},{key:"inlineAccountsResponse",value:function(){return!1}},{key:"inlineAddEthereumChain",value:function(e){return!1}},{key:"inlineWatchAsset",value:function(){return!1}},{key:"inlineSwitchEthereumChain",value:function(){return!1}},{key:"setStandalone",value:function(e){this.standalone=e}},{key:"isStandalone",value:function(){var e;return null!==(e=this.standalone)&&void 0!==e&&e}}]),e}();t.WalletSDKUI=a},38195:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))},28588:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;var o=n(33031),s=n(78504),u="session:id",a="session:secret",c="session:linked",l=function(){function e(t,n,i,u){r(this,e),this._storage=t,this._id=n||(0,s.randomBytesHex)(16),this._secret=i||(0,s.randomBytesHex)(32),this._key=(new o.sha256).update("".concat(this._id,", ").concat(this._secret," WalletLink")).digest("hex"),this._linked=!!u}return i(e,[{key:"id",get:function(){return this._id}},{key:"secret",get:function(){return this._secret}},{key:"key",get:function(){return this._key}},{key:"linked",get:function(){return this._linked},set:function(e){this._linked=e,this.persistLinked()}},{key:"save",value:function(){return this._storage.setItem(u,this._id),this._storage.setItem(a,this._secret),this.persistLinked(),this}},{key:"persistLinked",value:function(){this._storage.setItem(c,this._linked?"1":"0")}}],[{key:"load",value:function(t){var n=t.getItem(u),r=t.getItem(c),i=t.getItem(a);return n&&i?new e(t,n,i,"1"===r):null}},{key:"hash",value:function(e){return(new o.sha256).update(e).digest("hex")}}]),e}();t.Session=l},74227:function(e,t,n){"use strict";var r=n(27424).default,i=n(56690).default,o=n(89728).default,s=n(61655).default,u=n(26389).default,a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return c(t,e),t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelay=void 0;var d=h(n(89144)),p=n(66829),v=n(68354),b=n(35002),y=n(57026),g=n(72751),m=n(19406),_=n(78504),w=f(n(21693)),E=n(28588),k=n(93336),x=n(24859),S=n(88383),C=n(77988),A=n(58674),I=n(97727),T=function(e){s(n,e);var t=u(n);function n(e){var r,o;i(this,n),(r=t.call(this)).accountsCallback=null,r.chainCallback=null,r.dappDefaultChainSubject=new p.BehaviorSubject(1),r.dappDefaultChain=1,r.appName="",r.appLogoUrl=null,r.subscriptions=new p.Subscription,r.linkAPIUrl=e.linkAPIUrl,r.storage=e.storage,r.options=e;var s=r.subscribe(),u=s.session,a=s.ui,c=s.connection;if(r._session=u,r.connection=c,r.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");return e.eventListener?r.diagnostic={log:e.eventListener.onEvent}:r.diagnostic=e.diagnosticLogger,r._reloadOnDisconnect=null===(o=e.reloadOnDisconnect)||void 0===o||o,r.ui=a,r}return o(n,[{key:"subscribe",value:function(){var e=this;this.subscriptions.add(this.dappDefaultChainSubject.subscribe((function(t){e.dappDefaultChain!==t&&(e.dappDefaultChain=t)})));var t=E.Session.load(this.storage)||new E.Session(this.storage).save(),i=new y.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(i.sessionConfig$.subscribe({next:function(t){e.onSessionConfigChanged(t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(i.incomingEvent$.pipe((0,v.filter)((function(e){return"Web3Response"===e.event}))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(i.linked$.pipe((0,v.skip)(1),(0,v.tap)((function(t){var n;e.isLinked=t;var r=e.storage.getItem(k.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(e.session.linked=t),e.isUnlinkedErrorState=!1,r){var i=r.split(" "),o="true"===e.storage.getItem("IsStandaloneSigning");if(""!==i[0]&&!t&&e.session.linked&&!o){e.isUnlinkedErrorState=!0;var s=e.getSessionIdHash();null===(n=e.diagnostic)||void 0===n||n.log(b.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:s})}}}))).subscribe()),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return!!e.metadata&&"1"===e.metadata.__destroyed}))).subscribe((function(){var t,n=i.isDestroyed;return null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:e.getSessionIdHash()}),e.resetAndReload()}))),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return e.metadata&&void 0!==e.metadata.WalletUsername}))).pipe((0,v.mergeMap)((function(e){return w.decrypt(e.metadata.WalletUsername,t.secret)}))).subscribe({next:function(t){e.storage.setItem(k.WALLET_USER_NAME_KEY,t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return e.metadata&&void 0!==e.metadata.AppVersion}))).pipe((0,v.mergeMap)((function(e){return w.decrypt(e.metadata.AppVersion,t.secret)}))).subscribe({next:function(t){e.storage.setItem(k.APP_VERSION_KEY,t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl}))).pipe((0,v.mergeMap)((function(e){return(0,p.zip)(w.decrypt(e.metadata.ChainId,t.secret),w.decrypt(e.metadata.JsonRpcUrl,t.secret))}))).pipe((0,v.distinctUntilChanged)()).subscribe({next:function(t){var n=r(t,2),i=n[0],o=n[1];e.chainCallback&&e.chainCallback(i,o)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return e.metadata&&void 0!==e.metadata.EthereumAddress}))).pipe((0,v.mergeMap)((function(e){return w.decrypt(e.metadata.EthereumAddress,t.secret)}))).subscribe({next:function(t){e.accountsCallback&&e.accountsCallback([t]),n.accountRequestCallbackIds.size>0&&(Array.from(n.accountRequestCallbackIds.values()).forEach((function(n){var r=(0,I.Web3ResponseMessage)({id:n,response:(0,A.RequestEthereumAccountsResponse)([t])});e.invokeCallback(Object.assign(Object.assign({},r),{id:n}))})),n.accountRequestCallbackIds.clear())},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,v.filter)((function(e){return e.metadata&&void 0!==e.metadata.AppSrc}))).pipe((0,v.mergeMap)((function(e){return w.decrypt(e.metadata.AppSrc,t.secret)}))).subscribe({next:function(t){e.ui.setAppSrc(t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));var o=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:i.connected$,chainId$:this.dappDefaultChainSubject});return i.connect(),{session:t,ui:o,connection:i}}},{key:"attachUI",value:function(){this.ui.attach()}},{key:"resetAndReload",value:function(){var e=this;this.connection.setSessionMetadata("__destroyed","1").pipe((0,v.timeout)(1e3),(0,v.catchError)((function(e){return(0,p.of)(null)}))).subscribe((function(t){var n,r,i,o=e.ui.isStandalone();try{e.subscriptions.unsubscribe()}catch(f){null===(n=e.diagnostic)||void 0===n||n.log(b.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(r=e.diagnostic)||void 0===r||r.log(b.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:e.getSessionIdHash()}),e.connection.destroy();var s=E.Session.load(e.storage);if((null===s||void 0===s?void 0:s.id)===e._session.id?e.storage.clear():s&&(null===(i=e.diagnostic)||void 0===i||i.log(b.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:e.getSessionIdHash(),storedSessionIdHash:E.Session.hash(s.id)})),e._reloadOnDisconnect)e.ui.reloadUI();else{e.accountsCallback&&e.accountsCallback([],!0),e.subscriptions=new p.Subscription;var u=e.subscribe(),a=u.session,c=u.ui,l=u.connection;e._session=a,e.connection=l,e.ui=c,o&&e.ui.setStandalone&&e.ui.setStandalone(!0),e.attachUI()}}),(function(t){var n;null===(n=e.diagnostic)||void 0===n||n.log(b.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with ".concat(t),sessionIdHash:e.getSessionIdHash()})}))}},{key:"setAppInfo",value:function(e,t){this.appName=e,this.appLogoUrl=t}},{key:"getStorageItem",value:function(e){return this.storage.getItem(e)}},{key:"session",get:function(){return this._session}},{key:"setStorageItem",value:function(e,t){this.storage.setItem(e,t)}},{key:"signEthereumMessage",value:function(e,t,n,r){return this.sendRequest({method:x.Web3Method.signEthereumMessage,params:{message:(0,_.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}},{key:"ethereumAddressFromSignedMessage",value:function(e,t,n){return this.sendRequest({method:x.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,_.hexStringFromBuffer)(e,!0),signature:(0,_.hexStringFromBuffer)(t,!0),addPrefix:n}})}},{key:"signEthereumTransaction",value:function(e){return this.sendRequest({method:x.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,_.bigIntStringFromBN)(e.weiValue),data:(0,_.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,_.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,_.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,_.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,_.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}},{key:"signAndSubmitEthereumTransaction",value:function(e){return this.sendRequest({method:x.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,_.bigIntStringFromBN)(e.weiValue),data:(0,_.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,_.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,_.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,_.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,_.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}},{key:"submitEthereumTransaction",value:function(e,t){return this.sendRequest({method:x.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,_.hexStringFromBuffer)(e,!0),chainId:t}})}},{key:"scanQRCode",value:function(e){return this.sendRequest({method:x.Web3Method.scanQRCode,params:{regExp:e}})}},{key:"getQRCodeUrl",value:function(){return(0,_.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}},{key:"genericRequest",value:function(e,t){return this.sendRequest({method:x.Web3Method.generic,params:{action:t,data:e}})}},{key:"sendGenericMessage",value:function(e){return this.sendRequest(e)}},{key:"sendRequest",value:function(e){var t=this,n=null,r=(0,_.randomBytesHex)(8),i=function(i){t.publishWeb3RequestCanceledEvent(r),t.handleErrorResponse(r,e.method,i),null===n||void 0===n||n()};return{promise:new Promise((function(o,s){t.ui.isStandalone()||(n=t.ui.showConnecting({isUnlinkedErrorState:t.isUnlinkedErrorState,onCancel:i,onResetConnection:t.resetAndReload})),t.relayEventManager.callbacks.set(r,(function(e){if(null===n||void 0===n||n(),e.errorMessage)return s(new Error(e.errorMessage));o(e)})),t.ui.isStandalone()?t.sendRequestStandalone(r,e):t.publishWeb3RequestEvent(r,e)})),cancel:i}}},{key:"setConnectDisabled",value:function(e){this.ui.setConnectDisabled(e)}},{key:"setAccountsCallback",value:function(e){this.accountsCallback=e}},{key:"setChainCallback",value:function(e){this.chainCallback=e}},{key:"setDappDefaultChainCallback",value:function(e){this.dappDefaultChainSubject.next(e)}},{key:"publishWeb3RequestEvent",value:function(e,t){var n,r=this,i=(0,C.Web3RequestMessage)({id:e,request:t}),o=E.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(b.EVENTS.WEB3_REQUEST,{eventId:i.id,method:"relay::".concat(i.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o?E.Session.hash(o.id):"",isSessionMismatched:((null===o||void 0===o?void 0:o.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",i,!0).subscribe({next:function(e){var t;null===(t=r.diagnostic)||void 0===t||t.log(b.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:"relay::".concat(i.request.method),sessionIdHash:r.getSessionIdHash(),storedSessionIdHash:o?E.Session.hash(o.id):"",isSessionMismatched:((null===o||void 0===o?void 0:o.id)!==r._session.id).toString()})},error:function(e){r.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:i.id,response:{method:i.request.method,errorMessage:e.message}}))}}))}},{key:"publishWeb3RequestCanceledEvent",value:function(e){var t=(0,S.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}},{key:"publishEvent",value:function(e,t,n){var r=this,i=this.session.secret;return new p.Observable((function(e){w.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),i).then((function(t){e.next(t),e.complete()}))})).pipe((0,v.mergeMap)((function(t){return r.connection.publishEvent(e,t,n)})))}},{key:"handleIncomingEvent",value:function(e){var t=this;try{this.subscriptions.add((0,p.from)(w.decrypt(e.data,this.session.secret)).pipe((0,v.map)((function(e){return JSON.parse(e)}))).subscribe({next:function(e){var n=(0,I.isWeb3ResponseMessage)(e)?e:null;n&&t.handleWeb3ResponseMessage(n)},error:function(){var e;null===(e=t.diagnostic)||void 0===e||e.log(b.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(n){return}}},{key:"handleWeb3ResponseMessage",value:function(e){var t,r=this,i=e.response;if(null===(t=this.diagnostic)||void 0===t||t.log(b.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:"relay::".concat(i.method),sessionIdHash:this.getSessionIdHash()}),(0,A.isRequestEthereumAccountsResponse)(i))return n.accountRequestCallbackIds.forEach((function(t){return r.invokeCallback(Object.assign(Object.assign({},e),{id:t}))})),void n.accountRequestCallbackIds.clear();this.invokeCallback(e)}},{key:"handleErrorResponse",value:function(e,t,n,r){var i,o=null!==(i=null===n||void 0===n?void 0:n.message)&&void 0!==i?i:(0,g.standardErrorMessage)(r);this.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:e,response:{method:t,errorMessage:o,errorCode:r}}))}},{key:"invokeCallback",value:function(e){var t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}},{key:"requestEthereumAccounts",value:function(){var e=this,t={method:x.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,_.randomBytesHex)(8),i=function(n){e.publishWeb3RequestCanceledEvent(r),e.handleErrorResponse(r,t.method,n)};return{promise:new Promise((function(o,s){var u;e.relayEventManager.callbacks.set(r,(function(t){if(e.ui.hideRequestEthereumAccounts(),t.errorMessage)return s(new Error(t.errorMessage));o(t)}));var a=(null===(u=null===window||void 0===window?void 0:window.navigator)||void 0===u?void 0:u.userAgent)||null;if(a&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)){var c;try{c=(0,_.isInIFrame)()&&window.top?window.top.location:window.location}catch(f){c=window.location}c.href="https://www.coinbase.com/connect-dapp?uri=".concat(encodeURIComponent(c.href))}else{if(e.ui.inlineAccountsResponse()){e.ui.requestEthereumAccounts({onCancel:i,onAccounts:function(t){e.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:r,response:(0,A.RequestEthereumAccountsResponse)(t)}))}})}else{var l=g.standardErrors.provider.userRejectedRequest("User denied account authorization");e.ui.requestEthereumAccounts({onCancel:function(){return i(l)}})}n.accountRequestCallbackIds.add(r),e.ui.inlineAccountsResponse()||e.ui.isStandalone()||e.publishWeb3RequestEvent(r,t)}})),cancel:i}}},{key:"selectProvider",value:function(e){var t=this,n={method:x.Web3Method.selectProvider,params:{providerOptions:e}},r=(0,_.randomBytesHex)(8);return{cancel:function(e){t.publishWeb3RequestCanceledEvent(r),t.handleErrorResponse(r,n.method,e)},promise:new Promise((function(n,i){t.relayEventManager.callbacks.set(r,(function(e){if(e.errorMessage)return i(new Error(e.errorMessage));n(e)}));t.ui.selectProvider&&t.ui.selectProvider({onApprove:function(e){t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:r,response:(0,A.SelectProviderResponse)(e)}))},onCancel:function(e){t.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:r,response:(0,A.SelectProviderResponse)(m.ProviderType.Unselected)}))},providerOptions:e})}))}}},{key:"watchAsset",value:function(e,t,n,r,i,o){var s=this,u={method:x.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:n,decimals:r,image:i},chainId:o}},a=null,c=(0,_.randomBytesHex)(8),l=function(e){s.publishWeb3RequestCanceledEvent(c),s.handleErrorResponse(c,u.method,e),null===a||void 0===a||a()};return this.ui.inlineWatchAsset()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{cancel:l,promise:new Promise((function(l,f){s.relayEventManager.callbacks.set(c,(function(e){if(null===a||void 0===a||a(),e.errorMessage)return f(new Error(e.errorMessage));l(e)}));s.ui.inlineWatchAsset()&&s.ui.watchAsset({onApprove:function(){s.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,A.WatchAssetReponse)(!0)}))},onCancel:function(e){s.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,A.WatchAssetReponse)(!1)}))},type:e,address:t,symbol:n,decimals:r,image:i,chainId:o}),s.ui.inlineWatchAsset()||s.ui.isStandalone()||s.publishWeb3RequestEvent(c,u)}))}}},{key:"addEthereumChain",value:function(e,t,n,r,i,o){var s=this,u={method:x.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}},a=null,c=(0,_.randomBytesHex)(8),l=function(e){s.publishWeb3RequestCanceledEvent(c),s.handleErrorResponse(c,u.method,e),null===a||void 0===a||a()};return this.ui.inlineAddEthereumChain(e)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{promise:new Promise((function(t,n){s.relayEventManager.callbacks.set(c,(function(e){if(null===a||void 0===a||a(),e.errorMessage)return n(new Error(e.errorMessage));t(e)}));s.ui.inlineAddEthereumChain(e)&&s.ui.addEthereumChain({onCancel:function(e){s.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,A.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){s.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:c,response:(0,A.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:u.params.chainId,rpcUrls:u.params.rpcUrls,blockExplorerUrls:u.params.blockExplorerUrls,chainName:u.params.chainName,iconUrls:u.params.iconUrls,nativeCurrency:u.params.nativeCurrency}),s.ui.inlineAddEthereumChain(e)||s.ui.isStandalone()||s.publishWeb3RequestEvent(c,u)})),cancel:l}}},{key:"switchEthereumChain",value:function(e,t){var n=this,r={method:x.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:t})},i=(0,_.randomBytesHex)(8);return{promise:new Promise((function(t,o){n.relayEventManager.callbacks.set(i,(function(e){return(0,A.isErrorResponse)(e)&&e.errorCode?o(g.standardErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?o(new Error(e.errorMessage)):void t(e)}));n.ui.switchEthereumChain({onCancel:function(t){var r;if(t){var o=null!==(r=(0,g.getErrorCode)(t))&&void 0!==r?r:g.standardErrorCodes.provider.unsupportedChain;n.handleErrorResponse(i,x.Web3Method.switchEthereumChain,t instanceof Error?t:g.standardErrors.provider.unsupportedChain(e),o)}else n.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:i,response:(0,A.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){n.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:i,response:(0,A.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:r.params.chainId,address:r.params.address}),n.ui.inlineSwitchEthereumChain()||n.ui.isStandalone()||n.publishWeb3RequestEvent(i,r)})),cancel:function(e){n.publishWeb3RequestCanceledEvent(i),n.handleErrorResponse(i,r.method,e)}}}},{key:"inlineAddEthereumChain",value:function(e){return this.ui.inlineAddEthereumChain(e)}},{key:"getSessionIdHash",value:function(){return E.Session.hash(this._session.id)}},{key:"sendRequestStandalone",value:function(e,t){var n=this,r=function(r){n.handleErrorResponse(e,t.method,r)},i=function(t){n.handleWeb3ResponseMessage((0,I.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case x.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:i});break;default:r()}}},{key:"onSessionConfigChanged",value:function(e){}}]),n}(k.WalletSDKRelayAbstract);T.accountRequestCallbackIds=new Set,l([d.default],T.prototype,"resetAndReload",null),l([d.default],T.prototype,"handleIncomingEvent",null),t.WalletSDKRelay=T},93336:function(e,t,n){"use strict";var r=n(17061).default,i=n(17156).default,o=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0;var u=n(72751);t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion";var a=function(){function e(){o(this,e)}return s(e,[{key:"makeEthereumJSONRPCRequest",value:function(){var e=i(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Error: No jsonRpcUrl provided");case 2:return e.abrupt("return",window.fetch(n,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){if(!e)throw u.standardErrors.rpc.parse({});var n=e,r=n.error;if(r)throw(0,u.serializeError)(r,t.method);return n})));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.WalletSDKRelayAbstract=a},30569:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayEventManager=void 0;var o=n(78504),s=function(){function e(){r(this,e),this._nextRequestId=0,this.callbacks=new Map}return i(e,[{key:"makeRequestId",value:function(){this._nextRequestId=(this._nextRequestId+1)%2147483647;var e=this._nextRequestId,t=(0,o.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}]),e}();t.WalletSDKRelayEventManager=s},24859:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))},88383:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;var r=n(38195);t.Web3RequestCanceledMessage=function(e){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},77988:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;var r=n(38195);t.Web3RequestMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},e)}},58674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.SelectProviderResponse=t.WatchAssetReponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.AddEthereumChainResponse=t.isErrorResponse=void 0;var r=n(24859);t.isErrorResponse=function(e){var t,n;return void 0!==(null===(t=e)||void 0===t?void 0:t.method)&&void 0!==(null===(n=e)||void 0===n?void 0:n.errorMessage)},t.AddEthereumChainResponse=function(e){return{method:r.Web3Method.addEthereumChain,result:e}},t.SwitchEthereumChainResponse=function(e){return{method:r.Web3Method.switchEthereumChain,result:e}},t.RequestEthereumAccountsResponse=function(e){return{method:r.Web3Method.requestEthereumAccounts,result:e}},t.WatchAssetReponse=function(e){return{method:r.Web3Method.watchAsset,result:e}},t.SelectProviderResponse=function(e){return{method:r.Web3Method.selectProvider,result:e}},t.isRequestEthereumAccountsResponse=function(e){return e&&e.method===r.Web3Method.requestEthereumAccounts},t.SignEthereumMessageResponse=function(e){return{method:r.Web3Method.signEthereumMessage,result:e}},t.SignEthereumTransactionResponse=function(e){return{method:r.Web3Method.signEthereumTransaction,result:e}},t.SubmitEthereumTransactionResponse=function(e){return{method:r.Web3Method.submitEthereumTransaction,result:e}},t.EthereumAddressFromSignedMessageResponse=function(e){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:e}}},97727:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;var r=n(38195);t.Web3ResponseMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},e)},t.isWeb3ResponseMessage=function(e){return e&&e.type===r.RelayMessageType.WEB3_RESPONSE}},21693:function(e,t,n){"use strict";var r=n(17061).default,i=n(861).default,o=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;var s=n(78504);function u(){return(u=o(r().mark((function e(t,n){var o,u,a,c,l,f,h,d,p;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(64===n.length){e.next=2;break}throw Error("secret must be 256 bits");case 2:return o=crypto.getRandomValues(new Uint8Array(12)),e.next=5,crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 5:return u=e.sent,a=new TextEncoder,e.next=9,window.crypto.subtle.encrypt({name:"AES-GCM",iv:o},u,a.encode(t));case 9:return c=e.sent,16,l=c.slice(c.byteLength-16),f=c.slice(0,c.byteLength-16),h=new Uint8Array(l),d=new Uint8Array(f),p=new Uint8Array([].concat(i(o),i(h),i(d))),e.abrupt("return",(0,s.uint8ArrayToHex)(p));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.encrypt=function(e,t){return u.apply(this,arguments)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new Promise((function(n,u){o(r().mark((function o(){var a,c,l,f,h,d,p,v,b;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,crypto.subtle.importKey("raw",(0,s.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 2:return a=r.sent,c=(0,s.hexStringToUint8Array)(e),l=c.slice(0,12),f=c.slice(12,28),h=c.slice(28),d=new Uint8Array([].concat(i(h),i(f))),p={name:"AES-GCM",iv:new Uint8Array(l)},r.prev=9,r.next=12,window.crypto.subtle.decrypt(p,a,d);case 12:v=r.sent,b=new TextDecoder,n(b.decode(v)),r.next=20;break;case 17:r.prev=17,r.t0=r.catch(9),u(r.t0);case 20:case"end":return r.stop()}}),o,null,[[9,17]])})))()}))}},19406:function(e,t){"use strict";function n(){return function(e){return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=n,t.HexString=function(e){return e},t.AddressString=function(e){return e},t.BigIntString=function(e){return e},t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=function(e){return e},function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""}(t.ProviderType||(t.ProviderType={}))},78504:function(e,t,n){"use strict";var r=n(79955).lW,i=n(38416).default,o=n(861).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isInIFrame=t.createQrUrl=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBN=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBN=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;var u=s(n(48744)),a=n(47840),c=n(72751),l=n(19406),f=/^[0-9]*$/,h=/^[a-f0-9]*$/;function d(e){return o(e).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}function p(e){return e.startsWith("0x")||e.startsWith("0X")}function v(e){return p(e)?e.slice(2):e}function b(e){return p(e)?"0x"+e.slice(2):"0x"+e}function y(e){if("string"!==typeof e)return!1;var t=v(e).toLowerCase();return h.test(t)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){var n=v(e).toLowerCase();if(h.test(n))return(0,l.HexString)(t?"0x"+n:n)}throw c.standardErrors.rpc.invalidParams('"'.concat(String(e),'" is not a hexadecimal string'))}function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=g(e,!1);return n.length%2===1&&(n=(0,l.HexString)("0"+n)),t?(0,l.HexString)("0x"+n):n}function _(e){if("number"===typeof e&&Number.isInteger(e))return(0,l.IntNumber)(e);if("string"===typeof e){if(f.test(e))return(0,l.IntNumber)(Number(e));if(y(e))return(0,l.IntNumber)(new u.default(m(e,!1),16).toNumber())}throw c.standardErrors.rpc.invalidParams("Not an integer: ".concat(String(e)))}function w(e){if(null==e||"function"!==typeof e.constructor)return!1;var t=e.constructor;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return d(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=d,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((function(e){return parseInt(e,16)})))},t.hexStringFromBuffer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.toString("hex");return(0,l.HexString)(t?"0x"+n:n)},t.bigIntStringFromBN=function(e){return(0,l.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,l.IntNumber)(new u.default(m(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,l.HexString)("0x"+new u.default(e).toString(16))},t.has0xPrefix=p,t.strip0x=v,t.prepend0x=b,t.isHexString=y,t.ensureHexString=g,t.ensureEvenLengthHexString=m,t.ensureAddressString=function(e){if("string"===typeof e){var t=v(e).toLowerCase();if(y(t)&&40===t.length)return(0,l.AddressString)(b(t))}throw c.standardErrors.rpc.invalidParams("Invalid Ethereum address: ".concat(String(e)))},t.ensureBuffer=function(e){if(r.isBuffer(e))return e;if("string"===typeof e){if(y(e)){var t=m(e,!1);return r.from(t,"hex")}return r.from(e,"utf8")}throw c.standardErrors.rpc.invalidParams("Not binary data: ".concat(String(e)))},t.ensureIntNumber=_,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,l.RegExpString)(e.toString());throw c.standardErrors.rpc.invalidParams("Not a RegExp: ".concat(String(e)))},t.ensureBN=function(e){if(null!==e&&(u.default.isBN(e)||w(e)))return new u.default(e.toString(10),10);if("number"===typeof e)return new u.default(_(e));if("string"===typeof e){if(f.test(e))return new u.default(e,10);if(y(e))return new u.default(m(e,!1),16)}throw c.standardErrors.rpc.invalidParams("Not an integer: ".concat(String(e)))},t.ensureParsedJSONObject=function(e){if("string"===typeof e)return JSON.parse(e);if("object"===typeof e)return e;throw c.standardErrors.rpc.invalidParams("Not a JSON string or an object: ".concat(String(e)))},t.isBigNumber=w,t.range=function(e,t){return Array.from({length:t-e},(function(t,n){return e+n}))},t.getFavicon=function(){var e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),t=document.location,n=t.protocol,r=t.host,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")?null:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?n+i:"".concat(n,"//").concat(r).concat(i)},t.createQrUrl=function(e,t,n,r,o,s){var u,c=r?"parent-id":"id",l=(0,a.stringify)((i(u={},c,e),i(u,"secret",t),i(u,"server",n),i(u,"v",o),i(u,"chainId",s),u));return"".concat(n,"/#/link?").concat(l)},t.isInIFrame=function(){try{return null!==window.frameElement}catch(e){return!1}}},26170:function(e,t,n){var r=n(79955).lW,i=n(94076),o=n(48744);function s(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function u(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function l(e){var t=typeof e;if("string"===t)return i.isHexString(e)?new o(i.stripHexPrefix(e),16):new o(e,10);if("number"===t)return new o(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function f(e,t){var n,s,h,d;if("address"===e)return f("uint160",l(t));if("bool"===e)return f("uint8",t?1:0);if("string"===e)return f("bytes",new r(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof t.length)throw new Error("Not an array?");if("dynamic"!==(n=c(e))&&0!==n&&t.length>n)throw new Error("Elements exceed array size: "+n);for(d in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)h.push(f(e,t[d]));if("dynamic"===n){var p=f("uint256",t.length);h.unshift(p)}return r.concat(h)}if("bytes"===e)return t=new r(t),h=r.concat([f("uint256",t.length),t]),t.length%32!==0&&(h=r.concat([h,i.zeros(32-t.length%32)])),h;if(e.startsWith("bytes")){if((n=u(e))<1||n>32)throw new Error("Invalid bytes width: "+n);return i.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=u(e))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((s=l(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s<0)throw new Error("Supplied uint is negative");return s.toArrayLike(r,"be",32)}if(e.startsWith("int")){if((n=u(e))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((s=l(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(r,"be",32)}if(e.startsWith("ufixed")){if(n=a(e),(s=l(t))<0)throw new Error("Supplied ufixed is negative");return f("uint256",s.mul(new o(2).pow(new o(n[1]))))}if(e.startsWith("fixed"))return n=a(e),f("int256",l(t).mul(new o(2).pow(new o(n[1]))));throw new Error("Unsupported or invalid type: "+e)}function h(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function d(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n,o,a=[],c=0;c32)throw new Error("Invalid bytes width: "+n);a.push(i.setLengthRight(h,n))}else if(f.startsWith("uint")){if((n=u(f))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((o=l(h)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o.bitLength());a.push(o.toArrayLike(r,"be",n/8))}else{if(!f.startsWith("int"))throw new Error("Unsupported or invalid type: "+f);if((n=u(f))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((o=l(h)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o.bitLength());a.push(o.toTwos(n).toArrayLike(r,"be",n/8))}}return r.concat(a)}e.exports={rawEncode:function(e,t){var n=[],i=[],o=32*e.length;for(var u in e){var a=s(e[u]),c=f(a,t[u]);h(a)?(n.push(f("uint256",o)),i.push(c),o+=c.length):n.push(c)}return r.concat(n.concat(i))},solidityPack:d,soliditySHA3:function(e,t){return i.keccak(d(e,t))}}},37631:function(e,t,n){var r=n(79955).lW,i=n(74704).default,o=n(27424).default,s=n(94076),u=n(26170),a={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},c={encodeData:function(e,t,n){var a=this,c=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=["bytes32"],f=[this.hashType(e,n)];if(c){var h,d=function e(t,i,l){if(void 0!==n[i])return["bytes32",null==l?"0x0000000000000000000000000000000000000000000000000000000000000000":s.keccak(a.encodeData(i,l,n,c))];if(void 0===l)throw new Error("missing value for field ".concat(t," of type ").concat(i));if("bytes"===i)return["bytes32",s.keccak(l)];if("string"===i)return"string"===typeof l&&(l=r.from(l,"utf8")),["bytes32",s.keccak(l)];if(i.lastIndexOf("]")===i.length-1){var f=i.slice(0,i.lastIndexOf("[")),h=l.map((function(n){return e(t,f,n)}));return["bytes32",s.keccak(u.rawEncode(h.map((function(e){return o(e,1)[0]})),h.map((function(e){return o(e,2)[1]}))))]}return[i,l]},p=i(n[e]);try{for(p.s();!(h=p.n()).done;){var v=h.value,b=d(v.name,v.type,t[v.name]),y=o(b,2),g=y[0],m=y[1];l.push(g),f.push(m)}}catch(x){p.e(x)}finally{p.f()}}else{var _,w=i(n[e]);try{for(w.s();!(_=w.n()).done;){var E=_.value,k=t[E.name];if(void 0!==k)if("bytes"===E.type)l.push("bytes32"),k=s.keccak(k),f.push(k);else if("string"===E.type)l.push("bytes32"),"string"===typeof k&&(k=r.from(k,"utf8")),k=s.keccak(k),f.push(k);else if(void 0!==n[E.type])l.push("bytes32"),k=s.keccak(this.encodeData(E.type,k,n,c)),f.push(k);else{if(E.type.lastIndexOf("]")===E.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");l.push(E.type),f.push(k)}}}catch(x){w.e(x)}finally{w.f()}}return u.rawEncode(l,f)},encodeType:function(e,t){var n="",r=this.findTypeDependencies(e,t).filter((function(t){return t!==e}));r=[e].concat(r.sort());var o,s=i(r);try{for(s.s();!(o=s.n()).done;){var u=o.value;if(!t[u])throw new Error("No type definition specified: "+u);n+=u+"("+t[u].map((function(e){var t=e.name;return e.type+" "+t})).join(",")+")"}}catch(a){s.e(a)}finally{s.f()}return n},findTypeDependencies:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);var r,o=i(t[e]);try{for(o.s();!(r=o.n()).done;){var s,u=r.value,a=i(this.findTypeDependencies(u.type,t,n));try{for(a.s();!(s=a.n()).done;){var c=s.value;!n.includes(c)&&n.push(c)}}catch(l){a.e(l)}finally{a.f()}}}catch(l){o.e(l)}finally{o.f()}return n},hashStruct:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return s.keccak(this.encodeData(e,t,n,r))},hashType:function(e,t){return s.keccak(this.encodeType(e,t))},sanitizeData:function(e){var t={};for(var n in a.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.sanitizeData(e),i=[r.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,t)),s.keccak(r.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:a,TypedDataUtils:c,hashForSignTypedDataLegacy:function(e){return function(e){var t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;var n=e.map((function(e){return"bytes"===e.type?s.toBuffer(e.value):e.value})),r=e.map((function(e){return e.type})),i=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return u.soliditySHA3(["bytes32","bytes32"],[u.soliditySHA3(new Array(e.length).fill("string"),i),u.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return c.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return c.hash(e.data)}}},94076:function(e,t,n){var r=n(79955).lW,i=n(82138),o=n(48744);function s(e){return r.allocUnsafe(e).fill(0)}function u(e,t,n){var r=s(t);return e=a(e),n?e.length65536?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):o>2048?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):o>128?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function n(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,n=this.parsedData.length;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=b.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},createMovieClip:function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},setupTypeInfo:function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=b.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var a=!1;o>>i&1)),b.getMask(t,r,s-u)&&(a=!a),this.modules[r][s-u]=a,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},n.PAD0=236,n.PAD1=17,n.createData=function(e,t,r){for(var i=_.getRSBlocks(e,t),o=new w,s=0;s8*a)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*a+")");for(o.getLengthInBits()+4<=8*a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*a)&&(o.put(n.PAD0,8),!(o.getLengthInBits()>=8*a));)o.put(n.PAD1,8);return n.createBytes(o,i)},n.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),u=0;u=0?h.get(d):0}}var p=0;for(l=0;l=0;)t^=b.G15<=0;)t^=b.G18<>>=1;return t},getPatternPosition:function(e){return b.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case c:return t%2==0;case l:return n%3==0;case f:return(t+n)%3==0;case h:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case d:return t*n%2+t*n%3==0;case p:return(t*n%2+t*n%3)%2==0;case v:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new m([1],0),n=0;n5&&(n+=3+o-5)}for(r=0;r=256;)e-=255;return y.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)y.EXP_TABLE[g]=1<>>7-e%8&1)},put:function(e,t){for(var n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var E=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function k(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"===typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!==typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,a=function(e,t){for(var n=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),r=1,i=0,o=0,s=E.length;o<=s;o++){var u=E[o];if(!u)throw new Error("Content too long: expected "+i+" but got "+n);switch(t){case"L":i=u[0];break;case"M":i=u[1];break;case"Q":i=u[2];break;case"H":i=u[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(n<=i)break;r++}if(r>E.length)throw new Error("Content too long");return r}(r,this.options.ecl),c=function(e){switch(e){case"L":return i;case"M":return o;case"Q":return s;case"H":return u;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new n(a,c),this.qrcode.addData(r),this.qrcode.make()}k.prototype.svg=function(e){var t=this.options||{},n=this.qrcode.modules;"undefined"==typeof e&&(e={container:t.container||"svg"});for(var r="undefined"==typeof t.pretty||!!t.pretty,i=r?" ":"",o=r?"\r\n":"",s=t.width,u=t.height,a=n.length,c=s/(a+2*t.padding),l=u/(a+2*t.padding),f="undefined"!=typeof t.join&&!!t.join,h="undefined"!=typeof t.swap&&!!t.swap,d="undefined"==typeof t.xmlDeclaration||!!t.xmlDeclaration,p="undefined"!=typeof t.predefined&&!!t.predefined,v=p?i+''+o:"",b=i+''+o,y="",g="",m=0;m'+o:i+''+o}}f&&(y=i+'');var C="";if(void 0!==this.options.image&&this.options.image.svg){var A=s*this.options.image.width/100,I=u*this.options.image.height/100,T=u/2-I/2;C+='"}var R="";switch(e.container){case"svg":d&&(R+=''+o),R+='";break;case"svg-viewbox":d&&(R+=''+o),R+='";break;case"g":R+=''+o,R+=v+b+y,R+=C,R+="";break;default:R+=(v+b+y+C).replace(/^\s+/,"")}return R},e.exports=k},21787:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="3.7.1"},79955:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default,o=n(66115).default,s=n(61655).default,u=n(26389).default,a=n(12009),c=n(45889),l="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=d,t.h2=50;var f=2147483647;function h(e){if(e>f)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return b(e)}return p(e,t,n)}function p(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|_(e,t),r=h(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(ee(e,Uint8Array)){var t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ee(e,ArrayBuffer)||e&&ee(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(ee(e,SharedArrayBuffer)||e&&ee(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return d.from(r,t,n);var i=function(e){if(d.isBuffer(e)){var t=0|m(e.length),n=h(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||te(e.length)?h(0):y(e);if("Buffer"===e.type&&Array.isArray(e.data))return y(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function v(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function b(e){return v(e),h(e<0?0:0|m(e))}function y(e){for(var t=e.length<0?0:0|m(e.length),n=h(t),r=0;r=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function _(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ee(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(i)return r?-1:Q(e).length;t=(""+t).toLowerCase(),i=!0}}function w(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function E(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function k(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),te(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=d.from(t,r)),d.isBuffer(t))return 0===t.length?-1:x(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,r,i){var o,s=1,u=e.length,a=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,u/=2,a/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;ou&&(n=u-a),o=n;o>=0;o--){for(var f=!0,h=0;hi&&(r=i):r=i;var o,s=t.length;for(r>s/2&&(r=s/2),o=0;o>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:o>223?3:o>191?2:1;if(i+u<=n){var a=void 0,c=void 0,l=void 0,f=void 0;switch(u){case 1:o<128&&(s=o);break;case 2:128===(192&(a=e[i+1]))&&(f=(31&o)<<6|63&a)>127&&(s=f);break;case 3:a=e[i+1],c=e[i+2],128===(192&a)&&128===(192&c)&&(f=(15&o)<<12|(63&a)<<6|63&c)>2047&&(f<55296||f>57343)&&(s=f);break;case 4:a=e[i+1],c=e[i+2],l=e[i+3],128===(192&a)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&a)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(s=f)}}null===s?(s=65533,u=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=u}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?(d.isBuffer(o)||(o=d.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!d.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},d.byteLength=_,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},l&&(d.prototype[l]=d.prototype.inspect),d.prototype.compare=function(e,t,n,r,i){if(ee(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),u=Math.min(o,s),a=this.slice(r,i),c=e.slice(t,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,o){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function F(e,t,n,r,i){K(t,r,i,e,n,7);var o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;var s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function U(e,t,n,r,i){K(t,r,i,e,n,7);var o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;var s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function V(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,4),c.write(e,t,n,r,23,4),n+4}function Z(e,t,n,r,i){return t=+t,n>>>=0,i||V(e,0,n,8),c.write(e,t,n,r,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=re((function(e){G(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},d.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=re((function(e){G(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||D(e,4,this.length),c.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),c.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),c.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),c.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigUInt64LE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=0,s=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+n},d.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=n-1,s=1,u=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/s>>0)-u&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigInt64LE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return Z(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return Z(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,r){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function K(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(u," and < 2").concat(u," ** ").concat(8*(o+1)).concat(u):">= -(2".concat(u," ** ").concat(8*(o+1)-1).concat(u,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(u):">= ".concat(t).concat(u," and <= ").concat(n).concat(u),new Y.ERR_OUT_OF_RANGE("value",s,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||J(t,e.length-(n+1))}(r,i,o)}function G(e,t){if("number"!==typeof e)throw new Y.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new Y.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new Y.ERR_BUFFER_OUT_OF_BOUNDS;throw new Y.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?i=W(String(n)):"bigint"===typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function Q(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function X(e){return a.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function $(e,t,n,r){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ee(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function te(e){return e!==e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function re(e){return"undefined"===typeof BigInt?ie:e}function ie(){throw new Error("BigInt not supported")}},15171:function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t2&&(u.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===u[s]&&(u[s]=e.defaultProps[s]);return b(e,u,i,o,null)}function b(e,t,n,r,s){var u={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(u),u}function y(){return{current:null}}function g(e){return e.children}function m(e,t){this.props=e,this.context=t}function _(e,t){if(null==t)return e.__?_(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?b(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(p=E[h])||p&&v.key==p.key&&v.type===p.type)E[h]=void 0;else for(d=0;d2&&(u.children=arguments.length>3?r.call(arguments,2):n),b(e.type,u,i||e.key,o||e.ref,null)}function V(e,t){var n={__c:t="__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(E)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,i={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},o=0,s=function(e){return null!=e&&void 0===e.constructor},m.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof e&&(e=e(d({},n),this.props)),e&&d(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},m.prototype.render=g,u=[],k.__r=0,c=0},6637:function(e,t,n){"use strict";n.r(t),n.d(t,{useCallback:function(){return x},useContext:function(){return S},useDebugValue:function(){return C},useEffect:function(){return m},useErrorBoundary:function(){return A},useId:function(){return I},useImperativeHandle:function(){return E},useLayoutEffect:function(){return _},useMemo:function(){return k},useReducer:function(){return g},useRef:function(){return w},useState:function(){return y}});var r,i,o,s,u=n(41943),a=0,c=[],l=[],f=u.options.__b,h=u.options.__r,d=u.options.diffed,p=u.options.__c,v=u.options.unmount;function b(e,t){u.options.__h&&u.options.__h(i,e,a||t),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:l}),n.__[e]}function y(e){return a=1,g(L,e)}function g(e,t,n){var o=b(r++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):L(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){i.u=!0;var s=i.shouldComponentUpdate;i.shouldComponentUpdate=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!s||s.call(this,e,t,n);var i=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,n))}}return o.__N||o.__}function m(e,t){var n=b(r++,3);!u.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,i.__H.__h.push(n))}function _(e,t){var n=b(r++,4);!u.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,i.__h.push(n))}function w(e){return a=5,k((function(){return{current:e}}),[])}function E(e,t,n){a=6,_((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function k(e,t){var n=b(r++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function x(e,t){return a=8,k((function(){return e}),t)}function S(e){var t=i.context[e.__c],n=b(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(i)),t.props.value):e.__}function C(e,t){u.options.useDebugValue&&u.options.useDebugValue(t?t(e):e)}function A(e){var t=b(r++,10),n=y();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function I(){var e=b(r++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(M),e.__H.__h=[]}catch(i){e.__H.__h=[],u.options.__e(i,e.__v)}}u.options.__b=function(e){i=null,f&&f(e)},u.options.__r=function(e){h&&h(e),r=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(P),t.__h.forEach(M),t.__h=[])),o=i},u.options.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&s===u.options.requestAnimationFrame||((s=u.options.requestAnimationFrame)||N)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},u.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||M(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.options.__e(o,e.__v)}})),p&&p(e,t)},u.options.unmount=function(e){v&&v(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&u.options.__e(t,n.__v))};var R="function"==typeof requestAnimationFrame;function N(e){var t,n=function(){clearTimeout(r),R&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);R&&(t=requestAnimationFrame(n))}function P(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function M(e){var t=i;e.__c=e.__(),i=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function L(e,t){return"function"==typeof t?t(e):t}},66829:function(e,t,n){"use strict";n.r(t),n.d(t,{ArgumentOutOfRangeError:function(){return N.W},AsyncSubject:function(){return l.c},BehaviorSubject:function(){return a.X},ConnectableObservable:function(){return i.c},EMPTY:function(){return q.E},EmptyError:function(){return P.K},GroupedObservable:function(){return o.T},NEVER:function(){return he},Notification:function(){return C.P},NotificationKind:function(){return C.W},ObjectUnsubscribedError:function(){return M.N},Observable:function(){return r.y},ReplaySubject:function(){return c.t},Scheduler:function(){return k.b},Subject:function(){return u.xQ},Subscriber:function(){return S.L},Subscription:function(){return x.w},TimeoutError:function(){return L.W},UnsubscriptionError:function(){return O.B},VirtualAction:function(){return E},VirtualTimeScheduler:function(){return w},animationFrame:function(){return _},animationFrameScheduler:function(){return m},asap:function(){return f.e},asapScheduler:function(){return f.E},async:function(){return h.P},asyncScheduler:function(){return h.z},bindCallback:function(){return U},bindNodeCallback:function(){return Z},combineLatest:function(){return K.aj},concat:function(){return G.z},config:function(){return Re.v},defer:function(){return J.P},empty:function(){return q.c},forkJoin:function(){return $},from:function(){return X.D},fromEvent:function(){return ne},fromEventPattern:function(){return ie},generate:function(){return oe},identity:function(){return T.y},iif:function(){return ue},interval:function(){return ce},isObservable:function(){return R},merge:function(){return fe.T},never:function(){return de},noop:function(){return I.Z},observable:function(){return s.L},of:function(){return pe.of},onErrorResumeNext:function(){return ve},pairs:function(){return be},partition:function(){return we},pipe:function(){return A.z},queue:function(){return d.c},queueScheduler:function(){return d.N},race:function(){return Ee.S3},range:function(){return ke},scheduled:function(){return Te.x},throwError:function(){return Se._},timer:function(){return Ce.H},using:function(){return Ae},zip:function(){return Ie.$R}});var r=n(4585),i=n(81356),o=n(25416),s=n(62277),u=n(76877),a=n(34703),c=n(85516),l=n(19547),f=n(20642),h=n(85278),d=n(65184),p=n(29973),v=n(76096),b=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return p.ZT(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(v.o),y=n(51593),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p.ZT(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++rt.index?1:-1:e.delay>t.delay?1:-1},t}(v.o),k=n(43333),x=n(63955),S=n(8301),C=n(82972),A=n(20770),I=n(39644),T=n(65762);function R(e){return!!e&&(e instanceof r.y||"function"===typeof e.lift&&"function"===typeof e.subscribe)}var N=n(29575),P=n(86485),M=n(57815),O=n(4355),L=n(25823),j=n(589),D=n(76205),B=n(28123),F=n(65283);function U(e,t,n){if(t){if(!(0,F.K)(t))return function(){for(var r=[],i=0;i