/*! For license information please see 836.54b78d4c.chunk.js.LICENSE.txt */
(self.webpackChunkcharts=self.webpackChunkcharts||[]).push([[836],{11395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;const r=n(10080),i=n(72961),s=n(55550),o=n(81689),c=n(34405),a=n(47993),u=n(16642),l=n(81107),h=n(27865);class d{constructor(e){var t,n,r;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const o=e.linkAPIUrl||i.LINK_API_URL;let l;if(l=e.uiConstructor?e.uiConstructor:e=>new c.WalletSDKUI(e),"undefined"===typeof e.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this._overrideIsCoinbaseBrowser=null!==(n=e.overrideIsCoinbaseBrowser)&&void 0!==n&&n,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this._diagnosticLogger={log:e.eventListener.onEvent}:this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=null===(r=e.reloadOnDisconnect)||void 0===r||r;const p=new URL(o),f="".concat(p.protocol,"//").concat(p.host);this._storage=new s.ScopedLocalStorage("-walletlink:".concat(f)),this._storage.setItem("version",d.VERSION),this.walletExtension||this.coinbaseBrowser||(this._relayEventManager=new u.WalletSDKRelayEventManager,this._relay=new a.WalletSDKRelay({linkAPIUrl:o,version:h.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:l,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(e.appName,e.appLogoUrl),e.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"===typeof n.disableReloadOnDisconnect&&n.disableReloadOnDisconnect(),n;const r=this.coinbaseBrowser;if(r)return r;const i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||i.setConnectDisabled(!0),new o.CoinbaseWalletProvider({relayProvider:()=>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})}setAppInfo(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,l.getFavicon)();const 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)}disconnect(){var e;const t=this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}getQrUrl(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}getCoinbaseWalletLogo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;return(0,r.walletLogo)(e,t)}get walletExtension(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}get coinbaseBrowser(){var e,t;try{const 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(n){return}}isCipherProvider(e){return"boolean"===typeof e.isCipher&&e.isCipher}}t.CoinbaseWalletSDK=d,d.VERSION=h.LIB_VERSION},10080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0;t.walletLogo=(e,t)=>{let 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")}}},98470:(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}"},44296: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.CoinbaseAppSteps=t.CoinbaseWalletSteps=t.ConnectItem=t.ConnectContent=void 0;const i=r(n(83061)),s=n(73856),o=n(98944),c=n(81107),a=n(27865),u=n(24662),l=r(n(24479)),h=r(n(20658)),d=n(96038),p=r(n(11541)),f=r(n(14206)),g=n(17993),b=n(52179),v=n(91807),y=r(n(98470)),m={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:h.default,steps:E},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:l.default,steps:S}},w=e=>"light"===e?"#FFFFFF":"#0A0B0D";function _(e){let{title:t,description:n,icon:r,selected:o,theme:c,onClick:a}=e;return(0,s.h)("div",{onClick:a,class:(0,i.default)("-cbwsdk-connect-item",c,{selected:o})},(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 E(e){let{theme:t}=e;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,i.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,i.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,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(d.QRCodeIcon,{fill:w(t)})))))}function S(e){let{theme:t}=e;return(0,s.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,s.h)("li",{class:(0,i.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,i.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,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(g.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,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,s.h)(d.QRCodeIcon,{fill:w(t)})))))}t.ConnectContent=function(e){const{theme:t}=e,[n,r]=(0,o.useState)("coinbase-wallet-app"),l=(0,o.useCallback)((e=>{r(e)}),[]),h=(0,c.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId);if(!n)return null;const d=m[n].steps,g="coinbase-app"===n;return(0,s.h)("div",{"data-testid":"connect-content",class:(0,i.default)("-cbwsdk-connect-content",t)},(0,s.h)("style",null,y.default),(0,s.h)("div",{class:"-cbwsdk-connect-content-header"},(0,s.h)("h2",{class:(0,i.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)(u.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(m).map((e=>{let[r,i]=e;return(0,s.h)(_,{key:r,title:i.title,description:i.description,icon:i.icon,selected:n===r,onClick:()=>l(r),theme:t})}))),g&&(0,s.h)("div",{class:(0,i.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)(b.QRCode,{content:h,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:(w=n,"coinbase-app"===w?p.default:f.default),width:25,height:25}}),(0,s.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:a.LIB_VERSION}),(0,s.h)("input",{type:"hidden",value:h})),(0,s.h)(d,{theme:t}),!e.isConnected&&(0,s.h)("div",{"data-testid":"connecting-spinner",class:(0,i.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,s.h)(v.Spinner,{size:36,color:"dark"===t?"#FFF":"#000"}),(0,s.h)("p",null,"Connecting...")))));var w},t.ConnectItem=_,t.CoinbaseWalletSteps=E,t.CoinbaseAppSteps=S},99763:(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}"},19236: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.ConnectDialog=void 0;const i=r(n(83061)),s=n(73856),o=n(98944),c=n(44296),a=n(69691),u=r(n(99763));t.ConnectDialog=e=>{const{isOpen:t,darkMode:n}=e,[r,l]=(0,o.useState)(!t),[h,d]=(0,o.useState)(!t);(0,o.useEffect)((()=>{const e=[window.setTimeout((()=>{d(!t)}),10)];return t?l(!1):e.push(window.setTimeout((()=>{l(!0)}),360)),()=>{e.forEach(window.clearTimeout)}}),[e.isOpen]);const p=n?"dark":"light";return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-container",r&&"-cbwsdk-connect-dialog-container-hidden")},(0,s.h)("style",null,u.default),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-backdrop",p,h&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,s.h)("div",{class:"-cbwsdk-connect-dialog"},(0,s.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-box",h&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,s.h)(c.ConnectContent,{theme:p,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)(a.TryExtensionContent,{theme:p}))))}},247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;const r=n(73856),i=n(40623),s=n(19236);t.LinkFlow=class{constructor(e){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,this.chainId$=e.chainId$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((e=>{this.isConnected!==e&&(this.isConnected=e,this.render())}))),this.subscriptions.add(this.chainId$.subscribe((e=>{this.chainId!==e&&(this.chainId=e,this.render())})))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.subscribe((()=>{this.root&&(0,r.render)((0,r.h)(s.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(e)}}},52179: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.QRCode=void 0;const i=n(73856),s=n(98944),o=r(n(16134));t.QRCode=e=>{const[t,n]=(0,s.useState)("");return(0,s.useEffect)((()=>{var t,r;const i=new o.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!==(r=e.height)&&void 0!==r?r:256,padding:0,image:e.image}),s=Buffer.from(i.svg(),"utf8").toString("base64");n("data:image/svg+xml;base64,".concat(s))})),t?(0,i.h)("img",{src:t,alt:"QR Code"}):null}},16627:(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}"},64620: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.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const i=r(n(83061)),s=n(73856),o=n(98944),c=r(n(16627));function a(e){return"coinbase-app"===e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}t.Snackbar=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,s.render)((0,s.h)("div",null,(0,s.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((e=>{let[n,r]=e;return(0,s.h)(t.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};t.SnackbarContainer=e=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},e.children));t.SnackbarInstance=e=>{let{autoExpand:t,message:n,menuItems:r,appSrc:c}=e;const[u,l]=(0,o.useState)(!0),[h,d]=(0,o.useState)(null!==t&&void 0!==t&&t);(0,o.useEffect)((()=>{const e=[window.setTimeout((()=>{l(!1)}),1),window.setTimeout((()=>{d(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}}));return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",u&&"-cbwsdk-snackbar-instance-hidden",h&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{d(!h)}},(0,s.h)("img",{src:a(c),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,s.h)("div",{class:"-gear-container"},!h&&(0,s.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((e,t)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,s.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}},57470:(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)}}"},91807: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;const i=n(73856),s=r(n(57470));t.Spinner=e=>{var t;const 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,s.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}})))}},64980:(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}"},69691: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.TryExtensionContent=void 0;const i=r(n(83061)),s=n(73856),o=n(98944),c=n(31834),a=n(76642),u=n(83404),l=r(n(64980));t.TryExtensionContent=function(e){let{theme:t}=e;const[n,r]=(0,o.useState)(!1),h=(0,o.useCallback)((()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}),[]),d=(0,o.useCallback)((()=>{n?window.location.reload():(h(),r(!0))}),[h,n]);return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-try-extension",t)},(0,s.h)("style",null,l.default),(0,s.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,s.h)("h3",{class:(0,i.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,i.default)("-cbwsdk-try-extension-cta",t),onClick:d},n?"Refresh":"Install"),(0,s.h)("div",null,!n&&(0,s.h)(c.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,i.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,s.h)(a.LaptopIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:(0,i.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,i.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,s.h)(u.SafeIcon,{fill:"light"===t?"#0A0B0D":"#FFFFFF"}))),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}},31834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowLeftIcon=void 0;const r=n(73856);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"}))}},24662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;const r=n(73856);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"}))}},76642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LaptopIcon=void 0;const r=n(73856);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"}))}},96038:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeIcon=void 0;const r=n(73856);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"}))}},11541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default='\n \n'},14206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='\n \n'},83404:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeIcon=void 0;const r=n(73856);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"}))}},17993:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusDotIcon=void 0;const r=n(73856);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"}))}},24479:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4="},20658:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg=="},70732:(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)}},56171:(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"}},10680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const r=n(40623),i=n(21807);var s;!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(s=t.ConnectionState||(t.ConnectionState={}));t.RxWebSocket=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=t,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(s.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=e.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((e=>{let t;try{this.webSocket=t=new this.WebSocketClass(this.url)}catch(n){return void e.error(n)}this.connectionStateSubject.next(s.CONNECTING),t.onclose=t=>{this.clearWebSocket(),e.error(new Error("websocket error ".concat(t.code,": ").concat(t.reason))),this.connectionStateSubject.next(s.DISCONNECTED)},t.onopen=t=>{e.next(),e.complete(),this.connectionStateSubject.next(s.CONNECTED)},t.onmessage=e=>{this.incomingDataSubject.next(e.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:e}=this;if(e){this.clearWebSocket(),this.connectionStateSubject.next(s.DISCONNECTED);try{e.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((e=>{let t;try{t=JSON.parse(e)}catch(n){return(0,r.empty)()}return(0,r.of)(t)})))}sendData(e){const{webSocket:t}=this;if(!t)throw new Error("websocket is not connected");t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},82747:(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}},62569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKConnection=void 0;const r=n(40623),i=n(21807),s=n(35836),o=n(99306),c=n(70732),a=n(56171),u=n(10680),l=n(82747);t.WalletSDKConnection=class{constructor(e,t,n,c){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=e,this.sessionKey=t,this.diagnostic=c,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,o.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new u.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((t=>{var n;return null===(n=this.diagnostic)||void 0===n?void 0:n.log(a.EVENTS.CONNECTED_STATE_CHANGE,{state:t,sessionIdHash:s.Session.hash(e)})})),(0,i.skip)(1),(0,i.filter)((e=>e===u.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((e=>!this.destroyed)),(0,i.flatMap)((e=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((e=>(0,r.iif)((()=>e===u.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((e=>this.sendIsLinked())),(0,i.tap)((e=>this.sendGetSessionConfig())),(0,i.map)((e=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((e=>(0,r.of)(!1)))).subscribe((e=>this.connectedSubject.next(e)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((e=>(0,r.iif)((()=>e===u.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((e=>0===e?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((e=>"h"===e))).subscribe((e=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["IsLinkedOK","Linked"].includes(e.type)))).subscribe((t=>{var n;const r=t;null===(n=this.diagnostic)||void 0===n||n.log(a.EVENTS.LINKED,{sessionIdHash:s.Session.hash(e),linked:r.linked,type:t.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((e=>["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)))).subscribe((t=>{var n;const r=t;null===(n=this.diagnostic)||void 0===n||n.log(a.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:s.Session.hash(e),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.diagnostic)||void 0===e||e.log(a.EVENTS.STARTED_CONNECTING,{sessionIdHash:s.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(e=this.diagnostic)||void 0===e||e.log(a.EVENTS.DISCONNECTED,{sessionIdHash:s.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((e=>e)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((e=>{if("Event"!==e.type)return!1;const t=e;return"string"===typeof t.sessionId&&"string"===typeof t.eventId&&"string"===typeof t.event&&"string"===typeof t.data})),(0,i.map)((e=>e)))}setSessionMetadata(e,t){const n=(0,c.ClientMessageSetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:t}});return this.onceConnected$.pipe((0,i.flatMap)((e=>this.makeRequest(n))),(0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}publishEvent(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,c.ClientMessagePublishEvent)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((e=>this.makeRequest(r))),(0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId})))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}makeRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=e.id;try{this.sendData(e)}catch(s){return(0,r.throwError)(s)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(t,(0,r.throwError)(new Error("request ".concat(n," timed out")))),(0,i.filter)((e=>e.id===n)),(0,i.take)(1))}authenticate(){const e=(0,c.ClientMessageHostSession)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,i.map)((e=>{if((0,l.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}sendIsLinked(){const e=(0,c.ClientMessageIsLinked)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,c.ClientMessageGetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}},72961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LINK_API_URL=void 0,t.LINK_API_URL="https://www.walletlink.org"},27312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const r=n(98689),i=n(87734),s=n(27865);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(){let 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){const o=(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}),c=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");c.searchParams.set("version",s.LIB_VERSION),c.searchParams.set("code",o.code.toString());const a=function(e,t){var n;const 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}(o.data,n);return a&&c.searchParams.set("method",a),c.searchParams.set("message",o.message),Object.assign(Object.assign({},o),{docUrl:c.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}},52836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const r=n(11395),i=n(81689);var s=n(11395);Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return s.CoinbaseWalletSDK}});var o=n(81689);Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return o.CoinbaseWalletProvider}}),t.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},55550:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;t.ScopedLocalStorage=class{constructor(e){this.scope=e}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let n=0;nlocalStorage.removeItem(e)))}scopedKey(e){return"".concat(this.scope,":").concat(e)}}},31357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},31665: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.injectCssReset=void 0;const i=r(n(31357));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},81689: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.CoinbaseWalletProvider=void 0;const i=r(n(4609)),s=r(n(64166)),o=n(56171),c=n(27312),a=n(35836),u=n(731),l=n(50194),h=n(87734),d=n(81107),p=r(n(36810)),f=n(43122),g=n(27566),b=n(49023),v="DefaultChainId",y="DefaultJsonRpcUrl";class m extends i.default{constructor(e){var t,n;super(),this._filterPolyfill=new f.FilterPolyfill(this),this._subscriptionManager=new b.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=null===(t=e.overrideIsCoinbaseWallet)||void 0===t||t,this.isCoinbaseBrowser=null!==(n=e.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=e.qrUrl;const r=this.getChainId(),i=(0,d.prepend0x)(r.toString(16));this.emit("connect",{chainIdStr:i});const s=this._storage.getItem(u.LOCAL_STORAGE_ADDRESSES_KEY);if(s){const e=s.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,d.ensureAddressString)(e))),this.emit("accountsChanged",e))}this._subscriptionManager.events.on("notification",(e=>{this.emit("message",{type:e.method,data:e.params})})),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",(e=>{var t;if(e.origin===location.origin&&e.source===window&&"walletLinkMessage"===e.data.type){if("dappChainSwitched"===e.data.data.action){const n=e.data.data.chainId,r=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n))}"addressChanged"===e.data.data.action&&this._setAddresses([e.data.data.address])}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,d.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(y))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(y,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,t){this.isCoinbaseBrowser||(this._chainIdFromOpts=t,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,t){this.jsonRpcUrl=e;const n=this.getChainId();this._storage.setItem(v,t.toString(10));!((0,d.ensureIntNumber)(t)!==n)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,r,i,s){const o=await this.initializeRelay();return!!(await o.watchAsset(e,t,n,r,i,null===s||void 0===s?void 0:s.toString()).promise).result}async addEthereumChain(e,t,n,r,i,s){var o,c;if((0,d.ensureIntNumber)(e)===this.getChainId())return!1;const a=await this.initializeRelay(),u=a.inlineAddEthereumChain(e.toString());this._isAuthorized()||u||await a.requestEthereumAccounts().promise;const l=await a.addEthereumChain(e.toString(),t,i,n,r,s).promise;return!0===(null===(o=l.result)||void 0===o?void 0:o.isApproved)&&this.updateProviderInfo(t[0],e),!0===(null===(c=l.result)||void 0===c?void 0:c.isApproved)}async switchEthereumChain(e){const t=await this.initializeRelay(),n=await t.switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,h.isErrorResponse)(n)&&n.errorCode)throw n.errorCode===c.standardErrorCodes.provider.unsupportedChain?c.standardErrors.provider.unsupportedChain(e):c.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&this.updateProviderInfo(r.rpcUrl,e)}setAppInfo(e,t){this.initializeRelay().then((n=>n.setAppInfo(e,t)))}async enable(){var e;return null===(e=this.diagnostic)||void 0===e||e.log(o.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send(g.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(e,t){try{const n=this._send(e,t);if(n instanceof Promise)return n.catch((t=>{throw(0,c.serializeError)(t,e)}))}catch(n){throw(0,c.serializeError)(n,e)}}_send(e,t){if("string"===typeof e){const n={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(n).then((e=>e.result))}if("function"===typeof t){const n=e,r=t;return this._sendAsync(n,r)}if(Array.isArray(e)){return e.map((e=>this._sendRequest(e)))}const n=e;return this._sendRequest(n)}async sendAsync(e,t){try{return this._sendAsync(e,t).catch((t=>{throw(0,c.serializeError)(t,e)}))}catch(n){return Promise.reject((0,c.serializeError)(n,e))}}async _sendAsync(e,t){if("function"!==typeof t)throw new Error("callback is required");if(Array.isArray(e)){const n=t;return void this._sendMultipleRequestsAsync(e).then((e=>n(null,e))).catch((e=>n(e,null)))}const n=t;return this._sendRequestAsync(e).then((e=>n(null,e))).catch((e=>n(e,null)))}async request(e){try{return this._request(e).catch((t=>{throw(0,c.serializeError)(t,e.method)}))}catch(t){return Promise.reject((0,c.serializeError)(t,e.method))}}async _request(e){if(!e||"object"!==typeof e||Array.isArray(e))throw c.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!==typeof t||0===t.length)throw c.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!==typeof n||null===n))throw c.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(e){var t;const n=await this.initializeRelay(),r=await n.scanQRCode((0,d.ensureRegExpString)(e)).promise;if("string"!==typeof r.result)throw(0,c.serializeError)(null!==(t=r.errorMessage)&&void 0!==t?t:"result was not a string",l.Web3Method.scanQRCode);return r.result}async genericRequest(e,t){var n;const r=await this.initializeRelay(),i=await r.genericRequest(e,t).promise;if("string"!==typeof i.result)throw(0,c.serializeError)(null!==(n=i.errorMessage)&&void 0!==n?n:"result was not a string",l.Web3Method.generic);return i.result}async selectProvider(e){var t;const n=await this.initializeRelay(),r=await n.selectProvider(e).promise;if("string"!==typeof r.result)throw(0,c.serializeError)(null!==(t=r.errorMessage)&&void 0!==t?t:"result was not a string",l.Web3Method.selectProvider);return r.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const t={jsonrpc:"2.0",id:e.id},{method:n}=e;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}_setAddresses(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");const n=e.map((e=>(0,d.ensureAddressString)(e)));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(u.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise(((t,n)=>{try{const r=this._handleSynchronousMethods(e);if(void 0!==r)return t({jsonrpc:"2.0",id:e.id,result:r});const i=this._handleAsynchronousFilterMethods(e);if(void 0!==i)return void i.then((n=>t(Object.assign(Object.assign({},n),{id:e.id})))).catch((e=>n(e)));const s=this._handleSubscriptionMethods(e);if(void 0!==s)return void s.then((n=>t({jsonrpc:"2.0",id:e.id,result:n.result}))).catch((e=>n(e)))}catch(r){return n(r)}this._handleAsynchronousMethods(e).then((n=>n&&t(Object.assign(Object.assign({},n),{id:e.id})))).catch((e=>n(e)))}))}_sendMultipleRequestsAsync(e){return Promise.all(e.map((e=>this._sendRequestAsync(e))))}_handleSynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case g.JSONRPCMethod.eth_accounts:return this._eth_accounts();case g.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case g.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case g.JSONRPCMethod.net_version:return this._net_version();case g.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case g.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case g.JSONRPCMethod.eth_sign:return this._eth_sign(n);case g.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case g.JSONRPCMethod.personal_sign:return this._personal_sign(n);case g.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case g.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case g.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case g.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case g.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case g.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case g.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case g.JSONRPCMethod.eth_signTypedData_v4:case g.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case g.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case g.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case g.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case g.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(e){const{method:t}=e,n=e.params||[];switch(t){case g.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case g.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case g.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case g.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case g.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case g.JSONRPCMethod.eth_subscribe:case g.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const t=(0,d.ensureAddressString)(e);return this._addresses.map((e=>(0,d.ensureAddressString)(e))).includes(t)}catch(t){}return!1}_ensureKnownAddress(e){var t;if(!this._isKnownAddress(e))throw null===(t=this.diagnostic)||void 0===t||t.log(o.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,d.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);return{fromAddress:t,toAddress:e.to?(0,d.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,d.ensureBN)(e.value):new s.default(0),data:e.data?(0,d.ensureBuffer)(e.data):Buffer.alloc(0),nonce:null!=e.nonce?(0,d.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,d.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,d.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,d.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,d.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw c.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw c.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,r){this._ensureKnownAddress(t);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(e,t,n,r).promise).result}}catch(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw c.standardErrors.provider.userRejectedRequest("User denied message signature");throw i}}async _ethereumAddressFromSignedMessage(e,t,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(e,t,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,d.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(v);if(!e)return(0,d.ensureIntNumber)(this._chainIdFromOpts);const t=parseInt(e,10);return(0,d.ensureIntNumber)(t)}async _eth_requestAccounts(){var e;if(null===(e=this.diagnostic)||void 0===e||e.log(o.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{const e=await this.initializeRelay();t=await e.requestEthereumAccounts().promise}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw c.standardErrors.provider.userRejectedRequest("User denied account authorization");throw n}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,d.ensureBuffer)(e[0]),n=(0,d.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signEthereumTransaction(t).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw c.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=(0,d.ensureBuffer)(e[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(t,this.getChainId()).promise).result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await e.signAndSubmitEthereumTransaction(t).promise).result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw c.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,d.ensureParsedJSONObject)(e[0]),n=(0,d.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const r=p.default.hashForSignTypedDataLegacy({data:t}),i=JSON.stringify(t,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=p.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,i)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,d.ensureAddressString)(e[0]),n=(0,d.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=p.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,i)}async _cbwallet_arbitrary(e){const t=e[0],n=e[1];if("string"!==typeof n)throw new Error("parameter must be a string");if("object"!==typeof t||null===t)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(t,n)}}async _wallet_addEthereumChain(e){var t,n,r,i;const s=e[0];if(0===(null===(t=s.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||""===s.chainName.trim())throw c.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw c.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(s.chainId,16);return await this.addEthereumChain(o,null!==(n=s.rpcUrls)&&void 0!==n?n:[],null!==(r=s.blockExplorerUrls)&&void 0!==r?r:[],s.chainName,null!==(i=s.iconUrls)&&void 0!==i?i:[],s.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw c.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==(null===t||void 0===t?void 0:t.type))throw c.standardErrors.rpc.invalidParams("Asset of type '".concat(t.type,"' is not supported"));if(!(null===t||void 0===t?void 0:t.options))throw c.standardErrors.rpc.invalidParams("Options are required");if(!(null===t||void 0===t?void 0:t.options.address))throw c.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:r,symbol:i,image:s,decimals:o}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,r,i,o,s,n)}}_eth_uninstallFilter(e){const t=(0,d.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}async _eth_newFilter(e){const t=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(t)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const t=(0,d.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}_eth_getFilterLogs(e){const t=(0,d.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((e=>(e.setAccountsCallback(((e,t)=>this._setAddresses(e,t))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))})),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e)))}}t.CoinbaseWalletProvider=m},43122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;const r=n(99306),i=n(81107),s={jsonrpc:"2.0",id:0};function o(e){return{fromBlock:a(e.fromBlock),toBlock:a(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function c(e){const t={fromBlock:u(e.fromBlock),toBlock:u(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function a(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,r.IntNumber)(0);if((0,i.isHexString)(e))return(0,i.intNumberFromHexString)(e);throw new Error("Invalid block option: ".concat(String(e)))}function u(e){return"latest"===e?e:(0,i.hexStringFromIntNumber)(e)}function l(){return Object.assign(Object.assign({},s),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},s),{result:[]})}t.FilterPolyfill=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=e}async newFilter(e){const t=o(e),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,t.fromBlock);return console.log("Installing new log filter(".concat(n,"):"),t,"initial cursor position:",r),this.logFilters.set(n,t),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log("Installing new block filter (".concat(e,") with initial cursor position:"),t),this.blockFilters.add(e),this.setFilterTimeout(e),(0,i.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),t=await this.setInitialCursorPosition(e,"latest");return console.log("Installing new block filter (".concat(e,") with initial cursor position:"),t),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,i.hexStringFromIntNumber)(e)}uninstallFilter(e){const t=(0,i.intNumberFromHexString)(e);return console.log("Uninstalling filter (".concat(t,")")),this.deleteFilter(t),!0}getFilterChanges(e){const t=(0,i.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(l())}async getFilterLogs(e){const t=(0,i.intNumberFromHexString)(e),n=this.logFilters.get(t);return n?this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[c(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise(((t,n)=>{this.provider.sendAsync(e,((e,r)=>e?n(e):Array.isArray(r)||null==r?n(new Error("unexpected response received: ".concat(JSON.stringify(r)))):void t(r)))}))}deleteFilter(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)}async getLogFilterChanges(e){const t=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!t)return l();const o=await this.getCurrentBlockHeight(),a="latest"===t.toBlock?o:t.toBlock;if(n>o)return h();if(n>t.toBlock)return h();console.log("Fetching logs from ".concat(n," to ").concat(a," for filter ").concat(e));const u=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},t),{fromBlock:n,toBlock:a}))]}));if(Array.isArray(u.result)){const t=u.result.map((e=>(0,i.intNumberFromHexString)(e.blockNumber||"0x0"))),s=Math.max(...t);if(s&&s>n){const t=(0,r.IntNumber)(s+1);console.log("Moving cursor position for filter (".concat(e,") from ").concat(n," to ").concat(t)),this.cursors.set(e,t)}}return u}async getBlockFilterChanges(e){const t=this.cursors.get(e);if(!t)return l();const n=await this.getCurrentBlockHeight();if(t>n)return h();console.log("Fetching blocks from ".concat(t," to ").concat(n," for filter (").concat(e,")"));const o=(await Promise.all((0,i.range)(t,n+1).map((e=>this.getBlockHashByNumber((0,r.IntNumber)(e)))))).filter((e=>!!e)),c=(0,r.IntNumber)(t+o.length);return console.log("Moving cursor position for filter (".concat(e,") from ").concat(t," to ").concat(c)),this.cursors.set(e,c),Object.assign(Object.assign({},s),{result:o})}async getPendingTransactionFilterChanges(e){return Promise.resolve(h())}async setInitialCursorPosition(e,t){const n=await this.getCurrentBlockHeight(),r="number"===typeof t&&t>n?t:n;return this.cursors.set(e,r),r}setFilterTimeout(e){const t=this.timeouts.get(e);t&&window.clearTimeout(t);const n=window.setTimeout((()=>{console.log("Filter (".concat(e,") timed out")),this.deleteFilter(e)}),3e5);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(e))}async getBlockHashByNumber(e){const t=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(e),!1]}));return t.result&&"string"===typeof t.result.hash?(0,i.ensureHexString)(t.result.hash):null}},t.filterFromParam=o},27566:(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={}))},49023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;const r=n(28371),i=n(68286),s=()=>{};t.SubscriptionManager=class{constructor(e){const t=new r.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:s}=i({blockTracker:t,provider:e});this.events=n,this.subscriptionMiddleware=s}async handleRequest(e){const t={};return await this.subscriptionMiddleware(e,t,s,s),t}destroy(){this.subscriptionMiddleware.destroy()}}},34405:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKUI=void 0;const r=n(247),i=n(64620),s=n(31665);t.WalletSDKUI=class{constructor(e){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new i.Snackbar({darkMode:e.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,chainId$:e.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,s.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let 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)}setAppSrc(e){this.appSrc=e}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return null!==(e=this.standalone)&&void 0!==e&&e}}},94100:(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={}))},35836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const r=n(90590),i=n(81107),s="session:id",o="session:secret",c="session:linked";class a{constructor(e,t,n,s){this._storage=e,this._id=t||(0,i.randomBytesHex)(16),this._secret=n||(0,i.randomBytesHex)(32),this._key=(new r.sha256).update("".concat(this._id,", ").concat(this._secret," WalletLink")).digest("hex"),this._linked=!!s}static load(e){const t=e.getItem(s),n=e.getItem(c),r=e.getItem(o);return t&&r?new a(e,t,r,"1"===n):null}static hash(e){return(new r.sha256).update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(s,this._id),this._storage.setItem(o,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}t.Session=a},47993:function(e,t,n){"use strict";var r=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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},o=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)&&r(t,e,n);return i(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelay=void 0;const a=c(n(45590)),u=n(40623),l=n(21807),h=n(56171),d=n(62569),p=n(27312),f=n(99306),g=n(81107),b=o(n(71572)),v=n(35836),y=n(731),m=n(50194),w=n(90429),_=n(14107),E=n(87734),S=n(12202);class x extends y.WalletSDKRelayAbstract{constructor(e){var t;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=new u.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new u.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:r,connection:i}=this.subscribe();if(this._session=n,this.connection=i,this.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this.diagnostic={log:e.eventListener.onEvent}:this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=null===(t=e.reloadOnDisconnect)||void 0===t||t,this.ui=r}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe((e=>{this.dappDefaultChain!==e&&(this.dappDefaultChain=e)})));const e=v.Session.load(this.storage)||new v.Session(this.storage).save(),t=new d.WalletSDKConnection(e.id,e.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(t.sessionConfig$.subscribe({next:e=>{this.onSessionConfigChanged(e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(t.incomingEvent$.pipe((0,l.filter)((e=>"Web3Response"===e.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(t.linked$.pipe((0,l.skip)(1),(0,l.tap)((e=>{var t;this.isLinked=e;const n=this.storage.getItem(y.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this.session.linked=e),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!e&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const e=this.getSessionIdHash();null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:e})}}}))).subscribe()),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>!!e.metadata&&"1"===e.metadata.__destroyed))).subscribe((()=>{var e;const n=t.isDestroyed;return null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>e.metadata&&void 0!==e.metadata.WalletUsername))).pipe((0,l.mergeMap)((t=>b.decrypt(t.metadata.WalletUsername,e.secret)))).subscribe({next:e=>{this.storage.setItem(y.WALLET_USER_NAME_KEY,e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>e.metadata&&void 0!==e.metadata.AppVersion))).pipe((0,l.mergeMap)((t=>b.decrypt(t.metadata.AppVersion,e.secret)))).subscribe({next:e=>{this.storage.setItem(y.APP_VERSION_KEY,e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl))).pipe((0,l.mergeMap)((t=>(0,u.zip)(b.decrypt(t.metadata.ChainId,e.secret),b.decrypt(t.metadata.JsonRpcUrl,e.secret))))).pipe((0,l.distinctUntilChanged)()).subscribe({next:e=>{let[t,n]=e;this.chainCallback&&this.chainCallback(t,n)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>e.metadata&&void 0!==e.metadata.EthereumAddress))).pipe((0,l.mergeMap)((t=>b.decrypt(t.metadata.EthereumAddress,e.secret)))).subscribe({next:e=>{this.accountsCallback&&this.accountsCallback([e]),x.accountRequestCallbackIds.size>0&&(Array.from(x.accountRequestCallbackIds.values()).forEach((t=>{const n=(0,S.Web3ResponseMessage)({id:t,response:(0,E.RequestEthereumAccountsResponse)([e])});this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))})),x.accountRequestCallbackIds.clear())},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(t.sessionConfig$.pipe((0,l.filter)((e=>e.metadata&&void 0!==e.metadata.AppSrc))).pipe((0,l.mergeMap)((t=>b.decrypt(t.metadata.AppSrc,e.secret)))).subscribe({next:e=>{this.ui.setAppSrc(e)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:e,connected$:t.connected$,chainId$:this.dappDefaultChainSubject});return t.connect(),{session:e,ui:n,connection:t}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,l.timeout)(1e3),(0,l.catchError)((e=>(0,u.of)(null)))).subscribe((e=>{var t,n,r;const i=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch(l){null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.diagnostic)||void 0===n||n.log(h.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const s=v.Session.load(this.storage);if((null===s||void 0===s?void 0:s.id)===this._session.id?this.storage.clear():s&&(null===(r=this.diagnostic)||void 0===r||r.log(h.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:v.Session.hash(s.id)})),this._reloadOnDisconnect)return void this.ui.reloadUI();this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new u.Subscription;const{session:o,ui:c,connection:a}=this.subscribe();this._session=o,this.connection=a,this.ui=c,i&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}),(e=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with ".concat(e),sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,r){return this.sendRequest({method:m.Web3Method.signEthereumMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:m.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,g.hexStringFromBuffer)(e,!0),signature:(0,g.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:m.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:m.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,g.bigIntStringFromBN)(e.weiValue),data:(0,g.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,g.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,g.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,g.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,g.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:m.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,g.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:m.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,g.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,t){return this.sendRequest({method:m.Web3Method.generic,params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,g.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,r),null===t||void 0===t||t()};return{promise:new Promise(((i,s)=>{this.ui.isStandalone()||(t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(e=>{if(null===t||void 0===t||t(),e.errorMessage)return s(new Error(e.errorMessage));i(e)})),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)})),cancel:r}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChainSubject.next(e)}publishWeb3RequestEvent(e,t){var n;const r=(0,_.Web3RequestMessage)({id:e,request:t}),i=v.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(h.EVENTS.WEB3_REQUEST,{eventId:r.id,method:"relay::".concat(r.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?v.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:e=>{var t;null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:"relay::".concat(r.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?v.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:e.message}}))}}))}publishWeb3RequestCanceledEvent(e){const t=(0,w.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}publishEvent(e,t,n){const r=this.session.secret;return new u.Observable((e=>{b.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),r).then((t=>{e.next(t),e.complete()}))})).pipe((0,l.mergeMap)((t=>this.connection.publishEvent(e,t,n))))}handleIncomingEvent(e){try{this.subscriptions.add((0,u.from)(b.decrypt(e.data,this.session.secret)).pipe((0,l.map)((e=>JSON.parse(e)))).subscribe({next:e=>{const t=(0,S.isWeb3ResponseMessage)(e)?e:null;t&&this.handleWeb3ResponseMessage(t)},error:()=>{var e;null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(e){var t;const{response:n}=e;if(null===(t=this.diagnostic)||void 0===t||t.log(h.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:"relay::".concat(n.method),sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(n))return x.accountRequestCallbackIds.forEach((t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t})))),void x.accountRequestCallbackIds.clear();this.invokeCallback(e)}handleErrorResponse(e,t,n,r){var i;const s=null!==(i=null===n||void 0===n?void 0:n.message)&&void 0!==i?i:(0,p.standardErrorMessage)(r);this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:e,response:{method:t,errorMessage:s,errorCode:r}}))}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:m.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,g.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(t),this.handleErrorResponse(t,e.method,n)};return{promise:new Promise(((r,i)=>{var s;this.relayEventManager.callbacks.set(t,(e=>{if(this.ui.hideRequestEthereumAccounts(),e.errorMessage)return i(new Error(e.errorMessage));r(e)}));const o=(null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent)||null;if(o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)){let e;try{e=(0,g.isInIFrame)()&&window.top?window.top.location:window.location}catch(c){e=window.location}e.href="https://www.coinbase.com/connect-dapp?uri=".concat(encodeURIComponent(e.href))}else{if(this.ui.inlineAccountsResponse()){const e=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:t,response:(0,E.RequestEthereumAccountsResponse)(e)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:e})}else{const e=p.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(e)})}x.accountRequestCallbackIds.add(t),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(t,e)}})),cancel:n}}selectProvider(e){const t={method:m.Web3Method.selectProvider,params:{providerOptions:e}},n=(0,g.randomBytesHex)(8);return{cancel:e=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,e)},promise:new Promise(((t,r)=>{this.relayEventManager.callbacks.set(n,(e=>{if(e.errorMessage)return r(new Error(e.errorMessage));t(e)}));this.ui.selectProvider&&this.ui.selectProvider({onApprove:e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(e)}))},onCancel:e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n,response:(0,E.SelectProviderResponse)(f.ProviderType.Unselected)}))},providerOptions:e})}))}}watchAsset(e,t,n,r,i,s){const o={method:m.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:n,decimals:r,image:i},chainId:s}};let c=null;const a=(0,g.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,e),null===c||void 0===c||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{cancel:u,promise:new Promise(((u,l)=>{this.relayEventManager.callbacks.set(a,(e=>{if(null===c||void 0===c||c(),e.errorMessage)return l(new Error(e.errorMessage));u(e)}));const h=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:e,address:t,symbol:n,decimals:r,image:i,chainId:s}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)}))}}addEthereumChain(e,t,n,r,i,s){const o={method:m.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:s}};let c=null;const a=(0,g.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,e),null===c||void 0===c||c()};this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,n)=>{this.relayEventManager.callbacks.set(a,(e=>{if(null===c||void 0===c||c(),e.errorMessage)return n(new Error(e.errorMessage));t(e)}));const r=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:r,onApprove:i,chainId:o.params.chainId,rpcUrls:o.params.rpcUrls,blockExplorerUrls:o.params.blockExplorerUrls,chainName:o.params.chainName,iconUrls:o.params.iconUrls,nativeCurrency:o.params.nativeCurrency}),this.ui.inlineAddEthereumChain(e)||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)})),cancel:u}}switchEthereumChain(e,t){const n={method:m.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:t})},r=(0,g.randomBytesHex)(8);return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(0,E.isErrorResponse)(e)&&e.errorCode?i(p.standardErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)));this.ui.switchEthereumChain({onCancel:t=>{var n;if(t){const i=null!==(n=(0,p.getErrorCode)(t))&&void 0!==n?n:p.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(r,m.Web3Method.switchEthereumChain,t instanceof Error?t:p.standardErrors.provider.unsupportedChain(e),i)}else this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:n.params.chainId,address:n.params.address}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,n)})),cancel:e=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,n.method,e)}}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return v.Session.hash(this._session.id)}sendRequestStandalone(e,t){const n=n=>{this.handleErrorResponse(e,t.method,n)},r=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case m.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:r,onCancel:n});break;case m.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:r});break;default:n()}}onSessionConfigChanged(e){}}x.accountRequestCallbackIds=new Set,s([a.default],x.prototype,"resetAndReload",null),s([a.default],x.prototype,"handleIncomingEvent",null),t.WalletSDKRelay=x},731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0;const r=n(27312);t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion";t.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(e,t){if(!t)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(t,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((t=>{if(!t)throw r.standardErrors.rpc.parse({});const n=t,{error:i}=n;if(i)throw(0,r.serializeError)(i,e.method);return n}))}}},16642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayEventManager=void 0;const r=n(81107);t.WalletSDKRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,r.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},50194:(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={}))},90429:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;const r=n(94100);t.Web3RequestCanceledMessage=function(e){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},14107:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;const r=n(94100);t.Web3RequestMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},e)}},87734:(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;const r=n(50194);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}}},12202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;const r=n(94100);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}},71572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;const r=n(81107);t.encrypt=async function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),c=o.slice(o.byteLength-16),a=o.slice(0,o.byteLength-16),u=new Uint8Array(c),l=new Uint8Array(a),h=new Uint8Array([...n,...u,...l]);return(0,r.uint8ArrayToHex)(h)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new Promise(((n,i)=>{!async function(){const s=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,r.hexStringToUint8Array)(e),c=o.slice(0,12),a=o.slice(12,28),u=o.slice(28),l=new Uint8Array([...u,...a]),h={name:"AES-GCM",iv:new Uint8Array(c)};try{const e=await window.crypto.subtle.decrypt(h,s,l),t=new TextDecoder;n(t.decode(e))}catch(d){i(d)}}()}))}},99306:(e,t)=>{"use strict";function n(){return e=>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=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e,function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""}(t.ProviderType||(t.ProviderType={}))},81107: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.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;const i=r(n(64166)),s=n(74776),o=n(27312),c=n(99306),a=/^[0-9]*$/,u=/^[a-f0-9]*$/;function l(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function h(e){return e.startsWith("0x")||e.startsWith("0X")}function d(e){return h(e)?e.slice(2):e}function p(e){return h(e)?"0x"+e.slice(2):"0x"+e}function f(e){if("string"!==typeof e)return!1;const t=d(e).toLowerCase();return u.test(t)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){const n=d(e).toLowerCase();if(u.test(n))return(0,c.HexString)(t?"0x"+n:n)}throw o.standardErrors.rpc.invalidParams('"'.concat(String(e),'" is not a hexadecimal string'))}function b(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=g(e,!1);return n.length%2===1&&(n=(0,c.HexString)("0"+n)),t?(0,c.HexString)("0x"+n):n}function v(e){if("number"===typeof e&&Number.isInteger(e))return(0,c.IntNumber)(e);if("string"===typeof e){if(a.test(e))return(0,c.IntNumber)(Number(e));if(f(e))return(0,c.IntNumber)(new i.default(b(e,!1),16).toNumber())}throw o.standardErrors.rpc.invalidParams("Not an integer: ".concat(String(e)))}function y(e){if(null==e||"function"!==typeof e.constructor)return!1;const{constructor:t}=e;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return l(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=l,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},t.hexStringFromBuffer=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.toString("hex");return(0,c.HexString)(t?"0x"+n:n)},t.bigIntStringFromBN=function(e){return(0,c.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,c.IntNumber)(new i.default(b(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,c.HexString)("0x"+new i.default(e).toString(16))},t.has0xPrefix=h,t.strip0x=d,t.prepend0x=p,t.isHexString=f,t.ensureHexString=g,t.ensureEvenLengthHexString=b,t.ensureAddressString=function(e){if("string"===typeof e){const t=d(e).toLowerCase();if(f(t)&&40===t.length)return(0,c.AddressString)(p(t))}throw o.standardErrors.rpc.invalidParams("Invalid Ethereum address: ".concat(String(e)))},t.ensureBuffer=function(e){if(Buffer.isBuffer(e))return e;if("string"===typeof e){if(f(e)){const t=b(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw o.standardErrors.rpc.invalidParams("Not binary data: ".concat(String(e)))},t.ensureIntNumber=v,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,c.RegExpString)(e.toString());throw o.standardErrors.rpc.invalidParams("Not a RegExp: ".concat(String(e)))},t.ensureBN=function(e){if(null!==e&&(i.default.isBN(e)||y(e)))return new i.default(e.toString(10),10);if("number"===typeof e)return new i.default(v(e));if("string"===typeof e){if(a.test(e))return new i.default(e,10);if(f(e))return new i.default(b(e,!1),16)}throw o.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 o.standardErrors.rpc.invalidParams("Not a JSON string or an object: ".concat(String(e)))},t.isBigNumber=y,t.range=function(e,t){return Array.from({length:t-e},((t,n)=>e+n))},t.getFavicon=function(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:n}=document.location,r=e?e.getAttribute("href"):null;return!r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?t+r:"".concat(t,"//").concat(n).concat(r)},t.createQrUrl=function(e,t,n,r,i,o){const c=r?"parent-id":"id",a=(0,s.stringify)({[c]:e,secret:t,server:n,v:i,chainId:o});return"".concat(n,"/#/link?").concat(a)},t.isInIFrame=function(){try{return null!==window.frameElement}catch(e){return!1}}},65396:(e,t,n)=>{const r=n(55313),i=n(64166);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 o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function c(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function a(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function u(e){var t=typeof e;if("string"===t)return r.isHexString(e)?new i(r.stripHexPrefix(e),16):new i(e,10);if("number"===t)return new i(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e,t){var n,s,h,d;if("address"===e)return l("uint160",u(t));if("bool"===e)return l("uint8",t?1:0);if("string"===e)return l("bytes",new Buffer(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=a(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(l(e,t[d]));if("dynamic"===n){var p=l("uint256",t.length);h.unshift(p)}return Buffer.concat(h)}if("bytes"===e)return t=new Buffer(t),h=Buffer.concat([l("uint256",t.length),t]),t.length%32!==0&&(h=Buffer.concat([h,r.zeros(32-t.length%32)])),h;if(e.startsWith("bytes")){if((n=o(e))<1||n>32)throw new Error("Invalid bytes width: "+n);return r.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((s=u(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(Buffer,"be",32)}if(e.startsWith("int")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((s=u(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(Buffer,"be",32)}if(e.startsWith("ufixed")){if(n=c(e),(s=u(t))<0)throw new Error("Supplied ufixed is negative");return l("uint256",s.mul(new i(2).pow(new i(n[1]))))}if(e.startsWith("fixed"))return n=c(e),l("int256",u(t).mul(new i(2).pow(new i(n[1]))));throw new Error("Unsupported or invalid type: "+e)}function h(e){return"string"===e||"bytes"===e||"dynamic"===a(e)}function d(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n,i,c=[],a=0;a32)throw new Error("Invalid bytes width: "+n);c.push(r.setLengthRight(h,n))}else if(l.startsWith("uint")){if((n=o(l))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((i=u(h)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+i.bitLength());c.push(i.toArrayLike(Buffer,"be",n/8))}else{if(!l.startsWith("int"))throw new Error("Unsupported or invalid type: "+l);if((n=o(l))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((i=u(h)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+i.bitLength());c.push(i.toTwos(n).toArrayLike(Buffer,"be",n/8))}}return Buffer.concat(c)}e.exports={rawEncode:function(e,t){var n=[],r=[],i=32*e.length;for(var o in e){var c=s(e[o]),a=l(c,t[o]);h(c)?(n.push(l("uint256",i)),r.push(a),i+=a.length):n.push(a)}return Buffer.concat(n.concat(r))},solidityPack:d,soliditySHA3:function(e,t){return r.keccak(d(e,t))}}},36810:(e,t,n)=>{const r=n(55313),i=n(65396),s={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"]},o={encodeData(e,t,n){let s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=["bytes32"],c=[this.hashType(e,n)];if(s){const a=(e,t,o)=>{if(void 0!==n[t])return["bytes32",null==o?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(t,o,n,s))];if(void 0===o)throw new Error("missing value for field ".concat(e," of type ").concat(t));if("bytes"===t)return["bytes32",r.keccak(o)];if("string"===t)return"string"===typeof o&&(o=Buffer.from(o,"utf8")),["bytes32",r.keccak(o)];if(t.lastIndexOf("]")===t.length-1){const n=t.slice(0,t.lastIndexOf("[")),s=o.map((t=>a(e,n,t)));return["bytes32",r.keccak(i.rawEncode(s.map((e=>{let[t]=e;return t})),s.map((e=>{let[,t]=e;return t}))))]}return[t,o]};for(const r of n[e]){const[e,n]=a(r.name,r.type,t[r.name]);o.push(e),c.push(n)}}else for(const i of n[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)o.push("bytes32"),e=r.keccak(e),c.push(e);else if("string"===i.type)o.push("bytes32"),"string"===typeof e&&(e=Buffer.from(e,"utf8")),e=r.keccak(e),c.push(e);else if(void 0!==n[i.type])o.push("bytes32"),e=r.keccak(this.encodeData(i.type,e,n,s)),c.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");o.push(i.type),c.push(e)}}return i.rawEncode(o,c)},encodeType(e,t){let n="",r=this.findTypeDependencies(e,t).filter((t=>t!==e));r=[e].concat(r.sort());for(const i of r){if(!t[i])throw new Error("No type definition specified: "+i);n+=i+"("+t[i].map((e=>{let{name:t,type:n}=e;return n+" "+t})).join(",")+")"}return n},findTypeDependencies(e,t){let 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);for(const r of t[e])for(const e of this.findTypeDependencies(r.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(e,t,n,i))},hashType(e,t){return r.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in s.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.sanitizeData(e),i=[Buffer.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)),r.keccak(Buffer.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:o,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;const n=e.map((function(e){return"bytes"===e.type?r.toBuffer(e.value):e.value})),s=e.map((function(e){return e.type})),o=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),o),i.soliditySHA3(s,n)])}(e.data)},hashForSignTypedData_v3:function(e){return o.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return o.hash(e.data)}}},55313:(e,t,n)=>{const r=n(98094),i=n(64166);function s(e){return Buffer.allocUnsafe(e).fill(0)}function o(e,t,n){const r=s(t);return e=c(e),n?e.length{function t(e){this.mode=r.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t65536?(i[0]=240|(1835008&s)>>>18,i[1]=128|(258048&s)>>>12,i[2]=128|(4032&s)>>>6,i[3]=128|63&s):s>2048?(i[0]=224|(61440&s)>>>12,i[1]=128|(4032&s)>>>6,i[2]=128|63&s):s>128?(i[0]=192|(1984&s)>>>6,i[1]=128|63&s):i[0]=s,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 s=!e&&1==(r>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++){s=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var c=0;c<2;c++)if(null==this.modules[r][o-c]){var a=!1;s>>i&1)),b.getMask(t,r,o-c)&&(a=!a),this.modules[r][o-c]=a,-1==--i&&(s++,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=w.getRSBlocks(e,t),s=new _,o=0;o8*a)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*a+")");for(s.getLengthInBits()+4<=8*a&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*a)&&(s.put(n.PAD0,8),!(s.getLengthInBits()>=8*a));)s.put(n.PAD1,8);return n.createBytes(s,i)},n.createBytes=function(e,t){for(var n=0,r=0,i=0,s=new Array(t.length),o=new Array(t.length),c=0;c=0?d.get(p):0}}var f=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 u:return t%2==0;case l:return n%3==0;case h:return(t+n)%3==0;case d:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case f:return(t*n%2+t*n%3)%2==0;case g: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+s-5)}for(r=0;r=256;)e-=255;return v.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},y=0;y<8;y++)v.EXP_TABLE[y]=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 S(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,s=0,o=E.length;s<=o;s++){var c=E[s];if(!c)throw new Error("Content too long: expected "+i+" but got "+n);switch(t){case"L":i=c[0];break;case"M":i=c[1];break;case"Q":i=c[2];break;case"H":i=c[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),u=function(e){switch(e){case"L":return i;case"M":return s;case"Q":return o;case"H":return c;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new n(a,u),this.qrcode.addData(r),this.qrcode.make()}S.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?" ":"",s=r?"\r\n":"",o=t.width,c=t.height,a=n.length,u=o/(a+2*t.padding),l=c/(a+2*t.padding),h="undefined"!=typeof t.join&&!!t.join,d="undefined"!=typeof t.swap&&!!t.swap,p="undefined"==typeof t.xmlDeclaration||!!t.xmlDeclaration,f="undefined"!=typeof t.predefined&&!!t.predefined,g=f?i+''+s:"",b=i+''+s,v="",y="",m=0;m'+s:i+''+s}}h&&(v=i+'');let k="";if(void 0!==this.options.image&&this.options.image.svg){const e=o*this.options.image.width/100,t=c*this.options.image.height/100,n=c/2-t/2;k+='"}var I="";switch(e.container){case"svg":p&&(I+=''+s),I+='";break;case"svg-viewbox":p&&(I+=''+s),I+='";break;case"g":I+=''+s,I+=g+b+v,I+=k,I+="";break;default:I+=(g+b+v+k).replace(/^\s+/,"")}return I},e.exports=S},27865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="3.7.2"},4609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(68041);function i(e,t,n){try{Reflect.apply(e,t,n)}catch(r){setTimeout((()=>{throw r}))}}class s extends r.EventEmitter{emit(e){let t="error"===e;const n=this._events;if(void 0!==n)t=t&&void 0===n.error;else if(!t)return!1;for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o0&&([e]=s),e instanceof Error)throw e;const t=new Error("Unhandled error.".concat(e?" (".concat(e.message,")"):""));throw t.context=e,t}const c=n[e];if(void 0===c)return!1;if("function"===typeof c)i(c,this,s);else{const e=c.length,t=function(e){const t=e.length,n=new Array(t);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const r=n(99418);function i(e,t){return function(e){var t,n;return Boolean("string"===typeof(null===(n=null===(t=null===e||void 0===e?void 0:e.prototype)||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.name))}(e)?new e({message:t}):e({message:t})}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=s,t.assert=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assertion failed.";if(!e){if(t instanceof Error)throw t;throw i(arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,t)}},t.assertStruct=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s;try{(0,r.assert)(e,t)}catch(c){throw i(o,"".concat(n,": ").concat(function(e){const t=function(e){return"object"===typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(c),"."))}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},12802:(e,t,n)=>{"use strict";var r,i,s=n(59400).default;Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const o=n(99418),c=n(35517);t.base64=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,a;const u=null!==(n=t.paddingRequired)&&void 0!==n&&n,l=null!==(a=t.characterSet)&&void 0!==a?a:"base64";let h,d;return"base64"===l?h=String.raw(r||(r=s(["[A-Za-z0-9+/]"],["[A-Za-z0-9+\\/]"]))):((0,c.assert)("base64url"===l),h=String.raw(i||(i=s(["[-_A-Za-z0-9]"])))),d=u?new RegExp("^(?:".concat(h,"{4})*(?:").concat(h,"{3}=|").concat(h,"{2}==)?$"),"u"):new RegExp("^(?:".concat(h,"{4})*(?:").concat(h,"{2,3}|").concat(h,"{3}=|").concat(h,"{2}==)?$"),"u"),(0,o.pattern)(e,d)}},53310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const r=n(35517),i=n(26135),s=48,o=58,c=87;const a=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function u(e){return e instanceof Uint8Array}function l(e){(0,r.assert)(u(e),"Value must be a Uint8Array.")}function h(e){if(l(e),0===e.length)return"0x";const t=a(),n=new Array(e.length);for(let r=0;r=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function g(e){(0,r.assert)("number"===typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function b(e){return(0,r.assert)("string"===typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function v(e){if("bigint"===typeof e)return f(e);if("number"===typeof e)return g(e);if("string"===typeof e)return e.startsWith("0x")?p(e):b(e);if(u(e))return e;throw new TypeError('Unsupported value type: "'.concat(typeof e,'".'))}t.isBytes=u,t.assertIsBytes=l,t.bytesToHex=h,t.bytesToBigInt=d,t.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const n of e)t=(t<0,"Byte length must be greater than 0."),(0,r.assert)(function(e,t){(0,r.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const i=new Uint8Array(t);for(let r=0;r>=BigInt(8);return i.reverse()},t.numberToBytes=g,t.stringToBytes=b,t.valueToBytes=v,t.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const r=n(99418),i=n(12802);t.ChecksumStruct=(0,r.size)((0,i.base64)((0,r.string)(),{paddingRequired:!0}),44,44)},70854:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const r=n(99418),i=n(35517),s=n(53310),o=n(26135),c=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),o.StrictHexStruct]),a=(0,r.coerce)((0,r.number)(),c,Number),u=(0,r.coerce)((0,r.bigint)(),c,BigInt),l=((0,r.union)([o.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([o.StrictHexStruct]),s.hexToBytes)),h=(0,r.coerce)(o.StrictHexStruct,(0,r.instance)(Uint8Array),s.bytesToHex);t.createNumber=function(e){try{const t=(0,r.create)(e,a);return(0,i.assert)(Number.isFinite(t),'Expected a number-like value, got "'.concat(e,'".')),t}catch(t){if(t instanceof r.StructError)throw new Error('Expected a number-like value, got "'.concat(e,'".'));throw t}},t.createBigInt=function(e){try{return(0,r.create)(e,u)}catch(t){if(t instanceof r.StructError)throw new Error('Expected a number-like value, got "'.concat(String(t.value),'".'));throw t}},t.createBytes=function(e){if("string"===typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,l)}catch(t){if(t instanceof r.StructError)throw new Error('Expected a bytes-like value, got "'.concat(String(t.value),'".'));throw t}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"===typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,h)}catch(t){if(t instanceof r.StructError)throw new Error('Expected a bytes-like value, got "'.concat(String(t.value),'".'));throw t}}},72465:function(e,t){"use strict";var n,r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class o{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return s(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return s(this,n,"f")[Symbol.iterator]()}entries(){return s(this,n,"f").entries()}forEach(e,t){return s(this,n,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}get(e){return s(this,n,"f").get(e)}has(e){return s(this,n,"f").has(e)}keys(){return s(this,n,"f").keys()}values(){return s(this,n,"f").values()}toString(){return"FrozenMap(".concat(this.size,") {").concat(this.size>0?" ".concat([...this.entries()].map((e=>{let[t,n]=e;return"".concat(String(t)," => ").concat(String(n))})).join(", ")," "):"","}")}}t.FrozenMap=o;class c{constructor(e){r.set(this,void 0),i(this,r,new Set(e),"f"),Object.freeze(this)}get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}has(e){return s(this,r,"f").has(e)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return"FrozenSet(".concat(this.size,") {").concat(this.size>0?" ".concat([...this.values()].map((e=>String(e))).join(", ")," "):"","}")}}t.FrozenSet=c,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(c),Object.freeze(c.prototype)},26135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const r=n(99418),i=n(35517);function s(e){return(0,r.is)(e,t.HexStruct)}function o(e){return(0,r.is)(e,t.StrictHexStruct)}t.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=s,t.isStrictHexString=o,t.assertIsHexString=function(e){(0,i.assert)(s(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,i.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?"0x".concat(e.substring(2)):"0x".concat(e)},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},95533:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(35517),t),i(n(12802),t),i(n(53310),t),i(n(78531),t),i(n(70854),t),i(n(72465),t),i(n(26135),t),i(n(18420),t),i(n(88859),t),i(n(96013),t),i(n(3913),t),i(n(70304),t),i(n(57519),t),i(n(81482),t)},18420:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const r=n(99418),i=n(35517),s=n(96013);function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;return function e(t,r){if(void 0===t)return[!1,0];if(null===t)return[!0,r?0:s.JsonSize.Null];const i=typeof t;try{if("function"===i)return[!1,0];if("string"===i||t instanceof String)return[!0,r?0:(0,s.calculateStringSize)(t)+2*s.JsonSize.Quote];if("boolean"===i||t instanceof Boolean)return r?[!0,0]:[!0,1==t?s.JsonSize.True:s.JsonSize.False];if("number"===i||t instanceof Number)return r?[!0,0]:[!0,(0,s.calculateNumberSize)(t)];if(t instanceof Date)return r?[!0,0]:[!0,isNaN(t.getDate())?s.JsonSize.Null:s.JsonSize.Date+2*s.JsonSize.Quote]}catch(o){return[!1,0]}if(!(0,s.isPlainObject)(t)&&!Array.isArray(t))return[!1,0];if(n.has(t))return[!1,0];n.add(t);try{return[!0,Object.entries(t).reduce(((i,o,c,a)=>{let[u,l]=o,[h,d]=e(l,r);if(!h)throw new Error("JSON validation did not pass. Validation process stopped.");if(n.delete(t),r)return 0;return i+(Array.isArray(t)?0:u.length+s.JsonSize.Comma+2*s.JsonSize.Colon)+d+(c{const[t]=o(e,!0);return!!t||"Expected a valid JSON-serializable value"})),t.isValidJson=function(e){return(0,r.is)(e,t.JsonStruct)},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,r.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),t.JsonRpcErrorStruct=(0,r.object)({code:(0,r.integer)(),message:(0,r.string)(),data:(0,r.optional)(t.JsonStruct),stack:(0,r.optional)((0,r.string)())}),t.JsonRpcParamsStruct=(0,r.optional)((0,r.union)([(0,r.record)((0,r.string)(),t.JsonStruct),(0,r.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,r.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,r.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,r.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,r.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,n){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",n)},t.isJsonRpcRequest=function(e){return(0,r.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,n){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",n)},t.PendingJsonRpcResponseStruct=(0,r.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,r.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,r.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,r.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,n){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",n)},t.isJsonRpcResponse=function(e){return(0,r.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,n){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",n)},t.isJsonRpcSuccess=function(e){return(0,r.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,n){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",n)},t.isJsonRpcFailure=function(e){return(0,r.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,n){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",n)},t.isJsonRpcError=function(e){return(0,r.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,n){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",n)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"===typeof e&&(n||Number.isInteger(e))||"string"===typeof e&&(t||e.length>0)||r&&null===e)},t.validateJsonAndGetSize=o},88859: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.createModuleLogger=t.createProjectLogger=void 0;const i=(0,r(n(44054)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},96013:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null===e||void 0===e},t.isObject=function(e){return Boolean(e)&&"object"===typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!==typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(t){return!1}},t.isASCII=n,t.calculateStringSize=function(e){var r;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(r=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==r?r:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},3913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const r=n(35517),i=n(26135);t.numberToHex=e=>((0,r.assert)("number"===typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));t.bigIntToHex=e=>((0,r.assert)("bigint"===typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));t.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},70304:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},57519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error('"'.concat(t,'" must be a non-negative integer. Received: "').concat(e,'".'))};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},81482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const r=n(26931),i=n(99418),s=n(35517);t.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,r.valid)(e)||'Expected SemVer version, got "'.concat(e,'"'))),t.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,r.validRange)(e)||'Expected SemVer range, got "'.concat(e,'"'))),t.isValidSemVerVersion=function(e){return(0,i.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,i.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,r.gt)(e,t)},t.gtRange=function(e,t){return(0,r.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,r.satisfies)(e,t,{includePrerelease:!0})}},49213:(e,t,n)=>{"use strict";const r=n(4320),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),c=Symbol("allowStale"),a=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1;const g=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(b(e,t)){if(y(e,r),!e[c])return}else n&&(e[p]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return t.value}},b=(e,t)=>{if(!t||!t.maxAge&&!e[a])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[a]&&n>e[a]},v=e=>{if(e[s]>e[i])for(let t=e[h].tail;e[s]>e[i]&&null!==t;){const n=t.prev;y(e,t),t=n}},y=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[s]-=n.length,e[d].delete(n.key),e[h].removeNode(t)}};class m{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const w=(e,t,n,r)=>{let i=n.value;b(e,i)&&(y(e,n),e[c]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"===typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!==typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[o]="function"!==typeof t?f:t,this[c]=e.stale||!1,e.maxAge&&"number"!==typeof e.maxAge)throw new TypeError("maxAge must be a number");this[a]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!==typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[c]=!!e}get allowStale(){return this[c]}set maxAge(e){if("number"!==typeof e)throw new TypeError("maxAge must be a non-negative number");this[a]=e,v(this)}get maxAge(){return this[a]}set lengthCalculator(e){"function"!==typeof e&&(e=f),e!==this[o]&&(this[o]=e,this[s]=0,this[h].forEach((e=>{e.length=this[o](e.value,e.key),this[s]+=e.length}))),v(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let n=this[h].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[h].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[u]&&this[h]&&this[h].length&&this[h].forEach((e=>this[u](e.key,e.value))),this[d]=new Map,this[h]=new r,this[s]=0}dump(){return this[h].map((e=>!b(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,n){if((n=n||this[a])&&"number"!==typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,c=this[o](t,e);if(this[d].has(e)){if(c>this[i])return y(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[u]&&(this[l]||this[u](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=c-o.length,o.length=c,this.get(e),v(this),!0}const p=new m(e,t,c,r,n);return p.length>this[i]?(this[u]&&this[u](e,t),!1):(this[s]+=p.length,this[h].unshift(p),this[d].set(e,this[h].head),v(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!b(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[h].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>g(this,t,!1)))}}},76756:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=s(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[c.COMPARATORLOOSE]:o[c.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"===typeof e)try{e=new l(e,this.options)}catch(t){return!1}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new h(e.value,t).test(this.value):""===e.operator?""===e.value||new h(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(a(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(a(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=i;const s=n(45505),{safeRe:o,t:c}=n(60997),a=n(24671),u=n(91050),l=n(95210),h=n(84999)},84999:(e,t,n)=>{class r{constructor(e,t){if(t=s(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!b(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&v(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&g))+":"+e,n=i.get(t);if(n)return n;const r=this.options.loose,s=r?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(s,N(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],h),c("comparator trim",e),e=e.replace(u[l.TILDETRIM],d),c("tilde trim",e),e=e.replace(u[l.CARETTRIM],p),c("caret trim",e);let a=e.split(" ").map((e=>m(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options)));r&&(a=a.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),c("range list",a);const v=new Map,y=a.map((e=>new o(e,this.options)));for(const i of y){if(b(i))return[i];v.set(i.value,i)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return i.set(t,w),w}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>y(n,t)&&e.set.some((e=>y(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"===typeof e)try{e=new a(e,this.options)}catch(t){return!1}for(let n=0;n"<0.0.0-0"===e.value,v=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},m=(e,t)=>(c("comp",e,t),e=S(e,t),c("caret",e),e=_(e,t),c("tildes",e),e=C(e,t),c("xrange",e),e=I(e,t),c("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,((t,n,r,i,s)=>{let o;return c("tilde",e,t,n,r,i,s),w(n)?o="":w(r)?o=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):w(i)?o=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):s?(c("replaceTilde pr",s),o=">=".concat(n,".").concat(r,".").concat(i,"-").concat(s," <").concat(n,".").concat(+r+1,".0-0")):o=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),c("tilde return",o),o}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{c("caret",e,t);const n=t.loose?u[l.CARETLOOSE]:u[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,s,o)=>{let a;return c("caret",e,t,n,i,s,o),w(n)?a="":w(i)?a=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):w(s)?a="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):o?(c("replaceCaret pr",o),a="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(+n+1,".0.0-0")):(c("no pr"),a="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s," <").concat(+n+1,".0.0-0")),c("caret return",a),a}))},C=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,((n,r,i,s,o,a)=>{c("xRange",e,n,r,i,s,o,a);const u=w(i),l=u||w(s),h=l||w(o),d=h;return"="===r&&d&&(r=""),a=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(s=0),o=0,">"===r?(r=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),"<"===r&&(a="-0"),n="".concat(r+i,".").concat(s,".").concat(o).concat(a)):l?n=">=".concat(i,".0.0").concat(a," <").concat(+i+1,".0.0-0"):h&&(n=">=".concat(i,".").concat(s,".0").concat(a," <").concat(i,".").concat(+s+1,".0-0")),c("xRange return",n),n}))},I=(e,t)=>(c("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),M=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),N=e=>(t,n,r,i,s,o,c,a,u,l,h,d,p)=>(n=w(r)?"":w(i)?">=".concat(r,".0.0").concat(e?"-0":""):w(s)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):o?">=".concat(n):">=".concat(n).concat(e?"-0":""),a=w(u)?"":w(l)?"<".concat(+u+1,".0.0-0"):w(h)?"<".concat(u,".").concat(+l+1,".0-0"):d?"<=".concat(u,".").concat(l,".").concat(h,"-").concat(d):e?"<".concat(u,".").concat(l,".").concat(+h+1,"-0"):"<=".concat(a),"".concat(n," ").concat(a).trim()),R=(e,t,n)=>{for(let r=0;r0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},95210:(e,t,n)=>{const r=n(91050),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=n(12319),{safeRe:o,t:c}=n(60997),a=n(45505),{compareIdentifiers:u}=n(72982);class l{constructor(e,t){if(t=a(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!==typeof e)throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof e,'".'));if(e.length>i)throw new TypeError("version is longer than ".concat(i," characters"));r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?o[c.LOOSE]:o[c.FULL]);if(!n)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"===typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error("invalid increment argument: ".concat(e))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}e.exports=l},51976:(e,t,n)=>{const r=n(84342);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},24671:(e,t,n)=>{const r=n(90416),i=n(33962),s=n(18930),o=n(50316),c=n(93991),a=n(94838);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"===typeof e&&(e=e.version),"object"===typeof n&&(n=n.version),e===n;case"!==":return"object"===typeof e&&(e=e.version),"object"===typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return s(e,n,u);case">=":return o(e,n,u);case"<":return c(e,n,u);case"<=":return a(e,n,u);default:throw new TypeError("Invalid operator: ".concat(t))}}},47021:(e,t,n)=>{const r=n(95210),i=n(84342),{safeRe:s,t:o}=n(60997);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"===typeof e&&(e=String(e)),"string"!==typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=s[o.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else n=e.match(s[o.COERCE]);return null===n?null:i("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},24046:(e,t,n)=>{const r=n(95210);e.exports=(e,t,n)=>{const i=new r(e,n),s=new r(t,n);return i.compare(s)||i.compareBuild(s)}},76858:(e,t,n)=>{const r=n(34324);e.exports=(e,t)=>r(e,t,!0)},34324:(e,t,n)=>{const r=n(95210);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},82190:(e,t,n)=>{const r=n(84342);e.exports=(e,t)=>{const n=r(e,null,!0),i=r(t,null,!0),s=n.compare(i);if(0===s)return null;const o=s>0,c=o?n:i,a=o?i:n,u=!!c.prerelease.length;if(!!a.prerelease.length&&!u)return a.patch||a.minor?c.patch?"patch":c.minor?"minor":"major":"major";const l=u?"pre":"";return n.major!==i.major?l+"major":n.minor!==i.minor?l+"minor":n.patch!==i.patch?l+"patch":"prerelease"}},90416:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>0===r(e,t,n)},18930:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>r(e,t,n)>0},50316:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>r(e,t,n)>=0},75950:(e,t,n)=>{const r=n(95210);e.exports=(e,t,n,i,s)=>{"string"===typeof n&&(s=i,i=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,i,s).version}catch(o){return null}}},93991:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>r(e,t,n)<0},94838:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>r(e,t,n)<=0},99881:(e,t,n)=>{const r=n(95210);e.exports=(e,t)=>new r(e,t).major},36925:(e,t,n)=>{const r=n(95210);e.exports=(e,t)=>new r(e,t).minor},33962:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>0!==r(e,t,n)},84342:(e,t,n)=>{const r=n(95210);e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e instanceof r)return e;try{return new r(e,t)}catch(i){if(!n)return null;throw i}}},99149:(e,t,n)=>{const r=n(95210);e.exports=(e,t)=>new r(e,t).patch},36090:(e,t,n)=>{const r=n(84342);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},35008:(e,t,n)=>{const r=n(34324);e.exports=(e,t,n)=>r(t,e,n)},13536:(e,t,n)=>{const r=n(24046);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},25656:(e,t,n)=>{const r=n(84999);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(i){return!1}return t.test(e)}},9210:(e,t,n)=>{const r=n(24046);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},16038:(e,t,n)=>{const r=n(84342);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},26931:(e,t,n)=>{const r=n(60997),i=n(12319),s=n(95210),o=n(72982),c=n(84342),a=n(16038),u=n(51976),l=n(75950),h=n(82190),d=n(99881),p=n(36925),f=n(99149),g=n(36090),b=n(34324),v=n(35008),y=n(76858),m=n(24046),w=n(9210),_=n(13536),E=n(18930),S=n(93991),x=n(90416),C=n(33962),k=n(50316),I=n(94838),M=n(24671),N=n(47021),R=n(76756),A=n(84999),T=n(25656),L=n(32212),O=n(46395),P=n(80213),j=n(34869),D=n(40857),B=n(65704),F=n(7566),V=n(52928),H=n(22480),z=n(50772),U=n(99180);e.exports={parse:c,valid:a,clean:u,inc:l,diff:h,major:d,minor:p,patch:f,prerelease:g,compare:b,rcompare:v,compareLoose:y,compareBuild:m,sort:w,rsort:_,gt:E,lt:S,eq:x,neq:C,gte:k,lte:I,cmp:M,coerce:N,Comparator:R,Range:A,satisfies:T,toComparators:L,maxSatisfying:O,minSatisfying:P,minVersion:j,validRange:D,outside:B,gtr:F,ltr:V,intersects:H,simplifyRange:z,subset:U,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},12319:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},91050:e=>{const t="object"===typeof process&&{NODE_ENV:"production",PUBLIC_URL:"https://poocoin.app",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CHAIN_ID:"56",REACT_APP_NODE_1:"https://bsc-dataseed.binance.org",REACT_APP_NODE_2:"https://bsc-dataseed1.defibit.io",REACT_APP_NODE_3:"https://bsc-dataseed1.ninicoin.io",REACT_APP_SERVER_2_URL:"https://api3.poocoin.app",REACT_APP_WALLET_CONNECT_PROJECT_ID:"f39fc63c4014dba05cd85d8ea3378bf4"}.NODE_DEBUG&&/\bsemver\b/i.test({NODE_ENV:"production",PUBLIC_URL:"https://poocoin.app",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CHAIN_ID:"56",REACT_APP_NODE_1:"https://bsc-dataseed.binance.org",REACT_APP_NODE_2:"https://bsc-dataseed1.defibit.io",REACT_APP_NODE_3:"https://bsc-dataseed1.ninicoin.io",REACT_APP_SERVER_2_URL:"https://api3.poocoin.app",REACT_APP_WALLET_CONNECT_PROJECT_ID:"f39fc63c4014dba05cd85d8ea3378bf4"}.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n{};e.exports=t},72982:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:en(t,e)}},45505:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!==typeof e?t:e:n},60997:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=n(12319),o=n(91050),c=(t=e.exports={}).re=[],a=t.safeRe=[],u=t.src=[],l=t.t={};let h=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",s],[d,i]],f=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split("".concat(t,"*")).join("".concat(t,"{0,").concat(n,"}")).split("".concat(t,"+")).join("".concat(t,"{1,").concat(n,"}"));return e})(t),i=h++;o(e,i,t),l[e]=i,u[i]=t,c[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-]".concat(d,"*")),f("MAINVERSION","(".concat(u[l.NUMERICIDENTIFIER],")\\.")+"(".concat(u[l.NUMERICIDENTIFIER],")\\.")+"(".concat(u[l.NUMERICIDENTIFIER],")")),f("MAINVERSIONLOOSE","(".concat(u[l.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(u[l.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(u[l.NUMERICIDENTIFIERLOOSE],")")),f("PRERELEASEIDENTIFIER","(?:".concat(u[l.NUMERICIDENTIFIER],"|").concat(u[l.NONNUMERICIDENTIFIER],")")),f("PRERELEASEIDENTIFIERLOOSE","(?:".concat(u[l.NUMERICIDENTIFIERLOOSE],"|").concat(u[l.NONNUMERICIDENTIFIER],")")),f("PRERELEASE","(?:-(".concat(u[l.PRERELEASEIDENTIFIER],"(?:\\.").concat(u[l.PRERELEASEIDENTIFIER],")*))")),f("PRERELEASELOOSE","(?:-?(".concat(u[l.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(u[l.PRERELEASEIDENTIFIERLOOSE],")*))")),f("BUILDIDENTIFIER","".concat(d,"+")),f("BUILD","(?:\\+(".concat(u[l.BUILDIDENTIFIER],"(?:\\.").concat(u[l.BUILDIDENTIFIER],")*))")),f("FULLPLAIN","v?".concat(u[l.MAINVERSION]).concat(u[l.PRERELEASE],"?").concat(u[l.BUILD],"?")),f("FULL","^".concat(u[l.FULLPLAIN],"$")),f("LOOSEPLAIN","[v=\\s]*".concat(u[l.MAINVERSIONLOOSE]).concat(u[l.PRERELEASELOOSE],"?").concat(u[l.BUILD],"?")),f("LOOSE","^".concat(u[l.LOOSEPLAIN],"$")),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE","".concat(u[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),f("XRANGEIDENTIFIER","".concat(u[l.NUMERICIDENTIFIER],"|x|X|\\*")),f("XRANGEPLAIN","[v=\\s]*(".concat(u[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(u[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(u[l.XRANGEIDENTIFIER],")")+"(?:".concat(u[l.PRERELEASE],")?").concat(u[l.BUILD],"?")+")?)?"),f("XRANGEPLAINLOOSE","[v=\\s]*(".concat(u[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(u[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(u[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(u[l.PRERELEASELOOSE],")?").concat(u[l.BUILD],"?")+")?)?"),f("XRANGE","^".concat(u[l.GTLT],"\\s*").concat(u[l.XRANGEPLAIN],"$")),f("XRANGELOOSE","^".concat(u[l.GTLT],"\\s*").concat(u[l.XRANGEPLAINLOOSE],"$")),f("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(r,"})")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:$|[^\\d])"),f("COERCERTL",u[l.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM","(\\s*)".concat(u[l.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",f("TILDE","^".concat(u[l.LONETILDE]).concat(u[l.XRANGEPLAIN],"$")),f("TILDELOOSE","^".concat(u[l.LONETILDE]).concat(u[l.XRANGEPLAINLOOSE],"$")),f("LONECARET","(?:\\^)"),f("CARETTRIM","(\\s*)".concat(u[l.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",f("CARET","^".concat(u[l.LONECARET]).concat(u[l.XRANGEPLAIN],"$")),f("CARETLOOSE","^".concat(u[l.LONECARET]).concat(u[l.XRANGEPLAINLOOSE],"$")),f("COMPARATORLOOSE","^".concat(u[l.GTLT],"\\s*(").concat(u[l.LOOSEPLAIN],")$|^$")),f("COMPARATOR","^".concat(u[l.GTLT],"\\s*(").concat(u[l.FULLPLAIN],")$|^$")),f("COMPARATORTRIM","(\\s*)".concat(u[l.GTLT],"\\s*(").concat(u[l.LOOSEPLAIN],"|").concat(u[l.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE","^\\s*(".concat(u[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(u[l.XRANGEPLAIN],")")+"\\s*$"),f("HYPHENRANGELOOSE","^\\s*(".concat(u[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(u[l.XRANGEPLAINLOOSE],")")+"\\s*$"),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7566:(e,t,n)=>{const r=n(65704);e.exports=(e,t,n)=>r(e,t,">",n)},22480:(e,t,n)=>{const r=n(84999);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},52928:(e,t,n)=>{const r=n(65704);e.exports=(e,t,n)=>r(e,t,"<",n)},46395:(e,t,n)=>{const r=n(95210),i=n(84999);e.exports=(e,t,n)=>{let s=null,o=null,c=null;try{c=new i(t,n)}catch(a){return null}return e.forEach((e=>{c.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new r(s,n)))})),s}},80213:(e,t,n)=>{const r=n(95210),i=n(84999);e.exports=(e,t,n)=>{let s=null,o=null,c=null;try{c=new i(t,n)}catch(a){return null}return e.forEach((e=>{c.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new r(s,n)))})),s}},34869:(e,t,n)=>{const r=n(95210),i=n(84999),s=n(18930);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let i=0;i{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}})),!o||n&&!s(n,o)||(n=o)}return n&&e.test(n)?n:null}},65704:(e,t,n)=>{const r=n(95210),i=n(76756),{ANY:s}=i,o=n(84999),c=n(25656),a=n(18930),u=n(93991),l=n(94838),h=n(50316);e.exports=(e,t,n,d)=>{let p,f,g,b,v;switch(e=new r(e,d),t=new o(t,d),n){case">":p=a,f=l,g=u,b=">",v=">=";break;case"<":p=u,f=h,g=a,b="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(e,t,d))return!1;for(let r=0;r{e.semver===s&&(e=new i(">=0.0.0")),o=o||e,c=c||e,p(e.semver,o.semver,d)?o=e:g(e.semver,c.semver,d)&&(c=e)})),o.operator===b||o.operator===v)return!1;if((!c.operator||c.operator===b)&&f(e,c.semver))return!1;if(c.operator===v&&g(e,c.semver))return!1}return!0}},50772:(e,t,n)=>{const r=n(25656),i=n(34324);e.exports=(e,t,n)=>{const s=[];let o=null,c=null;const a=e.sort(((e,t)=>i(e,t,n)));for(const i of a){r(i,t,n)?(c=i,o||(o=i)):(c&&s.push([o,c]),c=null,o=null)}o&&s.push([o,null]);const u=[];for(const[r,i]of s)r===i?u.push(r):i||r!==a[0]?i?r===a[0]?u.push("<=".concat(i)):u.push("".concat(r," - ").concat(i)):u.push(">=".concat(r)):u.push("*");const l=u.join(" || "),h="string"===typeof t.raw?t.raw:String(t);return l.length{const r=n(84999),i=n(76756),{ANY:s}=i,o=n(25656),c=n(34324),a=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=n.includePrerelease?a:u}if(1===t.length&&t[0].semver===s){if(n.includePrerelease)return!0;t=u}const r=new Set;let i,l,p,f,g,b,v;for(const s of e)">"===s.operator||">="===s.operator?i=h(i,s,n):"<"===s.operator||"<="===s.operator?l=d(l,s,n):r.add(s.semver);if(r.size>1)return null;if(i&&l){if(p=c(i.semver,l.semver,n),p>0)return null;if(0===p&&(">="!==i.operator||"<="!==l.operator))return null}for(const s of r){if(i&&!o(s,String(i),n))return null;if(l&&!o(s,String(l),n))return null;for(const e of t)if(!o(s,String(e),n))return!1;return!0}let y=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;y&&1===y.prerelease.length&&"<"===l.operator&&0===y.prerelease[0]&&(y=!1);for(const s of t){if(v=v||">"===s.operator||">="===s.operator,b=b||"<"===s.operator||"<="===s.operator,i)if(m&&s.semver.prerelease&&s.semver.prerelease.length&&s.semver.major===m.major&&s.semver.minor===m.minor&&s.semver.patch===m.patch&&(m=!1),">"===s.operator||">="===s.operator){if(f=h(i,s,n),f===s&&f!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(s),n))return!1;if(l)if(y&&s.semver.prerelease&&s.semver.prerelease.length&&s.semver.major===y.major&&s.semver.minor===y.minor&&s.semver.patch===y.patch&&(y=!1),"<"===s.operator||"<="===s.operator){if(g=d(l,s,n),g===s&&g!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(s),n))return!1;if(!s.operator&&(l||i)&&0!==p)return!1}return!(i&&b&&!l&&0!==p)&&(!(l&&v&&!i&&0!==p)&&(!m&&!y))},h=(e,t,n)=>{if(!e)return t;const r=c(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=c(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},32212:(e,t,n)=>{const r=n(84999);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},40857:(e,t,n)=>{const r=n(84999);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(n){return null}}},32869:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4320:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"===typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&ithis.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)n.push(s.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95330),i=n(75884),s=function(){function e(){this._semaphore=new i.default(1)}return e.prototype.acquire=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=t.sent(),[2,e[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();t.default=s},75884:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95330),i=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),n},e.prototype.runExclusive=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this.acquire()];case 1:t=r.sent(),n=t[0],i=t[1],r.label=2;case 2:return r.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,r.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}();t.default=i},50224:(e,t,n)=>{"use strict";t.WU=void 0;var r=n(44246);Object.defineProperty(t,"WU",{enumerable:!0,get:function(){return r.default}});var i=n(75884);var s=n(73398)},73398:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=void 0;var r=n(95330);t.withTimeout=function(e,t,n){var i=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(s,o){return r.__awaiter(i,void 0,void 0,(function(){var i,c;return r.__generator(this,(function(r){switch(r.label){case 0:return i=!1,setTimeout((function(){i=!0,o(n)}),t),[4,e.acquire()];case 1:return c=r.sent(),i?(Array.isArray(c)?c[1]:c)():s(c),[2]}}))}))}))},runExclusive:function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:t=function(){},r.label=1;case 1:return r.trys.push([1,,7,8]),[4,this.acquire()];case 2:return n=r.sent(),Array.isArray(n)?(t=n[1],[4,e(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return t=n,[4,e()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}},45590:(e,t)=>{"use strict";var n;function r(e,t,r){if(!r||typeof r.value!==n.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+t+"> is not a method!");return{configurable:n.boolTrue,get:function(){var e=r.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:n.boolTrue,writable:n.boolTrue}),e}}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.typeOfFunction="function",e.boolTrue=!0}(n||(n={})),t.bind=r,t.default=r},44054:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!==typeof process&&"env"in process&&(e={NODE_ENV:"production",PUBLIC_URL:"https://poocoin.app",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CHAIN_ID:"56",REACT_APP_NODE_1:"https://bsc-dataseed.binance.org",REACT_APP_NODE_2:"https://bsc-dataseed1.defibit.io",REACT_APP_NODE_3:"https://bsc-dataseed1.ninicoin.io",REACT_APP_SERVER_2_URL:"https://api3.poocoin.app",REACT_APP_WALLET_CONNECT_PROJECT_ID:"f39fc63c4014dba05cd85d8ea3378bf4"}.DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(87175)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},87175:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,s,o=null;function c(){for(var e=arguments.length,r=new Array(e),i=0;i{if("%%"===e)return"%";u++;const i=t.formatters[n];if("function"===typeof i){const t=r[u];e=i.call(s,t),r.splice(u,1),u--}return e})),t.formatArgs.call(s,r);(s.log||t.log).apply(s,r)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"===typeof t.init&&t.init(c),c}function r(e,n){const r=t(this.namespace+("undefined"===typeof n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"===typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;te+t,o=["sync","latest"];class c extends i.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||2e4,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){if(this._currentBlock)return this._currentBlock;return await new Promise((e=>this.once("latest",e)))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){o.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return o.map((e=>this.listenerCount(e))).reduce(s)}_newPotentialLatest(e){const t=this._currentBlock;t&&a(e)<=a(t)||this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}function a(e){return Number.parseInt(e,16)}t.BaseBlockTracker=c},82956: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.PollingBlockTracker=void 0;const i=r(n(39702)),s=r(n(7301)),o=n(27753),c=n(41098),a=(0,c.createModuleLogger)(c.projectLogger,"polling-block-tracker"),u=(0,i.default)();class l extends o.BaseBlockTracker{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:null!==(t=e.blockResetDuration)&&void 0!==t?t:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||2e4,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=void 0===e.keepEventLoopActive||e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const e=h(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await e}catch(t){const r=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(null!==(e=t.stack)&&void 0!==e?e:t));try{this.emit("error",r)}catch(n){console.error(r)}const i=h(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:u(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),a("Making request",e);const t=await(0,s.default)((t=>this._provider.sendAsync(e,t)))();if(a("Got response",t),t.error)throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(t.error.message));return t.result}}function h(e,t){return new Promise((n=>{const r=setTimeout(n,e);r.unref&&t&&r.unref()}))}t.PollingBlockTracker=l},33996: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.SubscribeBlockTracker=void 0;const i=r(n(39702)),s=n(27753),o=(0,i.default)();class c extends s.BaseBlockTracker{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(void 0===this._subscriptionId||null===this._subscriptionId)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(null!==this._subscriptionId&&void 0!==this._subscriptionId)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{this._provider.sendAsync({id:o(),method:e,params:n,jsonrpc:"2.0"},((e,n)=>{e?r(e):t(n.result)}))}))}_handleSubData(e,t){var n;"eth_subscription"===t.method&&(null===(n=t.params)||void 0===n?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(t.params.result.number)}}t.SubscribeBlockTracker=c},28371:function(e,t,n){"use strict";var r=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]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(82956),t),i(n(33996),t),i(n(86260),t)},41098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const r=n(95533);Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),t.projectLogger=(0,r.createProjectLogger)("eth-block-tracker")},86260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24424:(e,t,n)=>{const r=n(61282);e.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}}},61282:(e,t,n)=>{const r=n(4609).default;e.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach((e=>this.emit("update",e)))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}},44030:(e,t,n)=>{const r=n(61282),i=n(91611),{incrementHexInt:s}=n(15261);e.exports=class extends r{constructor(e){let{provider:t,params:n}=e;super(),this.type="block",this.provider=t}async update(e){let{oldBlock:t,newBlock:n}=e;const r=n,o=s(t),c=(await i({provider:this.provider,fromBlock:o,toBlock:r})).map((e=>e.hash));this.addResults(c)}}},91611:e=>{function t(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function n(e){if(void 0===e||null===e)return e;return"0x"+e.toString(16)}function r(e,t){return new Promise(((n,r)=>{e.sendAsync(t,((e,t)=>{e?r(e):t.error?r(t.error):t.result?n(t.result):r(new Error("Result was empty"))}))}))}e.exports=async function(e){let{provider:i,fromBlock:s,toBlock:o}=e;s||(s=o);const c=t(s),a=t(o),u=Array(a-c+1).fill().map(((e,t)=>c+t)).map(n);return await Promise.all(u.map((e=>async function(e,t,n){for(let s=0;s<3;s++)try{return await r(e,{id:1,jsonrpc:"2.0",method:t,params:n})}catch(i){console.error("provider.sendAsync failed: ".concat(i.stack||i.message||i))}throw new Error("Block not found for params: ".concat(JSON.stringify(n)))}(i,"eth_getBlockByNumber",[e,!1]))))}},15261:e=>{function t(e){return e.sort(((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:n(e)-n(t)))}function n(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function r(e){if(void 0===e||null===e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function i(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(){for(var e=arguments.length,n=new Array(e),r=0;r{const r=n(50224).WU,{createAsyncMiddleware:i,createScaffoldMiddleware:s}=n(79223),o=n(61409),c=n(44030),a=n(45431),{intToHex:u,hexToInt:l}=n(15261);function h(e){return d((async function(){const t=await e(...arguments);return u(t.id)}))}function d(e){return i((async(t,n)=>{const r=await e.apply(null,t.params);n.result=r}))}function p(e,t){const n=[];for(let r in e)n.push(e[r]);return n}e.exports=function(e){let{blockTracker:t,provider:n}=e,i=0,f={};const g=new r,b=function(e){let{mutex:t}=e;return e=>async(n,r,i,s)=>{(await t.acquire())(),e(n,r,i,s)}}({mutex:g}),v=s({eth_newFilter:b(h(m)),eth_newBlockFilter:b(h(w)),eth_newPendingTransactionFilter:b(h(_)),eth_uninstallFilter:b(d(x)),eth_getFilterChanges:b(d(E)),eth_getFilterLogs:b(d(S))}),y=async e=>{let{oldBlock:t,newBlock:n}=e;if(0===f.length)return;const r=await g.acquire();try{await Promise.all(p(f).map((async e=>{try{await e.update({oldBlock:t,newBlock:n})}catch(r){console.error(r)}})))}catch(i){console.error(i)}r()};return v.newLogFilter=m,v.newBlockFilter=w,v.newPendingTransactionFilter=_,v.uninstallFilter=x,v.getFilterChanges=E,v.getFilterLogs=S,v.destroy=()=>{!async function(){const e=p(f).length;f={},k({prevFilterCount:e,newFilterCount:0})}()},v;async function m(e){const t=new o({provider:n,params:e});await C(t);return t}async function w(){const e=new c({provider:n});await C(e);return e}async function _(){const e=new a({provider:n});await C(e);return e}async function E(e){const t=l(e),n=f[t];if(!n)throw new Error('No filter for index "'.concat(t,'"'));return n.getChangesAndClear()}async function S(e){const t=l(e),n=f[t];if(!n)throw new Error('No filter for index "'.concat(t,'"'));let r=[];return"log"===n.type&&(r=n.getAllResults()),r}async function x(e){const t=l(e),n=f[t],r=Boolean(n);return r&&await async function(e){const t=p(f).length;delete f[e];const n=p(f).length;k({prevFilterCount:t,newFilterCount:n})}(t),r}async function C(e){const n=p(f).length,r=await t.getLatestBlock();await e.initialize({currentBlock:r}),i++,f[i]=e,e.id=i,e.idHex=u(i);return k({prevFilterCount:n,newFilterCount:p(f).length}),i}function k(e){let{prevFilterCount:n,newFilterCount:r}=e;0===n&&r>0?t.on("sync",y):n>0&&0===r&&t.removeListener("sync",y)}}},61409:(e,t,n)=>{const r=n(78630),i=n(94492),s=n(24424),{bnToHex:o,hexToInt:c,incrementHexInt:a,minBlockRef:u,blockRefIsNumber:l}=n(15261);e.exports=class extends s{constructor(e){let{provider:t,params:n}=e;super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((e=>e.toLowerCase())))}async initialize(e){let{currentBlock:t}=e,n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=t),"earliest"===n&&(n="0x0"),this.params.fromBlock=n;const r=u(this.params.toBlock,t),i=Object.assign({},this.params,{toBlock:r}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update(e){let{oldBlock:t,newBlock:n}=e;const r=n;let i;i=t?a(t):n;const s=Object.assign({},this.params,{fromBlock:i,toBlock:r}),o=(await this._fetchLogs(s)).filter((e=>this.matchLog(e)));this.addResults(o)}async _fetchLogs(e){return await i((t=>this.ethQuery.getLogs(e,t)))()}matchLog(e){if(c(this.params.fromBlock)>=c(e.blockNumber))return!1;if(l(this.params.toBlock)&&c(this.params.toBlock)<=c(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();if(this.params.address&&t&&!this.params.address.includes(t))return!1;return this.params.topics.every(((t,n)=>{let r=e.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(t)?t:[t];if(i.includes(null))return!0;i=i.map((e=>e.toLowerCase()));return i.includes(r)}))}}},94492:e=>{"use strict";const t=(e,t,n,r)=>function(){for(var i=arguments.length,s=new Array(i),o=0;o{t.multiArgs?s.push((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e?o(e):i(t)})):s.push(i);const c=this===n?r:this;Reflect.apply(e,c,s)}))},n=new WeakMap;e.exports=(e,r)=>{r={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...r};const i=typeof e;if(null===e||"object"!==i&&"function"!==i)throw new TypeError("Expected `input` to be a `Function` or `Object`, got `".concat(null===e?"null":i,"`"));const s=new WeakMap,o=new Proxy(e,{apply(e,n,i){const c=s.get(e);if(c)return Reflect.apply(c,n,i);const a=r.excludeMain?e:t(e,r,o,e);return s.set(e,a),Reflect.apply(a,n,i)},get(e,i){const c=e[i];if(!((e,t)=>{let i=n.get(e);if(i||(i={},n.set(e,i)),t in i)return i[t];const s=e=>"string"===typeof e||"symbol"===typeof t?t===e:e.test(t),o=Reflect.getOwnPropertyDescriptor(e,t),c=void 0===o||o.writable||o.configurable,a=(r.include?r.include.some(s):!r.exclude.some(s))&&c;return i[t]=a,a})(e,i)||c===Function.prototype[i])return c;const a=s.get(c);if(a)return a;if("function"===typeof c){const n=t(c,r,o,e);return s.set(c,n),n}return c}});return o}},68286:(e,t,n)=>{const r=n(4609).default,{createAsyncMiddleware:i,createScaffoldMiddleware:s}=n(79223),o=n(14202),{unsafeRandomBytes:c,incrementHexInt:a}=n(15261),u=n(91611);function l(e){return null===e||void 0===e?null:{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}e.exports=function(e){let{blockTracker:t,provider:n}=e;const h={},d=o({blockTracker:t,provider:n});let p=!1;const f=new r,g=s({eth_subscribe:i((async function(e,r){if(p)throw new Error("SubscriptionManager - attempting to use after destroying");const i=e.params[0],s=c(16);let o;switch(i){case"newHeads":o=f({subId:s});break;case"logs":const t=e.params[1];o=g({subId:s,filter:await d.newLogFilter(t)});break;default:throw new Error('SubscriptionManager - unsupported subscription type "'.concat(i,'"'))}return h[s]=o,void(r.result=s);function f(e){let{subId:r}=e;const s={type:i,destroy:async()=>{t.removeListener("sync",s.update)},update:async e=>{let{oldBlock:t,newBlock:i}=e;const s=i,o=a(t);(await u({provider:n,fromBlock:o,toBlock:s})).map(l).filter((e=>null!==e)).forEach((e=>{b(r,e)}))}};return t.on("sync",s.update),s}function g(e){let{subId:t,filter:n}=e;n.on("update",(e=>b(t,e)));return{type:i,destroy:async()=>await d.uninstallFilter(n.idHex)}}})),eth_unsubscribe:i((async function(e,t){if(p)throw new Error("SubscriptionManager - attempting to use after destroying");const n=e.params[0],r=h[n];if(!r)return void(t.result=!1);delete h[n],await r.destroy(),t.result=!0}))});return g.destroy=function(){f.removeAllListeners();for(const e in h)h[e].destroy(),delete h[e];p=!0},{events:f,middleware:g};function b(e,t){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}}},45431:(e,t,n)=>{const r=n(61282),i=n(91611),{incrementHexInt:s}=n(15261);e.exports=class extends r{constructor(e){let{provider:t}=e;super(),this.type="tx",this.provider=t}async update(e){let{oldBlock:t}=e;const n=t,r=s(t),o=await i({provider:this.provider,fromBlock:r,toBlock:n}),c=[];for(const i of o)c.push(...i.transactions);this.addResults(c)}}},78630:(e,t,n)=>{const r=n(25307),i=n(39702)();function s(e){this.currentProvider=e}function o(e){return function(){var t=[].slice.call(arguments),n=t.pop();this.sendAsync({method:e,params:t},n)}}function c(e,t){return function(){var n=[].slice.call(arguments),r=n.pop();n.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const r=n(62891);class i extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return r.default(this.serialize(),s,2)}}t.EthereumRpcError=i;function s(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends i{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},1479:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},71846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const r=n(44409),i=n(17638),s=n(1479);function o(e,t){const[n,s]=a(t);return new r.EthereumRpcError(e,n||i.getMessageFromCode(e),s)}function c(e,t){const[n,s]=a(t);return new r.EthereumProviderError(e,n||i.getMessageFromCode(e),s)}function a(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.ethErrors={rpc:{parse:e=>o(s.errorCodes.rpc.parse,e),invalidRequest:e=>o(s.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(s.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(s.errorCodes.rpc.methodNotFound,e),internal:e=>o(s.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(s.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(s.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(s.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(s.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(s.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(s.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>c(s.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>c(s.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>c(s.errorCodes.provider.unsupportedMethod,e),disconnected:e=>c(s.errorCodes.provider.disconnected,e),chainDisconnected:e=>c(s.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}}},98689:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const r=n(44409);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(17638);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=n(71846);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=n(1479);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},17638:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(1479),i=n(44409),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",c={code:s,message:a(s)};function a(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(e)){const n=e.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!r.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function h(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e){let{fallbackError:t=c,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;if(!t||!Number.isInteger(t.code)||"string"!==typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const o={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&u(e.code)){const t=e;o.code=t.code,t.message&&"string"===typeof t.message?(o.message=t.message,d(t,"data")&&(o.data=t.data)):(o.message=a(o.code),o.data={originalError:h(e)})}else{o.code=t.code;const n=null===(r=e)||void 0===r?void 0:r.message;o.message=n&&"string"===typeof n?n:t.message,o.data={originalError:h(e)}}const l=null===(s=e)||void 0===s?void 0:s.stack;return n&&e&&l&&"string"===typeof l&&(o.stack=l),o}},62891:e=>{e.exports=o,o.default=o,o.stable=l,o.stableStringify=l;var t="[...]",n="[Circular]",r=[],i=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(e,t,n,o){var c;"undefined"===typeof o&&(o=s()),a(e,"",0,[],void 0,0,o);try{c=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,d(t),n)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return c}function c(e,t,n,s){var o=Object.getOwnPropertyDescriptor(s,n);void 0!==o.get?o.configurable?(Object.defineProperty(s,n,{value:e}),r.push([s,n,t,o])):i.push([t,n,e]):(s[n]=e,r.push([s,n,t]))}function a(e,r,i,s,o,u,l){var h;if(u+=1,"object"===typeof e&&null!==e){for(h=0;hl.depthLimit)return void c(t,e,r,o);if("undefined"!==typeof l.edgesLimit&&i+1>l.edgesLimit)return void c(t,e,r,o);if(s.push(e),Array.isArray(e))for(h=0;ht?1:0}function l(e,t,n,o){"undefined"===typeof o&&(o=s());var c,a=h(e,"",0,[],void 0,0,o)||e;try{c=0===i.length?JSON.stringify(a,t,n):JSON.stringify(a,d(t),n)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return c}function h(e,i,s,o,a,l,d){var p;if(l+=1,"object"===typeof e&&null!==e){for(p=0;pd.depthLimit)return void c(t,e,i,a);if("undefined"!==typeof d.edgesLimit&&s+1>d.edgesLimit)return void c(t,e,i,a);if(o.push(e),Array.isArray(e))for(p=0;p0)for(var r=0;r{try{const[i,s,c]=await o._runAllMiddleware(e,t,this._middleware);return s?(await o._runReturnHandlers(c),r(i)):n((async e=>{try{await o._runReturnHandlers(c)}catch(t){return e(t)}return e()}))}catch(i){return r(i)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(n){if(t)return t(n);throw n}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,n)=>{t(n)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!==typeof e){const n=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: ".concat(typeof e),{request:e});return t(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!==typeof e.method){const n=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: ".concat(typeof e.method),{request:e});return t(n,{id:e.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},e),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(o){i=o}return i&&(delete r.result,r.error||(r.error=s.serializeError(i))),t(i,r)}async _processRequest(e,t){const[n,r,i]=await o._runAllMiddleware(e,t,this._middleware);if(o._checkForCompletion(e,t,r),await o._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(e,t,n){const r=[];let i=null,s=!1;for(const c of n)if([i,s]=await o._runMiddleware(e,t,c,r),s)break;return[i,s,r.reverse()]}static _runMiddleware(e,t,n,r){return new Promise((i=>{const o=e=>{const n=e||t.error;n&&(t.error=s.serializeError(n)),i([n,!0])},a=n=>{t.error?o(t.error):(n&&("function"!==typeof n&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,'JsonRpcEngine: "next" return handlers must be functions. '+'Received "'.concat(typeof n,'" for request:\n').concat(c(e)),{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,a,o)}catch(u){o(u)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new s.EthereumRpcError(s.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n".concat(c(e)),{request:e});if(!n)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n".concat(c(e)),{request:e})}}function c(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=o},14825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAsyncMiddleware=void 0,t.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let s;const o=new Promise((e=>{s=e}));let c=null,a=!1;const u=async()=>{a=!0,r((e=>{c=e,s()})),await o};try{await e(t,n,u),a?(await o,c(null)):i(null)}catch(l){c?c(l):i(l)}}}},28711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScaffoldMiddleware=void 0,t.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const s=e[t.method];return void 0===s?r():"function"===typeof s?s(t,n,r,i):(n.result=s,i())}}},68919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;const n=4294967295;let r=Math.floor(Math.random()*n);t.getUniqueId=function(){return r=(r+1)%n,r}},40883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIdRemapMiddleware=void 0;const r=n(68919);t.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const s=e.id,o=r.getUniqueId();e.id=o,t.id=o,n((n=>{e.id=s,t.id=s,n()}))}}},79223:function(e,t,n){"use strict";var r=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]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(40883),t),i(n(14825),t),i(n(28711),t),i(n(68919),t),i(n(40909),t),i(n(61970),t)},61970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMiddleware=void 0;const r=n(40909);t.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},39702:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,n="undefined"!==typeof e.start?e.start:Math.floor(Math.random()*t);return function(){return n%=t,n++}}},95187:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,s=7*i,o=365.25*i;function c(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var s=Math.abs(e);if(s>=i)return c(e,s,i,"day");if(s>=r)return c(e,s,r,"hour");if(s>=n)return c(e,s,n,"minute");if(s>=t)return c(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=i)return Math.round(e/i)+"d";if(s>=r)return Math.round(e/r)+"h";if(s>=n)return Math.round(e/n)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7301:e=>{"use strict";const t=(e,t)=>function(){const n=t.promiseModule,r=new Array(arguments.length);for(let e=0;e{t.errorFirst?r.push((function(e,r){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},n);const r=e=>{const t=t=>"string"===typeof t?e===t:t.test(e);return n.include?n.include.some(t):!n.exclude.some(t)};let i;i="function"===typeof e?function(){return n.excludeMain?e.apply(this,arguments):t(e,n).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const s in e){const o=e[s];i[s]="function"===typeof o&&r(s)?t(o,n):o}return i}},73856:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>E,Fragment:()=>_,cloneElement:()=>W,createContext:()=>Z,createElement:()=>y,createRef:()=>w,h:()=>y,hydrate:()=>U,isValidElement:()=>o,options:()=>i,render:()=>z,toChildArray:()=>N});var r,i,s,o,c,a,u,l,h,d={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function v(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n){var i,s,o,c={};for(o in t)"key"==o?i=t[o]:"ref"==o?s=t[o]:c[o]=t[o];if(arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===c[o]&&(c[o]=e.defaultProps[o]);return m(e,c,i,s,null)}function m(e,t,n,r,o){var c={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==o?++s:o,__i:-1};return null==o&&null!=i.vnode&&i.vnode(c),c}function w(){return{current:null}}function _(e){return e.children}function E(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__i+1):null;for(var n;tt&&c.sort(l));k.__r=0}function I(e,t,n,r,i,s,o,c,a,u,l){var h,f,b,v,y,w,E,x,C,k=0,I=r&&r.__k||p,N=I.length,T=N,L=t.length;for(n.__k=[],h=0;h0?m(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)?(v.__=n,v.__b=n.__b+1,v.__i=h,-1===(x=A(v,I,E=h+k,T))?b=d:(b=I[x]||d,I[x]=void 0,T--),j(e,v,b,i,s,o,c,a,u,l),y=v.__e,(f=v.ref)&&b.ref!=f&&(b.ref&&F(b.ref,null,v),l.push(f,v.__c||y,v)),null==w&&null!=y&&(w=y),(C=b===d||null===b.__v)?-1==x&&k--:x!==E&&(x===E+1?k++:x>E?T>L-E?k+=x-E:k--:k=x(null!=a?1:0))for(;o>=0||c=0){if((a=t[o])&&i==a.key&&s===a.type)return o;o--}if(c2&&(a.children=arguments.length>3?r.call(arguments,2):n),m(e.type,a,i||e.key,s||e.ref,null)}function Z(e,t){var n={__c:t="__cC"+h++,__: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((function(e){e.__e=!0,C(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=p.slice,i={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},s=0,o=function(e){return null!=e&&null==e.constructor},E.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},E.prototype.render=_,c=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,h=0},98944:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useCallback:()=>x,useContext:()=>C,useDebugValue:()=>k,useEffect:()=>m,useErrorBoundary:()=>I,useId:()=>M,useImperativeHandle:()=>E,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>_,useState:()=>v});var r,i,s,o,c=n(73856),a=0,u=[],l=[],h=c.options.__b,d=c.options.__r,p=c.options.diffed,f=c.options.__c,g=c.options.unmount;function b(e,t){c.options.__h&&c.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 v(e){return a=1,y(P,e)}function y(e,t,n){var s=b(r++,2);if(s.t=e,!s.__c&&(s.__=[n?n(t):P(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],n=s.t(t,e);t!==n&&(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){var o=function(e,t,n){if(!s.__c.__H)return!0;var r=s.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!c||c.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&&s.__c.props===e)&&(!c||c.call(this,e,t,n))};i.u=!0;var c=i.shouldComponentUpdate,a=i.componentWillUpdate;i.componentWillUpdate=function(e,t,n){if(this.__e){var r=c;c=void 0,o(e,t,n),c=r}a&&a.call(this,e,t,n)},i.shouldComponentUpdate=o}return s.__N||s.__}function m(e,t){var n=b(r++,3);!c.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,i.__H.__h.push(n))}function w(e,t){var n=b(r++,4);!c.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,i.__h.push(n))}function _(e){return a=5,S((function(){return{current:e}}),[])}function E(e,t,n){a=6,w((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 S(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,S((function(){return e}),t)}function C(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 k(e,t){c.options.useDebugValue&&c.options.useDebugValue(t?t(e):e)}function I(e){var t=b(r++,10),n=v();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 M(){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 N(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(T),e.__H.__h.forEach(L),e.__H.__h=[]}catch(i){e.__H.__h=[],c.options.__e(i,e.__v)}}c.options.__b=function(e){i=null,h&&h(e)},c.options.__r=function(e){d&&d(e),r=0;var t=(i=e.__c).__H;t&&(s===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(T),t.__h.forEach(L),t.__h=[],r=0)),s=i},c.options.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&o===c.options.requestAnimationFrame||((o=c.options.requestAnimationFrame)||A)(N)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),s=i=null},c.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(T),e.__h=e.__h.filter((function(e){return!e.__||L(e)}))}catch(s){t.some((function(e){e.__h&&(e.__h=[])})),t=[],c.options.__e(s,e.__v)}})),f&&f(e,t)},c.options.unmount=function(e){g&&g(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{T(e)}catch(e){t=e}})),n.__H=void 0,t&&c.options.__e(t,n.__v))};var R="function"==typeof requestAnimationFrame;function A(e){var t,n=function(){clearTimeout(r),R&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);R&&(t=requestAnimationFrame(n))}function T(e){var t=i,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),i=t}function L(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 P(e,t){return"function"==typeof t?t(e):t}},40623:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArgumentOutOfRangeError:()=>R.W,AsyncSubject:()=>l.c,BehaviorSubject:()=>a.X,ConnectableObservable:()=>i.c,EMPTY:()=>Y.E,EmptyError:()=>A.K,GroupedObservable:()=>s.T,NEVER:()=>he,Notification:()=>C.P,NotificationKind:()=>C.W,ObjectUnsubscribedError:()=>T.N,Observable:()=>r.y,ReplaySubject:()=>u.t,Scheduler:()=>E.b,Subject:()=>c.xQ,Subscriber:()=>x.L,Subscription:()=>S.w,TimeoutError:()=>O.W,UnsubscriptionError:()=>L.B,VirtualAction:()=>_,VirtualTimeScheduler:()=>w,animationFrame:()=>m,animationFrameScheduler:()=>y,asap:()=>h.e,asapScheduler:()=>h.E,async:()=>d.P,asyncScheduler:()=>d.z,bindCallback:()=>F,bindNodeCallback:()=>z,combineLatest:()=>q.aj,concat:()=>J.z,config:()=>Ne.v,defer:()=>G.P,empty:()=>Y.c,forkJoin:()=>$,from:()=>K.D,fromEvent:()=>te,fromEventPattern:()=>re,generate:()=>ie,identity:()=>M.y,iif:()=>oe,interval:()=>ae,isObservable:()=>N,merge:()=>le.T,never:()=>de,noop:()=>I.Z,observable:()=>o.L,of:()=>pe.of,onErrorResumeNext:()=>fe,pairs:()=>ge,partition:()=>we,pipe:()=>k.z,queue:()=>p.c,queueScheduler:()=>p.N,race:()=>_e.S3,range:()=>Ee,scheduled:()=>Me.x,throwError:()=>xe._,timer:()=>Ce.H,using:()=>ke,zip:()=>Ie.$R});var r=n(3600),i=n(33778),s=n(68843),o=n(43150),c=n(41053),a=n(68056),u=n(39963),l=n(22906),h=n(84493),d=n(34489),p=n(49579),f=n(74744),g=n(21119),b=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return f.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}(g.o),v=n(24560),y=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f.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}(g.o),E=n(88763),S=n(83273),x=n(69480),C=n(61197),k=n(76834),I=n(78143),M=n(25870);function N(e){return!!e&&(e instanceof r.y||"function"===typeof e.lift&&"function"===typeof e.subscribe)}var R=n(59156),A=n(31537),T=n(33910),L=n(26222),O=n(95269),P=n(43615),j=n(53179),D=n(19151),B=n(58635);function F(e,t,n){if(t){if(!(0,B.K)(t))return function(){for(var r=[],i=0;i1?r.next(Array.prototype.slice.call(arguments)):r.next(e)}),r,n)}))}function ne(e,t,n,r,i){var s;if(function(e){return e&&"function"===typeof e.addEventListener&&"function"===typeof e.removeEventListener}(e)){var o=e;e.addEventListener(t,n,i),s=function(){return o.removeEventListener(t,n,i)}}else if(function(e){return e&&"function"===typeof e.on&&"function"===typeof e.off}(e)){var c=e;e.on(t,n),s=function(){return c.off(t,n)}}else if(function(e){return e&&"function"===typeof e.addListener&&"function"===typeof e.removeListener}(e)){var a=e;e.addListener(t,n),s=function(){return a.removeListener(t,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,l=e.length;u=t){r.complete();break}if(r.next(s++),r.closed)break}}))}function Se(e){var t=e.start,n=e.index,r=e.count,i=e.subscriber;n>=r?i.complete():(i.next(t),i.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}var xe=n(13986),Ce=n(47672);function ke(e,t){return new r.y((function(n){var r,i;try{r=e()}catch(o){return void n.error(o)}try{i=t(r)}catch(o){return void n.error(o)}var s=(i?(0,K.D)(i):Y.E).subscribe(n);return function(){s.unsubscribe(),r&&r.unsubscribe()}}))}var Ie=n(45348),Me=n(21763),Ne=n(20322)},22906:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(74744),i=n(41053),s=n(83273),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.ZT(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),s.w.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),s.w.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.xQ)},68056:(e,t,n)=>{"use strict";n.d(t,{X:()=>o});var r=n(74744),i=n(41053),s=n(33910),o=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return r.ZT(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.xQ)},61197:(e,t,n)=>{"use strict";n.d(t,{P:()=>c,W:()=>r});var r,i=n(91861),s=n(27985),o=n(13986);r||(r={});var c=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"===typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return(0,s.of)(this.value);case"E":return(0,o._)(this.error);case"C":return(0,i.c)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return"undefined"!==typeof t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},3600:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(53179),i=n(69480),s=n(63063),o=n(46195);var c=n(43150),a=n(76834),u=n(20322),l=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,c=function(e,t,n){if(e){if(e instanceof i.L)return e;if(e[s.b])return e[s.b]()}return e||t||n?new i.L(e,t,n):new i.L(o.c)}(e,t,n);if(r?c.add(r.call(c,this.source)):c.add(this.source||u.v.useDeprecatedSynchronousErrorHandling&&!c.syncErrorThrowable?this._subscribe(c):this._trySubscribe(c)),u.v.useDeprecatedSynchronousErrorHandling&&c.syncErrorThrowable&&(c.syncErrorThrowable=!1,c.syncErrorThrown))throw c.syncErrorValue;return c},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),(0,r._)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=h(t))((function(t,r){var i;i=n.subscribe((function(t){try{e(t)}catch(n){r(n),i&&i.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[c.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{"use strict";n.d(t,{c:()=>s});var r=n(20322),i=n(54074),s={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,i.z)(e)},complete:function(){}}},92822:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var r=n(74744),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.ZT(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(69480).L)},39963:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});var r=n(74744),i=n(41053),s=n(49579),o=n(83273),c=n(13112),a=n(33910),u=n(51585),l=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.ZT(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,s=r.length;if(this.closed)throw new a.N;if(this.isStopped||this.hasError?t=o.w.EMPTY:(this.observers.push(e),t=new u.W(this,e)),i&&e.add(e=new c.ht(e,i)),n)for(var l=0;lt&&(s=Math.max(s,i-t)),s>0&&r.splice(0,s),r},t}(i.xQ),h=function(){return function(e,t){this.time=e,this.value=t}}()},88763:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}()},41053:(e,t,n)=>{"use strict";n.d(t,{Yc:()=>l,xQ:()=>h});var r=n(74744),i=n(3600),s=n(69480),o=n(83273),c=n(33910),a=n(51585),u=n(63063),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.ZT(t,e),t}(s.L),h=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.ZT(t,e),t.prototype[u.b]=function(){return new l(this)},t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new c.N;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i{"use strict";n.d(t,{W:()=>i});var r=n(74744),i=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.ZT(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(83273).w)},69480:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(74744),i=n(23299),s=n(46195),o=n(83273),c=n(63063),a=n(20322),u=n(54074),l=function(e){function t(n,r,i){var o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=s.c;break;case 1:if(!n){o.destination=s.c;break}if("object"===typeof n){n instanceof t?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new h(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new h(o,n,r,i)}return o}return r.ZT(t,e),t.prototype[c.b]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(o.w),h=function(e){function t(t,n,r,o){var c,a=e.call(this)||this;a._parentSubscriber=t;var u=a;return(0,i.m)(n)?c=n:n&&(c=n.next,r=n.error,o=n.complete,n!==s.c&&(u=Object.create(n),(0,i.m)(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=c,a._error=r,a._complete=o,a}return r.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;a.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=a.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,u.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,u.z)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};a.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),a.v.useDeprecatedSynchronousErrorHandling)throw n;(0,u.z)(n)}},t.prototype.__tryOrSetError=function(e,t,n){if(!a.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return a.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):((0,u.z)(r),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},83273:(e,t,n)=>{"use strict";n.d(t,{w:()=>c});var r=n(19151),i=n(3766),s=n(23299),o=n(26222),c=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,c=n._parentOrParents,u=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c instanceof e)c.remove(this);else if(null!==c)for(var d=0;d{"use strict";n.d(t,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},71526:(e,t,n)=>{"use strict";n.d(t,{Ds:()=>a,IY:()=>c,ft:()=>u});var r=n(74744),i=n(69480),s=n(3600),o=n(25058),c=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return r.ZT(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.L),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.ZT(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.L);function u(e,t){if(!t.closed){if(e instanceof s.y)return e.subscribe(t);var n;try{n=(0,o.s)(e)(t)}catch(r){t.error(r)}return n}}},33778:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,c:()=>a});var r=n(74744),i=n(41053),s=n(3600),o=n(83273),c=n(55815),a=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new o.w).add(this.source.subscribe(new l(this.getSubject(),this))),e.closed&&(this._connection=null,e=o.w.EMPTY)),e},t.prototype.refCount=function(){return(0,c.x)()(this)},t}(s.y),u=function(){var e=a.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.ZT(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(i.Yc)},38720:(e,t,n)=>{"use strict";n.d(t,{Ms:()=>h,aj:()=>l});var r=n(74744),i=n(58635),s=n(19151),o=n(92822),c=n(52118),a=n(18493),u={};function l(){for(var e=[],t=0;t{"use strict";n.d(t,{z:()=>s});var r=n(27985),i=n(44003);function s(){for(var e=[],t=0;t{"use strict";n.d(t,{P:()=>o});var r=n(3600),i=n(68778),s=n(91861);function o(e){return new r.y((function(t){var n;try{n=e()}catch(r){return void t.error(r)}return(n?(0,i.D)(n):(0,s.c)()).subscribe(t)}))}},91861:(e,t,n)=>{"use strict";n.d(t,{E:()=>i,c:()=>s});var r=n(3600),i=new r.y((function(e){return e.complete()}));function s(e){return e?function(e){return new r.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):i}},68778:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var r=n(3600),i=n(25058),s=n(21763);function o(e,t){return t?(0,s.x)(e,t):e instanceof r.y?e:new r.y((0,i.s)(e))}},18493:(e,t,n)=>{"use strict";n.d(t,{n:()=>o});var r=n(3600),i=n(86856),s=n(86747);function o(e,t){return t?(0,s.r)(e,t):new r.y((0,i.V)(e))}},15794:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var r=n(3600),i=n(58635),s=n(84853),o=n(18493);function c(){for(var e=[],t=0;t1&&"number"===typeof e[e.length-1]&&(n=e.pop())):"number"===typeof a&&(n=e.pop()),null===c&&1===e.length&&e[0]instanceof r.y?e[0]:(0,s.J)(n)((0,o.n)(e,c))}},27985:(e,t,n)=>{"use strict";n.d(t,{of:()=>o});var r=n(58635),i=n(18493),s=n(86747);function o(){for(var e=[],t=0;t{"use strict";n.d(t,{S3:()=>a});var r=n(74744),i=n(19151),s=n(18493),o=n(92822),c=n(52118);function a(){for(var e=[],t=0;t{"use strict";n.d(t,{_:()=>i});var r=n(3600);function i(e,t){return t?new r.y((function(n){return t.schedule(s,0,{error:e,subscriber:n})})):new r.y((function(t){return t.error(e)}))}function s(e){var t=e.error;e.subscriber.error(t)}},47672:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var r=n(3600),i=n(34489),s=n(87626),o=n(58635);function c(e,t,n){void 0===e&&(e=0);var c=-1;return(0,s.k)(t)?c=Number(t)<1?1:Number(t):(0,o.K)(t)&&(n=t),(0,o.K)(n)||(n=i.P),new r.y((function(t){var r=(0,s.k)(e)?e:+e-n.now();return n.schedule(a,r,{index:0,period:c,subscriber:t})}))}function a(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}},45348:(e,t,n)=>{"use strict";n.d(t,{$R:()=>u,mx:()=>l});var r=n(74744),i=n(18493),s=n(19151),o=n(69480),c=n(27302),a=n(71526);function u(){for(var e=[],t=0;tthis.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),f=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.ZT(t,e),t.prototype[c.hZ]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return(0,a.ft)(this.observable,new a.IY(this))},t}(a.Ds)},44003:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});var r=n(84853);function i(){return(0,r.J)(1)}},36864:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var r=n(74744),i=n(69480);function s(e,t){return function(n){return n.lift(new o(e,t))}}var o=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.predicate,this.thisArg))},e}(),c=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)},t}(i.L)},68843:(e,t,n)=>{"use strict";n.d(t,{T:()=>d,v:()=>a});var r=n(74744),i=n(69480),s=n(83273),o=n(3600),c=n(41053);function a(e,t,n,r){return function(i){return i.lift(new u(e,t,n,r))}}var u=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),l=function(e){function t(t,n,r,i,s){var o=e.call(this,t)||this;return o.keySelector=n,o.elementSelector=r,o.durationSelector=i,o.subjectSelector=s,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o}return r.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(n){return void this.error(n)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(a){this.error(a)}else r=e;if(!i){i=this.subjectSelector?this.subjectSelector():new c.xQ,n.set(t,i);var s=new d(t,i,this);if(this.destination.next(s),this.durationSelector){var o=void 0;try{o=this.durationSelector(new d(t,i))}catch(a){return void this.error(a)}this.add(o.subscribe(new h(t,i,this)))}}i.closed||i.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach((function(t,n){t.error(e)})),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach((function(e,t){e.complete()})),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.L),h=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.key=t,i.group=n,i.parent=r,i}return r.ZT(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.L),d=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return r.ZT(t,e),t.prototype._subscribe=function(e){var t=new s.w,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new p(n)),t.add(r.subscribe(e)),t},t}(o.y),p=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.ZT(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(s.w)},43615:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(74744),i=n(69480);function s(e,t){return function(n){if("function"!==typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(e,t))}}var o=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.project,this.thisArg))},e}(),c=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(i.L)},84853:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var r=n(33925),i=n(25870);function s(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,e)}},33925:(e,t,n)=>{"use strict";n.d(t,{VS:()=>l,zg:()=>c});var r=n(74744),i=n(43615),s=n(68778),o=n(71526);function c(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof t?function(r){return r.pipe(c((function(n,r){return(0,s.D)(e(n,r)).pipe((0,i.U)((function(e,i){return t(n,e,r,i)})))}),n))}:("number"===typeof t&&(n=t),function(t){return t.lift(new a(e,n))})}var a=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project,this.concurrent))},e}(),u=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(t,e),t.prototype._next=function(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(o.Ds),l=c},13112:(e,t,n)=>{"use strict";n.d(t,{QV:()=>o,ht:()=>a});var r=n(74744),i=n(69480),s=n(61197);function o(e,t){return void 0===t&&(t=0),function(n){return n.lift(new c(e,t))}}var c=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.scheduler,this.delay))},e}(),a=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return r.ZT(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(s.P.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(s.P.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(s.P.createComplete()),this.unsubscribe()},t}(i.L),u=function(){return function(e,t){this.notification=e,this.destination=t}}()},55815:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var r=n(74744),i=n(69480);function s(){return function(e){return e.lift(new o(e))}}var o=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new c(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return r.ZT(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(i.L)},86747:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var r=n(3600),i=n(83273);function s(e,t){return new r.y((function(n){var r=new i.w,s=0;return r.add(t.schedule((function(){s!==e.length?(n.next(e[s++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},21763:(e,t,n)=>{"use strict";n.d(t,{x:()=>l});var r=n(3600),i=n(83273),s=n(43150);var o=n(86747),c=n(27302);var a=n(73675),u=n(41272);function l(e,t){if(null!=e){if(function(e){return e&&"function"===typeof e[s.L]}(e))return function(e,t){return new r.y((function(n){var r=new i.w;return r.add(t.schedule((function(){var i=e[s.L]();r.add(i.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if((0,a.t)(e))return function(e,t){return new r.y((function(n){var r=new i.w;return r.add(t.schedule((function(){return e.then((function(e){r.add(t.schedule((function(){n.next(e),r.add(t.schedule((function(){return n.complete()})))})))}),(function(e){r.add(t.schedule((function(){return n.error(e)})))}))}))),r}))}(e,t);if((0,u.z)(e))return(0,o.r)(e,t);if(function(e){return e&&"function"===typeof e[c.hZ]}(e)||"string"===typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.y((function(n){var r,s=new i.w;return s.add((function(){r&&"function"===typeof r.return&&r.return()})),s.add(t.schedule((function(){r=e[c.hZ](),s.add(t.schedule((function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(s){return void n.error(s)}t?n.complete():(n.next(e),this.schedule())}})))}))),s}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},21119:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(74744),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.ZT(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.ZT(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(83273).w))},24560:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var r=n(74744),i=n(88763),s=function(e){function t(n,r){void 0===r&&(r=i.b.now);var s=e.call(this,n,(function(){return t.delegate&&t.delegate!==s?t.delegate.now():r()}))||this;return s.actions=[],s.active=!1,s.scheduled=void 0,s}return r.ZT(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.b)},84493:(e,t,n)=>{"use strict";n.d(t,{e:()=>d,E:()=>h});var r=n(74744),i=1,s=function(){return Promise.resolve()}(),o={};function c(e){return e in o&&(delete o[e],!0)}var a=function(e){var t=i++;return o[t]=!0,s.then((function(){return c(t)&&e()})),t},u=function(e){c(e)},l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.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=a(t.flush.bind(t,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&&(u(n),t.scheduled=void 0)},t}(n(21119).o),h=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.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(++r{"use strict";n.d(t,{P:()=>s,z:()=>i});var r=n(21119),i=new(n(24560).v)(r.o),s=i},49579:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,N:()=>s});var r=n(74744),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.ZT(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(21119).o),s=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.ZT(t,e),t}(n(24560).v))(i),o=s},27302:(e,t,n)=>{"use strict";function r(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(t,{hZ:()=>i});var i=r()},43150:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var r=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},63063:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},59156:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},31537:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var r=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}()},33910:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},95269:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}()},26222:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});var r=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}()},53179:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(69480);function i(e){for(;e;){var t=e,n=t.closed,i=t.destination,s=t.isStopped;if(n||s)return!1;e=i&&i instanceof r.L?i:null}return!0}},54074:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,{z:()=>r})},25870:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{y:()=>r})},19151:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var r=function(){return Array.isArray||function(e){return e&&"number"===typeof e.length}}()},41272:(e,t,n)=>{"use strict";n.d(t,{z:()=>r});var r=function(e){return e&&"number"===typeof e.length&&"function"!==typeof e}},23299:(e,t,n)=>{"use strict";function r(e){return"function"===typeof e}n.d(t,{m:()=>r})},87626:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});var r=n(19151);function i(e){return!(0,r.k)(e)&&e-parseFloat(e)+1>=0}},3766:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"===typeof e}n.d(t,{K:()=>r})},73675:(e,t,n)=>{"use strict";function r(e){return!!e&&"function"!==typeof e.subscribe&&"function"===typeof e.then}n.d(t,{t:()=>r})},58635:(e,t,n)=>{"use strict";function r(e){return e&&"function"===typeof e.schedule}n.d(t,{K:()=>r})},78143:(e,t,n)=>{"use strict";function r(){}n.d(t,{Z:()=>r})},7376:(e,t,n)=>{"use strict";function r(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}n.d(t,{f:()=>r})},76834:(e,t,n)=>{"use strict";n.d(t,{U:()=>s,z:()=>i});var r=n(25870);function i(){for(var e=[],t=0;t{"use strict";n.d(t,{s:()=>l});var r=n(86856),i=n(54074),s=n(27302),o=n(43150),c=n(41272),a=n(73675),u=n(3766),l=function(e){if(e&&"function"===typeof e[o.L])return l=e,function(e){var t=l[o.L]();if("function"!==typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if((0,c.z)(e))return(0,r.V)(e);if((0,a.t)(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i.z),e};if(e&&"function"===typeof e[s.hZ])return t=e,function(e){for(var n=t[s.hZ]();;){var r=void 0;try{r=n.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"===typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,l,h=(0,u.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},86856:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var r=function(e){return function(t){for(var n=0,r=e.length;n{"use strict";n.d(t,{D:()=>c});var r=n(74744),i=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(69480).L),s=n(25058),o=n(3600);function c(e,t,n,r,c){if(void 0===c&&(c=new i(e,n,r)),!c.closed)return t instanceof o.y?t.subscribe(c):(0,s.s)(t)(c)}},21807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{audit:()=>s,auditTime:()=>l,buffer:()=>h,bufferCount:()=>g,bufferTime:()=>w,bufferToggle:()=>R,bufferWhen:()=>L,catchError:()=>j,combineAll:()=>V,combineLatest:()=>U,concat:()=>Z,concatAll:()=>q.u,concatMap:()=>G,concatMapTo:()=>Y,count:()=>Q,debounce:()=>X,debounceTime:()=>ne,defaultIfEmpty:()=>oe,delay:()=>he,delayWhen:()=>be,dematerialize:()=>_e,distinct:()=>xe,distinctUntilChanged:()=>Ie,distinctUntilKeyChanged:()=>Re,elementAt:()=>ze,endWith:()=>We,every:()=>Ze,exhaust:()=>Ge,exhaustMap:()=>$e,expand:()=>tt,filter:()=>Te.h,finalize:()=>it,find:()=>ct,findIndex:()=>lt,first:()=>dt,flatMap:()=>J.VS,groupBy:()=>pt.v,ignoreElements:()=>ft,isEmpty:()=>vt,last:()=>St,map:()=>Ke.U,mapTo:()=>xt,materialize:()=>It,max:()=>Pt,merge:()=>Dt,mergeAll:()=>Bt.J,mergeMap:()=>J.zg,mergeMapTo:()=>Ft,mergeScan:()=>Vt,min:()=>Ut,multicast:()=>Zt,observeOn:()=>Jt.QV,onErrorResumeNext:()=>Gt,pairwise:()=>Kt,partition:()=>tn,pluck:()=>nn,publish:()=>sn,publishBehavior:()=>cn,publishLast:()=>un,publishReplay:()=>hn,race:()=>pn,reduce:()=>Ot,refCount:()=>kn.x,repeat:()=>fn,repeatWhen:()=>vn,retry:()=>wn,retryWhen:()=>Sn,sample:()=>In,sampleTime:()=>Rn,scan:()=>Rt,sequenceEqual:()=>On,share:()=>Fn,shareReplay:()=>Vn,single:()=>Hn,skip:()=>Wn,skipLast:()=>Jn,skipUntil:()=>Qn,skipWhile:()=>Xn,startWith:()=>nr,subscribeOn:()=>or,switchAll:()=>hr,switchMap:()=>ar,switchMapTo:()=>dr,take:()=>Fe,takeLast:()=>wt,takeUntil:()=>pr,takeWhile:()=>br,tap:()=>_r,throttle:()=>Cr,throttleTime:()=>Mr,throwIfEmpty:()=>Oe,timeInterval:()=>Lr,timeout:()=>Vr,timeoutWith:()=>jr,timestamp:()=>Hr,toArray:()=>Wr,window:()=>Zr,windowCount:()=>Gr,windowTime:()=>Kr,windowToggle:()=>ii,windowWhen:()=>ci,withLatestFrom:()=>li,zip:()=>fi,zipAll:()=>gi});var r=n(74744),i=n(71526);function s(e){return function(t){return t.lift(new o(e))}}var o=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.durationSelector))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.ZT(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(r){return this.destination.error(r)}var n=(0,i.ft)(t,new i.IY(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,n=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.Ds),a=n(34489),u=n(47672);function l(e,t){return void 0===t&&(t=a.P),s((function(){return(0,u.H)(e,t)}))}function h(e){return function(t){return t.lift(new d(e))}}var d=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.closingNotifier))},e}(),p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add((0,i.ft)(n,new i.IY(r))),r}return r.ZT(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.Ds),f=n(69480);function g(e,t){return void 0===t&&(t=null),function(n){return n.lift(new b(e,t))}}var b=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?y:v}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),v=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return r.ZT(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(f.L),y=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.ZT(t,e),t.prototype._next=function(e){var t=this,n=t.bufferSize,r=t.startBufferEvery,i=t.buffers,s=t.count;this.count++,s%r===0&&i.push([]);for(var o=i.length;o--;){var c=i[o];c.push(e),c.length===n&&(i.splice(o,1),this.destination.next(c))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(f.L),m=n(58635);function w(e){var t=arguments.length,n=a.P;(0,m.K)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return t>=3&&(i=arguments[2]),function(t){return t.lift(new _(e,r,i,n))}}var _=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new S(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),E=function(){return function(){this.buffer=[]}}(),S=function(e){function t(t,n,r,i,s){var o=e.call(this,t)||this;o.bufferTimeSpan=n,o.bufferCreationInterval=r,o.maxBufferSize=i,o.scheduler=s,o.contexts=[];var c=o.openContext();if(o.timespanOnly=null==r||r<0,o.timespanOnly){var a={subscriber:o,context:c,bufferTimeSpan:n};o.add(c.closeAction=s.schedule(x,n,a))}else{var u={subscriber:o,context:c},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:o,scheduler:s};o.add(c.closeAction=s.schedule(k,n,u)),o.add(s.schedule(C,r,l))}return o}return r.ZT(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,i=0;i0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(x,n,r))}},t.prototype.openContext=function(){var e=new E;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(f.L);function x(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function C(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,i=e.scheduler,s=r.openContext();r.closed||(r.add(s.closeAction=i.schedule(k,n,{subscriber:r,context:s})),this.schedule(e,t))}function k(e){var t=e.subscriber,n=e.context;t.closeContext(n)}var I=n(83273),M=n(52118),N=n(92822);function R(e,t){return function(n){return n.lift(new A(e,t))}}var A=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new T(e,this.openings,this.closingSelector))},e}(),T=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.closingSelector=r,i.contexts=[],i.add((0,M.D)(i,n)),i}return r.ZT(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(n){this._error(n)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new I.w,r={buffer:[],subscription:n};t.push(r);var i=(0,M.D)(this,e,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},t}(N.L);function L(e){return function(t){return t.lift(new O(e))}}var O=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new P(e,this.closingSelector))},e}(),P=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.ZT(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{t=(0,this.closingSelector)()}catch(r){return this.error(r)}e=new I.w,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add((0,i.ft)(t,new i.IY(this))),this.subscribing=!1},t}(i.Ds);function j(e){return function(t){var n=new D(e),r=t.lift(n);return n.caught=r}}var D=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new B(e,this.selector,this.caught))},e}(),B=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.selector=n,i.caught=r,i}return r.ZT(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(o){return void e.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var r=new i.IY(this);this.add(r);var s=(0,i.ft)(n,r);s!==r&&this.add(s)}},t}(i.Ds),F=n(38720);function V(e){return function(t){return t.lift(new F.Ms(e))}}var H=n(19151),z=n(68778);function U(){for(var e=[],t=0;t0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var s=Math.max(0,n[0].time-r.now());this.schedule(e,s)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new fe(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(le.P.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(le.P.createComplete()),this.unsubscribe()},t}(f.L),fe=function(){return function(e,t){this.time=e,this.notification=t}}(),ge=n(3600);function be(e,t){return t?function(n){return new me(n,t).lift(new ve(e))}:function(t){return t.lift(new ve(e))}}var ve=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new ye(e,this.delayDurationSelector))},e}(),ye=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.ZT(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(e),this.removeSubscription(i),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(r){this.destination.error(r)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=(0,M.D)(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(N.L),me=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return r.ZT(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new we(e,this.source))},t}(ge.y),we=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return r.ZT(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(f.L);function _e(){return function(e){return e.lift(new Ee)}}var Ee=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Se(e))},e}(),Se=function(e){function t(t){return e.call(this,t)||this}return r.ZT(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(f.L);function xe(e,t){return function(n){return n.lift(new Ce(e,t))}}var Ce=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new ke(e,this.keySelector,this.flushes))},e}(),ke=function(e){function t(t,n,r){var s=e.call(this,t)||this;return s.keySelector=n,s.values=new Set,r&&s.add((0,i.ft)(r,new i.IY(s))),s}return r.ZT(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(r){return void n.error(r)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.Ds);function Ie(e,t){return function(n){return n.lift(new Me(e,t))}}var Me=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new Ne(e,this.compare,this.keySelector))},e}(),Ne=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.keySelector=r,i.hasKey=!1,"function"===typeof n&&(i.compare=n),i}return r.ZT(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(f.L);function Re(e,t){return Ie((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}var Ae=n(59156),Te=n(36864),Le=n(31537);function Oe(e){return void 0===e&&(e=De),function(t){return t.lift(new Pe(e))}}var Pe=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new je(e,this.errorFactory))},e}(),je=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.ZT(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(f.L);function De(){return new Le.K}var Be=n(91861);function Fe(e){return function(t){return 0===e?(0,Be.c)():t.lift(new Ve(e))}}var Ve=function(){function e(e){if(this.total=e,this.total<0)throw new Ae.W}return e.prototype.call=function(e,t){return t.subscribe(new He(e,this.total))},e}(),He=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.ZT(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(f.L);function ze(e,t){if(e<0)throw new Ae.W;var n=arguments.length>=2;return function(r){return r.pipe((0,Te.h)((function(t,n){return n===e})),Fe(1),n?oe(t):Oe((function(){return new Ae.W})))}}var Ue=n(27985);function We(){for(var e=[],t=0;t0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.Ds);function it(e){return function(t){return t.lift(new st(e))}}var st=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new ot(e,this.callback))},e}(),ot=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new I.w(n)),r}return r.ZT(t,e),t}(f.L);function ct(e,t){if("function"!==typeof e)throw new TypeError("predicate is not a function");return function(n){return n.lift(new at(e,n,!1,t))}}var at=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new ut(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}(),ut=function(e){function t(t,n,r,i,s){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.yieldIndex=i,o.thisArg=s,o.index=0,o}return r.ZT(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(i){this.destination.error(i)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(f.L);function lt(e,t){return function(n){return n.lift(new at(e,n,!0,t))}}var ht=n(25870);function dt(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?(0,Te.h)((function(t,n){return e(t,n,r)})):ht.y,Fe(1),n?oe(t):Oe((function(){return new Le.K})))}}var pt=n(68843);function ft(){return function(e){return e.lift(new gt)}}var gt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new bt(e))},e}(),bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.ZT(t,e),t.prototype._next=function(e){},t}(f.L);function vt(){return function(e){return e.lift(new yt)}}var yt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new mt(e))},e}(),mt=function(e){function t(t){return e.call(this,t)||this}return r.ZT(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(f.L);function wt(e){return function(t){return 0===e?(0,Be.c)():t.lift(new _t(e))}}var _t=function(){function e(e){if(this.total=e,this.total<0)throw new Ae.W}return e.prototype.call=function(e,t){return t.subscribe(new Et(e,this.total))},e}(),Et=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.ZT(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(e?(0,Te.h)((function(t,n){return e(t,n,r)})):ht.y,wt(1),n?oe(t):Oe((function(){return new Le.K})))}}function xt(e){return function(t){return t.lift(new Ct(e))}}var Ct=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new kt(e,this.value))},e}(),kt=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return r.ZT(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(f.L);function It(){return function(e){return e.lift(new Mt)}}var Mt=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Nt(e))},e}(),Nt=function(e){function t(t){return e.call(this,t)||this}return r.ZT(t,e),t.prototype._next=function(e){this.destination.next(le.P.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(le.P.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(le.P.createComplete()),e.complete()},t}(f.L);function Rt(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new At(e,t,n))}}var At=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new Tt(e,this.accumulator,this.seed,this.hasSeed))},e}(),Tt=function(e){function t(t,n,r,i){var s=e.call(this,t)||this;return s.accumulator=n,s._seed=r,s.hasSeed=i,s.index=0,s}return r.ZT(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)},t}(f.L),Lt=n(76834);function Ot(e,t){return arguments.length>=2?function(n){return(0,Lt.z)(Rt(e,t),wt(1),oe(t))(n)}:function(t){return(0,Lt.z)(Rt((function(t,n,r){return e(t,n,r+1)})),wt(1))(t)}}function Pt(e){return Ot("function"===typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}var jt=n(15794);function Dt(){for(var e=[],t=0;t0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.Ds);function Ut(e){return Ot("function"===typeof e?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(f.L);function vn(e){return function(t){return t.lift(new yn(e))}}var yn=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new mn(e,this.notifier,t))},e}(),mn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.ZT(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new rn.xQ;try{t=(0,this.notifier)(this.notifications)}catch(n){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=(0,i.ft)(t,new i.IY(this))},t}(i.Ds);function wn(e){return void 0===e&&(e=-1),function(t){return t.lift(new _n(e,t))}}var _n=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new En(e,this.count,this.source))},e}(),En=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.count=n,i.source=r,i}return r.ZT(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(f.L);function Sn(e){return function(t){return t.lift(new xn(e,t))}}var xn=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Cn(e,this.notifier,this.source))},e}(),Cn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.notifier=n,i.source=r,i}return r.ZT(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,s=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new rn.xQ;try{r=(0,this.notifier)(n)}catch(o){return e.prototype.error.call(this,o)}s=(0,i.ft)(r,new i.IY(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=s,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(i.Ds),kn=n(55815);function In(e){return function(t){return t.lift(new Mn(e))}}var Mn=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new Nn(e),r=t.subscribe(n);return r.add((0,i.ft)(this.notifier,new i.IY(n))),r},e}(),Nn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return r.ZT(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.Ds);function Rn(e,t){return void 0===t&&(t=a.P),function(n){return n.lift(new An(e,t))}}var An=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new Tn(e,this.period,this.scheduler))},e}(),Tn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Ln,n,{subscriber:i,period:n})),i}return r.ZT(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(f.L);function Ln(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}function On(e,t){return function(n){return n.lift(new Pn(e,t))}}var Pn=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new jn(e,this.compareTo,this.comparator))},e}(),jn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Dn(t,i))),i}return r.ZT(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,n=e._b,r=e.comparator;t.length>0&&n.length>0;){var i=t.shift(),s=n.shift(),o=!1;try{o=r?r(i,s):i===s}catch(c){this.destination.error(c)}o||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(f.L),Dn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return r.ZT(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(f.L);function Bn(){return new rn.xQ}function Fn(){return function(e){return(0,kn.x)()(Zt(Bn)(e))}}function Vn(e,t,n){var r;return r=e&&"object"===typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,r=e.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,s=e.windowTime,o=void 0===s?Number.POSITIVE_INFINITY:s,c=e.refCount,a=e.scheduler,u=0,l=!1,h=!1;return function(e){var r;u++,!t||l?(l=!1,t=new ln.t(i,o,a),r=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){l=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}}),h&&(n=void 0)):r=t.subscribe(this),this.add((function(){u--,r.unsubscribe(),r=void 0,n&&!h&&c&&0===u&&(n.unsubscribe(),n=void 0,t=void 0)}))}}(r))}}function Hn(e){return function(t){return t.lift(new zn(e,t))}}var zn=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new Un(e,this.predicate,this.source))},e}(),Un=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.ZT(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(n){this.destination.error(n)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new Le.K)},t}(f.L);function Wn(e){return function(t){return t.lift(new Zn(e))}}var Zn=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new qn(e,this.total))},e}(),qn=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return r.ZT(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(f.L);function Jn(e){return function(t){return t.lift(new Gn(e))}}var Gn=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new Ae.W}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new f.L(e)):t.subscribe(new Yn(e,this._skipCount))},e}(),Yn=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.ZT(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,s=i.length,o=0;o=0&&c%t===0&&!this.closed&&i.shift().complete(),++this.count%t===0&&!this.closed){var a=new rn.xQ;i.push(a),n.next(a)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(f.L);function Kr(e){var t=a.P,n=null,r=Number.POSITIVE_INFINITY;return(0,m.K)(arguments[3])&&(t=arguments[3]),(0,m.K)(arguments[2])?t=arguments[2]:(0,ir.k)(arguments[2])&&(r=Number(arguments[2])),(0,m.K)(arguments[1])?t=arguments[1]:(0,ir.k)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new $r(e,n,r,t))}}var $r=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new ei(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),Xr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return r.ZT(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(rn.xQ),ei=function(e){function t(t,n,r,i,s){var o=e.call(this,t)||this;o.destination=t,o.windowTimeSpan=n,o.windowCreationInterval=r,o.maxWindowSize=i,o.scheduler=s,o.windows=[];var c=o.openWindow();if(null!==r&&r>=0){var a={subscriber:o,window:c,context:null},u={windowTimeSpan:n,windowCreationInterval:r,subscriber:o,scheduler:s};o.add(s.schedule(ri,n,a)),o.add(s.schedule(ni,r,u))}else{var l={subscriber:o,window:c,windowTimeSpan:n};o.add(s.schedule(ti,n,l))}return o}return r.ZT(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r=this.maxWindowSize&&this.closeWindow(i))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new Xr;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(f.L);function ti(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function ni(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,i=e.windowCreationInterval,s=n.openWindow(),o=this,c={action:o,subscription:null},a={subscriber:n,window:s,context:c};c.subscription=r.schedule(ri,t,a),o.add(c.subscription),o.schedule(e,i)}function ri(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}function ii(e,t){return function(n){return n.lift(new si(e,t))}}var si=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new oi(e,this.openings,this.closingSelector))},e}(),oi=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,M.D)(i,n,n)),i}return r.ZT(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)},t}(N.L),pi=n(45348);function fi(){for(var e=[],t=0;t{"use strict";n.d(t,{ZT:()=>i});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},25307:e=>{e.exports=function(){for(var e={},n=0;n{e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},99418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Struct:()=>l,StructError:()=>r,any:()=>C,array:()=>k,assert:()=>h,assign:()=>b,bigint:()=>I,boolean:()=>M,coerce:()=>Q,create:()=>d,date:()=>N,defaulted:()=>K,define:()=>v,deprecated:()=>y,dynamic:()=>m,empty:()=>X,enums:()=>R,func:()=>A,instance:()=>T,integer:()=>L,intersection:()=>O,is:()=>f,lazy:()=>w,literal:()=>P,map:()=>j,mask:()=>p,max:()=>te,min:()=>ne,never:()=>D,nonempty:()=>re,nullable:()=>B,number:()=>F,object:()=>V,omit:()=>_,optional:()=>H,partial:()=>E,pattern:()=>ie,pick:()=>S,record:()=>z,refine:()=>oe,regexp:()=>U,set:()=>W,size:()=>se,string:()=>Z,struct:()=>x,trimmed:()=>$,tuple:()=>q,type:()=>J,union:()=>G,unknown:()=>Y,validate:()=>g});class r extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...s}=e,{path:o}=e,c=0===o.length?r:"At path: ".concat(o.join(".")," -- ").concat(r);super(null!==i&&void 0!==i?i:c),null!=i&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>{var r;return null!==(r=n)&&void 0!==r?r:n=[e,...t()]}}}function i(e){return"object"===typeof e&&null!=e}function s(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function o(e){return"symbol"===typeof e?e.toString():"string"===typeof e?JSON.stringify(e):"".concat(e)}function c(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:i,branch:s}=t,{type:c}=n,{refinement:a,message:u="Expected a value of type `".concat(c,"`").concat(a?" with refinement `".concat(a,"`"):"",", but received: `").concat(o(r),"`")}=e;return{value:r,type:c,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*a(e,t,n,r){var s;i(s=e)&&"function"===typeof s[Symbol.iterator]||(e=[e]);for(const i of e){const e=c(i,t,n,r);e&&(yield e)}}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:r=[],branch:s=[e],coerce:o=!1,mask:c=!1}=n,a={path:r,branch:s};if(o&&(e=t.coercer(e,a),c&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let l="valid";for(const i of t.validator(e,a))i.explanation=n.message,l="not_valid",yield[i,void 0];for(let[h,d,p]of t.entries(e,a)){const t=u(d,p,{path:void 0===h?r:[...r,h],branch:void 0===h?s:[...s,d],coerce:o,mask:c,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(d=n[1],void 0===h?e=d:e instanceof Map?e.set(h,d):e instanceof Set?e.add(d):i(e)&&(void 0!==d||h in e)&&(e[h]=d))}if("not_valid"!==l)for(const i of t.refiner(e,a))i.explanation=n.message,l="not_refined",yield[i,void 0];"valid"===l&&(yield[void 0,e])}()}class l{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:s=(e=>e),entries:o=function*(){}}=e;this.type=t,this.schema=n,this.entries=o,this.coercer=s,this.validator=r?(e,t)=>a(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>a(i(e,t),t,this,e):()=>[]}assert(e,t){return h(e,this,t)}create(e,t){return d(e,this,t)}is(e){return f(e,this)}mask(e,t){return p(e,this,t)}validate(e){return g(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function h(e,t,n){const r=g(e,t,{message:n});if(r[0])throw r[0]}function d(e,t,n){const r=g(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function p(e,t,n){const r=g(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function f(e,t){return!g(e,t)[0]}function g(e,t){const n=u(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(n);if(i[0]){return[new r(i[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function b(){for(var e=arguments.length,t=new Array(e),n=0;ne.schema)),s=Object.assign({},...i);return r?J(s):V(s)}function v(e,t){return new l({type:e,schema:null,validator:t})}function y(e,t){return new l({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})}function m(e){return new l({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n),refiner:(t,n)=>e(t,n).refiner(t,n)})}function w(e){let t;return new l({type:"lazy",schema:null,*entries(n,r){var i;null!==(i=t)&&void 0!==i||(t=e()),yield*t.entries(n,r)},validator(n,r){var i;return null!==(i=t)&&void 0!==i||(t=e()),t.validator(n,r)},coercer(n,r){var i;return null!==(i=t)&&void 0!==i||(t=e()),t.coercer(n,r)},refiner(n,r){var i;return null!==(i=t)&&void 0!==i||(t=e()),t.refiner(n,r)}})}function _(e,t){const{schema:n}=e,r={...n};for(const i of t)delete r[i];return"type"===e.type?J(r):V(r)}function E(e){const t=e instanceof l?{...e.schema}:{...e};for(const n in t)t[n]=H(t[n]);return V(t)}function S(e,t){const{schema:n}=e,r={};for(const i of t)r[i]=n[i];return V(r)}function x(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),v(e,t)}function C(){return v("any",(()=>!0))}function k(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: ".concat(o(e))})}function I(){return v("bigint",(e=>"bigint"===typeof e))}function M(){return v("boolean",(e=>"boolean"===typeof e))}function N(){return v("date",(e=>e instanceof Date&&!isNaN(e.getTime())||"Expected a valid `Date` object, but received: ".concat(o(e))))}function R(e){const t={},n=e.map((e=>o(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||"Expected one of `".concat(n,"`, but received: ").concat(o(t))})}function A(){return v("func",(e=>"function"===typeof e||"Expected a function, but received: ".concat(o(e))))}function T(e){return v("instance",(t=>t instanceof e||"Expected a `".concat(e.name,"` instance, but received: ").concat(o(t))))}function L(){return v("integer",(e=>"number"===typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: ".concat(o(e))))}function O(e){return new l({type:"intersection",schema:null,*entries(t,n){for(const r of e)yield*r.entries(t,n)},*validator(t,n){for(const r of e)yield*r.validator(t,n)},*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})}function P(e){const t=o(e),n=typeof e;return new l({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `".concat(t,"`, but received: ").concat(o(n))})}function j(e,t){return new l({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,i]of n.entries())yield[r,r,e],yield[r,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||"Expected a `Map` object, but received: ".concat(o(e))})}function D(){return v("never",(()=>!1))}function B(e){return new l({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function F(){return v("number",(e=>"number"===typeof e&&!isNaN(e)||"Expected a number, but received: ".concat(o(e))))}function V(e){const t=e?Object.keys(e):[],n=D();return new l({type:"object",schema:e||null,*entries(r){if(e&&i(r)){const i=new Set(Object.keys(r));for(const n of t)i.delete(n),yield[n,r[n],e[n]];for(const e of i)yield[e,r[e],n]}},validator:e=>i(e)||"Expected an object, but received: ".concat(o(e)),coercer:e=>i(e)?{...e}:e})}function H(e){return new l({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function z(e,t){return new l({type:"record",schema:null,*entries(n){if(i(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>i(e)||"Expected an object, but received: ".concat(o(e))})}function U(){return v("regexp",(e=>e instanceof RegExp))}function W(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||"Expected a `Set` object, but received: ".concat(o(e))})}function Z(){return v("string",(e=>"string"===typeof e||"Expected a string, but received: ".concat(o(e))))}function q(e){const t=D();return new l({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;iArray.isArray(e)||"Expected an array, but received: ".concat(o(e))})}function J(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(n){if(i(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>i(e)||"Expected an object, but received: ".concat(o(e)),coercer:e=>i(e)?{...e}:e})}function G(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const i=[];for(const t of e){const[...e]=u(n,t,r),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return["Expected the value to satisfy a union of `".concat(t,"`, but received: ").concat(o(n)),...i]}})}function Y(){return v("unknown",(()=>!0))}function Q(e,t,n){return new l({...e,coercer:(r,i)=>f(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}function K(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Q(e,Y(),(e=>{const r="function"===typeof t?t():t;if(void 0===e)return r;if(!n.strict&&s(e)&&s(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))}function $(e){return Q(e,Z(),(e=>e.trim()))}function X(e){return oe(e,"empty",(t=>{const n=ee(t);return 0===n||"Expected an empty ".concat(e.type," but received one with a size of `").concat(n,"`")}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{exclusive:r}=n;return oe(e,"max",(n=>r?n2&&void 0!==arguments[2]?arguments[2]:{};const{exclusive:r}=n;return oe(e,"min",(n=>r?n>t:n>=t||"Expected a ".concat(e.type," greater than ").concat(r?"":"or equal to ").concat(t," but received `").concat(n,"`")))}function re(e){return oe(e,"nonempty",(t=>ee(t)>0||"Expected a nonempty ".concat(e.type," but received an empty one")))}function ie(e,t){return oe(e,"pattern",(n=>t.test(n)||"Expected a ".concat(e.type," matching `/").concat(t.source,'/` but received "').concat(n,'"')))}function se(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const r="Expected a ".concat(e.type),i=t===n?"of `".concat(t,"`"):"between `".concat(t,"` and `").concat(n,"`");return oe(e,"size",(e=>{if("number"===typeof e||e instanceof Date)return t<=e&&e<=n||"".concat(r," ").concat(i," but received `").concat(e,"`");if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=n||"".concat(r," with a size ").concat(i," but received one with a size of `").concat(s,"`")}{const{length:s}=e;return t<=s&&s<=n||"".concat(r," with a length ").concat(i," but received one with a length of `").concat(s,"`")}}))}function oe(e,t,n){return new l({...e,*refiner(r,i){yield*e.refiner(r,i);const s=a(n(r,i),i,e,r);for(const e of s)yield{...e,refinement:t}}})}}}]);