1(self.webpackChunkpechakucha_dot_com_v3=self.webpackChunkpechakucha_dot_com_v3||[]).push([[8745],{34501:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;var s=n(43987),o=n(71283),a=n(36910),u=n(46387),c=n(38662),l=n(90389),h=n(24032),d={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PK_API_URL:"https://liveapi.pechakucha.com/",REACT_APP_PK_STRIPE_KEY:"pk_live_CS4Cl41NijtnXgur4memLCID00RrIPmpps",REACT_APP_PK_ENV:"live",REACT_APP_INFURA_API_KEY:"fe27b81a57ac453b9fde945b32c01c04",REACT_APP_PK_WEBSITE_URL:"https://www.pechakucha.com",REACT_APP_PK_API_KEY:"6WdMumlfh26EkJbvGNrbF2xaulxlxUGL5WDcAsXg"}.LINK_API_URL||"https://www.walletlink.org",f={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PK_API_URL:"https://liveapi.pechakucha.com/",REACT_APP_PK_STRIPE_KEY:"pk_live_CS4Cl41NijtnXgur4memLCID00RrIPmpps",REACT_APP_PK_ENV:"live",REACT_APP_INFURA_API_KEY:"fe27b81a57ac453b9fde945b32c01c04",REACT_APP_PK_WEBSITE_URL:"https://www.pechakucha.com",REACT_APP_PK_API_KEY:"6WdMumlfh26EkJbvGNrbF2xaulxlxUGL5WDcAsXg"}.SDK_VERSION||n(39785).i8||"unknown",p=function(){function e(t){var n,i,s;r(this,e),this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;var a,h=t.linkAPIUrl||d;if(a=t.uiConstructor?t.uiConstructor:function(e){return new u.WalletSDKUI(e)},"undefined"===typeof t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(n=t.overrideIsCoinbaseWallet)||void 0===n||n,this._overrideIsCoinbaseBrowser=null!==(i=t.overrideIsCoinbaseBrowser)&&void 0!==i&&i,t.diagnosticLogger&&t.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");t.eventListener?this._diagnosticLogger={log:t.eventListener.onEvent}:this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=null===(s=t.reloadOnDisconnect)||void 0===s||s;var p=new URL(h),g="".concat(p.protocol,"//").concat(p.host);this._storage=new o.ScopedLocalStorage("-walletlink:".concat(g)),this._storage.setItem("version",e.VERSION),this.walletExtension||this.coinbaseBrowser||(this._relayEventManager=new l.WalletSDKRelayEventManager,this._relay=new c.WalletSDKRelay({linkAPIUrl:h,version:f,darkMode:!!t.darkMode,uiConstructor:a,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}return i(e,[{key:"makeWeb3Provider",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,t),!1===this._reloadOnDisconnect&&"function"===typeof n.disableReloadOnDisconnect&&n.disableReloadOnDisconnect(),n;var r=this.coinbaseBrowser;if(r)return r;var i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||i.setConnectDisabled(!0),new a.CoinbaseWalletProvider({relayProvider:function(){return Promise.resolve(i)},relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:t,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}},{key:"setAppInfo",value:function(e,t){var n;this._appName=e||"DApp",this._appLogoUrl=t||(0,h.getFavicon)();var r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}},{key:"disconnect",value:function(){var e,t=this.walletExtension;t?t.close():null===(e=this._relay)||void 0===e||e.resetAndReload()}},{key:"getQrUrl",value:function(){var e,t;return null!==(t=null===(e=this._relay)||void 0===e?void 0:e.getQRCodeUrl())&&void 0!==t?t:null}},{key:"getCoinbaseWalletLogo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;return(0,s.walletLogo)(e,t)}},{key:"walletExtension",get:function(){var e;return null!==(e=window.coinbaseWalletExtension)&&void 0!==e?e:window.walletLinkExtension}},{key:"coinbaseBrowser",get:function(){var e,t;try{var n=null!==(e=window.ethereum)&&void 0!==e?e:null===(t=window.top)||void 0===t?void 0:t.ethereum;if(!n)return;return"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch(r){return}}},{key:"isCipherProvider",value:function(e){return"boolean"===typeof e.isCipher&&e.isCipher}}]),e}();t.CoinbaseWalletSDK=p,p.VERSION=f},43987:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0;t.walletLogo=function(e,t){var n;switch(e){case"standard":default:return n=t,"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E ");case"circle":return n=t,"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='".concat(t,"' height='").concat(n,"' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E");case"text":return n=(.1*t).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(t,"' height='").concat(n,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7
1h-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.8
11,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E")}}},4898:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.LinkFlow=void 0;var s=n(3341),o=n(92001),a=n(87658),u=function(){function e(t){r(this,e),this.extensionUI$=new o.BehaviorSubject({}),this.subscriptions=new o.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}return i(e,[{key:"attach",value:function(e){var t=this;this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((function(e){t.isConnected!==e&&(t.isConnected=e,t.render())})))}},{key:"detach",value:function(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,s.render)(null,this.root),null===(e=this.root.parentElement)||void 0===e||e.removeChild(this.root))}},{key:"setConnectDisabled",value:function(e){this.connectDisabled=e}},{key:"open",value:function(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}},{key:"close",value:function(){this.isOpen=!1,this.onCancel=null,this.render()}},{key:"render",value:function(){var e=this;if(this.root){var t=this.extensionUI$.subscribe((function(){e.root&&(0,s.render)((0,s.h)(a.TryExtensionLinkDialog,{darkMode:e.darkMode,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isOpen:e.isOpen,isConnected:e.isConnected,isParentConnection:e.isParentConnection,onCancel:e.onCancel,connectDisabled:e.connectDisabled}),e.root)}));this.subscriptions.add(t)}}}]),e}();t.LinkFlow=u},41338:function(e,t,n){"use strict";var r=n(97429).Buffer,i=n(27424).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;var o=n(3341),a=n(93312),u=s(n(84281));t.QRCode=function(e){var t=(0,a.useState)(""),n=i(t,2),s=n[0],c=n[1];return(0,a.useEffect)((function(){var t,n,i=new u.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(t=e.width)&&void 0!==t?t:256,height:null!==(n=e.height)&&void 0!==n?n:256,padding:0,image:e.image}),s=r.from(i.svg(),"utf8").toString("base64");c("data:image/svg+xml;base64,".concat(s))})),s?(0,o.h)("img",{src:s,alt:"QR Code"}):null}},10981:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}
1.-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}"},43070:function(e,t,n){"use strict";var r=n(27424).default,i=n(56690).default,s=n(89728).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;var a=o(n(49482)),u=n(3341),c=n(93312),l=o(n(10981)),h=function(){function e(t){i(this,e),this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}return s(e,[{key:"attach",value:function(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}},{key:"presentItem",value:function(e){var t=this,n=this.nextItemKey++;return this.items.set(n,e),this.render(),function(){t.items.delete(n),t.render()}}},{key:"clear",value:function(){this.items.clear(),this.render()}},{key:"render",value:function(){this.root&&(0,u.render)((0,u.h)("div",null,(0,u.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((function(e){var n=r(e,2),i=n[0],s=n[1];return(0,u.h)(t.SnackbarInstance,Object.assign({},s,{key:i}))})))),this.root)}}]),e}();t.Snackbar=h;t.SnackbarContainer=function(e){return(0,u.h)("div",{class:(0,a.default)("-cbwsdk-snackbar-container")},(0,u.h)("style",null,l.default),(0,u.h)("div",{class:"-cbwsdk-snackbar"},e.children))};t.SnackbarInstance=function(e){var t=e.autoExpand,n=e.message,i=e.menuItems,s=(0,c.useState)(!0),o=r(s,2),l=o[0],h=o[1],d=(0,c.useState)(null!==t&&void 0!==t&&t),f=r(d,2),p=f[0],g=f[1];(0,c.useEffect)((function(){var e=[window.setTimeout((function(){h(!1)}),1),window.setTimeout((function(){g(!0)}),1e4)];return function(){e.forEach(window.clearTimeout)}}));return(0,u.h)("div",{class:(0,a.default)("-cbwsdk-snackbar-instance",l&&"-cbwsdk-snackbar-instance-hidden",p&&"-cbwsdk-snackbar-instance-expanded")},(0,u.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:function(){g(!p)}},(0,u.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiA
1wIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,u.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,u.h)("div",{class:"-gear-container"},!p&&(0,u.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,u.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,u.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),i&&i.length>0&&(0,u.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},i.map((function(e,t){return(0,u.h)("div",{class:(0,a.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,u.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,u.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,u.h)("span",{class:(0,a.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))}))))}},83667:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},49505:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var i=n(3341),s=r(n(83667));t.Spinner=function(e){var t,n=null!==(t=e.size)&&void 0!==t?t:64,r=e.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,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}})))}},96197:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='.-cbwsdk-css-reset .-cbwsdk-extension-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-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop-hidden{opacity:0}
1.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top{display:flex;flex-direction:row;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.dark{color:#fff;background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-subtext{margin-top:15px;font-size:12px;line-height:1.5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region button.dark{background-color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.light{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom.dark{background-color:#000;box-shadow:0 4px 16px rgba(255,255,255,.05)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description.dark a{color:#3773f5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1);background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper img{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-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-extension-dialog-box-bottom-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.light>p{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark{background-color:rgba(20,21,25,.9)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.light{background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel.dark{background-color:#141519}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.light::after{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x.dark::after{background-color:#fff}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;
1height:1px;transition:background-color .2s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-a,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-b{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container-hidden{display:none}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.light{color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2.dark{color:#fff}'},87658:function(e,t,n){"use strict";var r=n(27424).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TryExtensionLinkDialog=void 0;var s=i(n(49482)),o=n(3341),a=n(93312),u=n(24032),c=n(87891),l=i(n(16204)),h=i(n(51404)),d=i(n(47884)),f=i(n(69844)),p=n(41338),g=n(49505),m=i(n(96197));t.TryExtensionLinkDialog=function(e){var t=e.isOpen,n=e.darkMode,i=(0,a.useState)(!t),u=r(i,2),c=u[0],l=u[1],h=(0,a.useState)(!t),d=r(h,2),f=d[0],p=d[1];(0,a.useEffect)((function(){var e=[window.setTimeout((function(){p(!t)}),10)];return t?l(!1):e.push(window.setTimeout((function(){l(!0)}),360)),function(){e.forEach(window.clearTimeout)}}),[e.isOpen]);var g=n?"dark":"light";return(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-container",c&&"-cbwsdk-extension-dialog-container-hidden")},(0,o.h)("style",null,m.default),(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-backdrop",g,f&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-cbwsdk-extension-dialog"},(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-box",f&&"-cbwsdk-extension-dialog-box-hidden")},(0,o.h)(v,{darkMode:n,onInstallClick:function(){window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),e.connectDisabled?null:(0,o.h)(b,{darkMode:n,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection}),e.onCancel&&(0,o.h)(w,{darkMode:n,onClick:e.onCancel}))))};var v=function(e){var t=e.darkMode,n=e.onInstallClick,i=(0,a.useState)(!1),u=r(i,2),c=u[0],f=u[1],p=(0,a.useCallback)((function(){c?window.location.reload():(n(),f(!0))}),[n,c]),g=t?"dark":"light";return(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-box-top",g)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,o.h)("h2",{class:g},"Try the Coinbase Wallet extension"),c&&(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,o.h)("button",{type:"button",onClick:p},c?"Refresh":"Install")),(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-box-top-info-region",g)},(0,o.h)(y,{darkMode:t,icon:h.default,text:"Connect to crypto apps with one click"}),(0,o.h)(y,{darkMode:t,icon:d.default,text:"Your private key is stored securely"}),(0,o.h)(y,{darkMode:t,icon:l.default,text:"Works with Ethereum, Polygon, and more"})))},b=function(e){var t=(0,u.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection),n=e.darkMode?"dark":"light";return(0,o.h)("div",{"data-testid":"scan-qr-box",class:(0,s.default)("-cbwsdk-extension-dialog-box-bottom",n)},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",{class:n},"Or scan to connect"),(0,o.h)("body",{class:(0,s.default)("-cbwsdk-extension-dialog-box-bottom-description",n)},"Open"," ",(0,o.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(p.QRCode,{content:t,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:f.default,width:34,he
1ight:34}})),(0,o.h)("input",{type:"hidden",name:"cbwsdk-version",value:c.LIB_VERSION}),(0,o.h)("input",{type:"hidden",value:t}),!e.isConnected&&(0,o.h)("div",{"data-testid":"connecting-spinner",class:(0,s.default)("-cbwsdk-extension-dialog-box-bottom-qr-connecting",n)},(0,o.h)(g.Spinner,{size:36,color:e.darkMode?"#FFF":"#000"}),(0,o.h)("p",null,"Connecting..."))))},y=function(e){var t=e.darkMode?"dark":"light";return(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:e.icon})),(0,o.h)("body",{class:(0,s.default)("-cbwsdk-extension-dialog-box-top-description-text",t)},e.text))},w=function(e){var t=e.darkMode?"dark":"light";return(0,o.h)("button",{type:"button",class:(0,s.default)("-cbwsdk-extension-dialog-box-cancel",t),onClick:e.onClick},(0,o.h)("div",{class:(0,s.default)("-cbwsdk-extension-dialog-box-cancel-x",t)}))}},69844:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},16204:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},51404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},47884:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},52058:function(e,t){"use strict";
1Object.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)}},55554:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0,t.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},88417:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;var s,o=n(92001),a=n(14824);!function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(s=t.ConnectionState||(t.ConnectionState={}));var u=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;r(this,e),this.WebSocketClass=n,this.webSocket=null,this.connectionStateSubject=new o.BehaviorSubject(s.DISCONNECTED),this.incomingDataSubject=ne
1w o.Subject,this.url=t.replace(/^http/,"ws")}return i(e,[{key:"connect",value:function(){var e=this;return this.webSocket?(0,o.throwError)(new Error("webSocket object is not null")):new o.Observable((function(t){var n;try{e.webSocket=n=new e.WebSocketClass(e.url)}catch(r){return void t.error(r)}e.connectionStateSubject.next(s.CONNECTING),n.onclose=function(n){e.clearWebSocket(),t.error(new Error("websocket error ".concat(n.code,": ").concat(n.reason))),e.connectionStateSubject.next(s.DISCONNECTED)},n.onopen=function(n){t.next(),t.complete(),e.connectionStateSubject.next(s.CONNECTED)},n.onmessage=function(t){e.incomingDataSubject.next(t.data)}})).pipe((0,a.take)(1))}},{key:"disconnect",value:function(){var e=this.webSocket;if(e){this.clearWebSocket(),this.connectionStateSubject.next(s.DISCONNECTED);try{e.close()}catch(t){}}}},{key:"connectionState$",get:function(){return this.connectionStateSubject.asObservable()}},{key:"incomingData$",get:function(){return this.incomingDataSubject.asObservable()}},{key:"incomingJSONData$",get:function(){return this.incomingData$.pipe((0,a.flatMap)((function(e){var t;try{t=JSON.parse(e)}catch(n){return(0,o.empty)()}return(0,o.of)(t)})))}},{key:"sendData",value:function(e){var t=this.webSocket;if(!t)throw new Error("websocket is not connected");t.send(e)}},{key:"clearWebSocket",value:function(){var e=this.webSocket;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}]),e}();t.RxWebSocket=u},44295:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isServerMessageFail=void 0,t.isServerMessageFail=function(e){return e&&"Fail"===e.type&&"number"===typeof e.id&&"string"===typeof e.sessionId&&"string"===typeof e.error}},83652:function(e,t,n){"use strict";var r=n(38416).default,i=n(56690).default,s=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKConnection=void 0;var o=n(92001),a=n(14824),u=n(5761),c=n(67453),l=n(52058),h=n(55554),d=n(88417),f=n(44295),p=1e4,g=function(){function e(t,n,r,s){var l=this,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;i(this,e),this.sessionId=t,this.sessionKey=n,this.diagnostic=s,this.subscriptions=new o.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,c.IntNumber)(1),this.connectedSubject=ne
1w o.BehaviorSubject(!1),this.linkedSubject=new o.BehaviorSubject(!1),this.sessionConfigSubject=new o.ReplaySubject(1);var g=new d.RxWebSocket(r+"/rpc",f);this.ws=g,this.subscriptions.add(g.connectionState$.pipe((0,a.tap)((function(e){var n;return null===(n=l.diagnostic)||void 0===n?void 0:n.log(h.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:u.Session.hash(t)})})),(0,a.skip)(1),(0,a.filter)((function(e){return e===d.ConnectionState.DISCONNECTED&&!l.destroyed})),(0,a.delay)(5e3),(0,a.filter)((function(e){return!l.destroyed})),(0,a.flatMap)((function(e){return g.connect()})),(0,a.retry)()).subscribe()),this.subscriptions.add(g.connectionState$.pipe((0,a.skip)(2),(0,a.switchMap)((function(e){return(0,o.iif)((function(){return e===d.ConnectionState.CONNECTED}),l.authenticate().pipe((0,a.tap)((function(e){return l.sendIsLinked()})),(0,a.tap)((function(e){return l.sendGetSessionConfig()})),(0,a.map)((function(e){return!0}))),(0,o.of)(!1))})),(0,a.distinctUntilChanged)(),(0,a.catchError)((function(e){return(0,o.of)(!1)}))).subscribe((function(e){return l.connectedSubject.next(e)}))),this.subscriptions.add(g.connectionState$.pipe((0,a.skip)(1),(0,a.switchMap)((function(e){return(0,o.iif)((function(){return e===d.ConnectionState.CONNECTED}),(0,o.timer)(0,p))}))).subscribe((function(e){return 0===e?l.updateLastHeartbeat():l.heartbeat()}))),this.subscriptions.add(g.incomingData$.pipe((0,a.filter)((function(e){return"h"===e}))).subscribe((function(e){return l.updateLastHeartbeat()}))),this.subscriptions.add(g.incomingJSONData$.pipe((0,a.filter)((function(e){return["IsLinkedOK","Linked"].includes(e.type)}))).subscribe((function(e){var n,r=e;null===(n=l.diagnostic)||void 0===n||n.log(h.EVENTS.LINKED,{sessionIdHash:u.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),l.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(g.incomingJSONData$.pipe((0,a.filter)((function(e){return["GetSessionConfigOK","SessionConfigUpdated"].includes(e.type)}))).subscribe((function(e){var n,r=e;null===(n=l.diagnostic)||void 0===n||n.log(h.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:u.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),l.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}return s(e,[{key:"connect",value:function(){var e;if(this.destroyed)throw new Error("instance is destroyed");null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.STARTED_CONNECTING,{sessionIdHash:u.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}},{key:"destroy",value:function(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(e=this.diagnostic)||void 0===e||e.log(h.EVENTS.DISCONNECTED,{sessionIdHash:u.Session.hash(this.sessionId)}),this.destroyed=!0}},{key:"isDestroyed",get:function(){return this.destroyed}},{key:"connected$",get:function(){return this.connectedSubject.asObservable()}},{key:"onceConnected$",get:function(){return this.connected$.pipe((0,a.filter)((function(e){return e})),(0,a.take)(1),(0,a.map)((function(){})))}},{key:"linked$",get:function(){return this.linkedSubject.asObservable()}},{key:"onceLinked$",get:function(){return this.linked$.pipe((0,a.filter)((function(e){return e})),(0,a.take)(1),(0,a.map)((function(){})))}},{key:"sessionConfig$",get:function(){return this.sessionConfigSubject.asObservable()}},{key:"incomingEvent$",get:function(){return this.ws.incomingJSONData$.pipe((0,a.filter)((function(e){if("Event"!==e.type)return!1;var t=e;return"string"===typeof t.sessionId&&"string"===typeof t.eventId&&"string"===typeof t.event&&"string"===typeof t.data})),(0,a.map)((function(e){return e})))}},{key:"setSessionMetadata",value:function(e,t){var n=this,i=(0,l.ClientMessageSetSessionConfig)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:r({},e,t)});return this.onceConnected$.pipe((0,a.flatMap)((function(e){return n.makeRequest(i)})),(0,a.map)((function(e){if((0,f.isServerMessageFail)(e))throw new Error(e.error||"failed to set session metadata")})))}},{key:"publishEvent",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,l.ClientMessagePublishEvent)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:t,callWebhook:r});return this.onceLinked$.pipe((0,a.flatMap)((function(e){return n.makeRequest
1(i)})),(0,a.map)((function(e){if((0,f.isServerMessageFail)(e))throw new Error(e.error||"failed to publish event");return e.eventId})))}},{key:"sendData",value:function(e){this.ws.sendData(JSON.stringify(e))}},{key:"updateLastHeartbeat",value:function(){this.lastHeartbeatResponse=Date.now()}},{key:"heartbeat",value:function(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}},{key:"makeRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,n=e.id;try{this.sendData(e)}catch(r){return(0,o.throwError)(r)}return this.ws.incomingJSONData$.pipe((0,a.timeoutWith)(t,(0,o.throwError)(new Error("request ".concat(n," timed out")))),(0,a.filter)((function(e){return e.id===n})),(0,a.take)(1))}},{key:"authenticate",value:function(){var e=(0,l.ClientMessageHostSession)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,a.map)((function(e){if((0,f.isServerMessageFail)(e))throw new Error(e.error||"failed to authentcate")})))}},{key:"sendIsLinked",value:function(){var e=(0,l.ClientMessageIsLinked)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}},{key:"sendGetSessionConfig",value:function(){var e=(0,l.ClientMessageGetSessionConfig)({id:(0,c.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}]),e}();t.WalletSDKConnection=g},58745:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;var r=n(34501),i=n(36910),s=n(34501);Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return s.CoinbaseWalletSDK}});var o=n(36910);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)},71283:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;var s=function(){function e(t){r(this,e),this.scope=t}return i(e,[{key:"setItem",value:function(e,t){localStorage.setItem(this.scopedKey(e),t)}},{key:"getItem",value:function(e){return localStorage.getItem(this.scopedKey(e))}},{key:"removeItem",value:function(e){localStorage.removeItem(this.scopedKey(e))}},{key:"clear",value:function(){for(var e=this.scopedKey(""),t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);"string"===typeof r&&r.startsWith(e)&&t.push(r)}t.forEach((function(e){return localStorage.removeItem(e)}))}},{key:"scopedKey",value:function(e){return"".concat(this.scope,":").concat(e)}}]),e}();t.ScopedLocalStorage=s},33594:function(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;bottom:auto;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;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;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;left:auto;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;max-height:none;max-width:none;min-height:0;min-width: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";right:auto;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;top:auto;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;width:auto;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset *{box-sizing:border-box;display:initial;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}'},10915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;var i=r(n(33594));t.injectCssReset=function(){var e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(e)}},36910:function(e,t,n){"use strict";var r=n(97429).Buffer,i=n(861).default,s=n(17061).default,o=n(17156).default,a=n(56690).default,u=n(89728).default,c=n(66115).default,l=n(61655).default,h=n(26389).default,d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;var f=d(n(28050)),p=d(n(27691)),g=n(77829),m=n(55554),v=n(5761),b=n(37558),y=n(24032),w=d(n(12023)),M=n(86118),k=n(66465),E=n(83017),_="DefaultChainId",x="DefaultJsonRpcUrl",S="HasChainBeenSwitched",C="HasChainOverriddenFromRelay",I=function(e){l(n,e);var t=h(n);function n(e){var r,i,s;a(this,n),(r=t.call(this))._filterPolyfill=new M.FilterPolyfill(c(r)),r._subscriptionManager=new E.SubscriptionManager(c(r)),r._relay=null,r._addresses=[],r.hasMadeFirstChainChangedEmission=!1,r._send=r.send.bind(c(r)),r._sendAsync=r.sendAsync.bind(c(r)),r.setProviderInfo=r.setProviderInfo.bind(c(r)),r.updateProviderInfo=r.updateProviderInfo.bind(c(r)),r.getChainId=r.getChainId.bind(c(r)),r.setAppInfo=r.setAppInfo.bind(c(r)),r.enable=r.enable.bind(c(r)),r.close=r.close.bind(c(r)),r.send=r.send.bind(c(r)),r.sendAsync=r.sendAsync.bind(c(r)),r.request=r.request.bind(c(r)),r._setAddresses=r._setAddresses.bind(c(r)),r.scanQRCode=r.scanQRCode.bind(c(r)),r.genericRequest=r.genericRequest.bind(c(r)),r._jsonRpcUrlFromOpts=e.jsonRpcUrl,r._overrideIsMetaMask=e.overrideIsMetaMask,r._relayProvider=e.relayProvider,r._storage=e.storage,r._relayEventManager=e.relayEventManager,r.diagnostic=e.diagnosticLogger,r.reloadOnDisconnect=!0,r.isCoinbaseWallet=null===(i=e.overrideIsCoinbaseWallet)||void 0===i||i,r.isCoinbaseBrowser=null!==(s=e.overrideIsCoinbaseBrowser)&&void 0!==s&&s,r.qrUrl=e.qrUrl,r.supportsAddressSwitching=e.supportsAddressSwitching;var o=r.getChainId(),u=(0,y.prepend0x)(o.toString(16));r.emit("connect",{chainIdStr:u});var l=r._storage.getItem(b.LOCAL_STORAGE_ADDRESSES_KEY);if(l){var h=l.split(" ");""!==h[0]&&(r._addresses=h.map((function(e){return(0,y.ensureAddressString)(e)})),r.emit("accountsChanged",h))}return r._subscriptionManager.events.on("notification",(function(e){r.emit("message",{type:e.method,data:e.params})})),r._addresses.length>0&&r.initializeRelay(),window.addEventListener("message",(function(e){var t;if("walletLinkMessage"===e.data.type){if("defaultChainChanged"===e.data.data.action){var n=e.data.data.chainId,i=null!==(t=e.data.data.jsonRpcUrl)&&void 0!==t?t:r.jsonRpcUrl;r.updateProviderInfo(i,Number(n),!0)}"addressChanged"===e.data.data.action&&r._setAddresses([e.data.data.address])}})),r}return u(n,[{key:"selectedAddress",get:function(){return this._addresses[0]||void 0}},{key:"networkVersion",get:function(){return this.getChainId().toString(10)}},{key:"chainId",get:function(){return(0,y.prepend0x)(this.getChainId().toString(16))}},{key:"isWalletLink",get:function(){return!0}},{key:"isMetaMask",get:function(){return this._overrideIsMetaMask}},{key:"host",get:function(){return this.jsonRpcUrl}},{key:"connected",get:function(){return!0}},{key:"isConnected",value:function(){return!0}},{key:"jsonRpcUrl",get:function(){var e;return null!==(e=this._storage.getItem(x))&&void 0!==e?e:this._jsonRpcUrlFromOpts},set:function(e){this._storage.setItem(x,e)}}
1,{key:"isChainOverridden",get:function(){return"true"===this._storage.getItem(C)},set:function(e){this._storage.setItem(C,e.toString())}},{key:"disableReloadOnDisconnect",value:function(){this.reloadOnDisconnect=!1}},{key:"setProviderInfo",value:function(e,t){this.isChainOverridden||this.updateProviderInfo(e,this.getChainId(),!1)}},{key:"updateProviderInfo",value:function(e,t,n){if(!("true"===this._storage.getItem(S))||!n){n&&(this.isChainOverridden=!0),this.jsonRpcUrl=e;var r=this.getChainId();this._storage.setItem(_,t.toString(10)),!((0,y.ensureIntNumber)(t)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}}},{key:"watchAsset",value:function(){var e=o(s().mark((function e(t,n,r,i,o,a){var u,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return u=e.sent,e.next=5,u.watchAsset(t,n,r,i,o,null===a||void 0===a?void 0:a.toString()).promise;case 5:return c=e.sent,e.abrupt("return",!!c.result);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,s,o){return e.apply(this,arguments)}}()},{key:"addEthereumChain",value:function(){var e=o(s().mark((function e(t,n,r,i,o,a){var u,c,l,h,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,y.ensureIntNumber)(t)!==this.getChainId()){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,this.initializeRelay();case 4:if(l=e.sent,h=l.inlineAddEthereumChain(t.toString()),this._isAuthorized()||h){e.next=9;break}return e.next=9,l.requestEthereumAccounts().promise;case 9:return e.next=11,l.addEthereumChain(t.toString(),n,o,r,i,a).promise;case 11:return d=e.sent,!0===(null===(u=d.result)||void 0===u?void 0:u.isApproved)&&(this._storage.setItem(S,"true"),this.updateProviderInfo(n[0],t,!1)),e.abrupt("return",!0===(null===(c=d.result)||void 0===c?void 0:c.isApproved));case 14:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,s,o){return e.apply(this,arguments)}}()},{key:"switchEthereumChain",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,y.ensureIntNumber)(t)!==this.getChainId()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.initializeRelay();case 4:return n=e.sent,e.next=7,n.switchEthereumChain(t.toString(10)).promise;case 7:if(!(r=e.sent).errorCode){e.next=10;break}throw g.ethErrors.provider.custom({code:r.errorCode});case 10:(i=r.result).isApproved&&i.rpcUrl.length>0&&(this._storage.setItem(S,"true"),this.updateProviderInfo(i.rpcUrl,t,!1));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppInfo",value:function(e,t){this.initializeRelay().then((function(n){return n.setAppInfo(e,t)}))}},{key:"enable",value:function(){var e=o(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.diagnostic)||void 0===t||t.log(m.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?v.Session.hash(this._relay.session.id):void 0}),!(this._addresses.length>0)){e.next=3;break}return e.abrupt("return",i(this._addresses));case 3:return e.next=5,this._send(k.JSONRPCMethod.eth_requestAccounts);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=o(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:e.sent.resetAndReload();case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"send",value:function(e,t){var n=this;if("string"===typeof e){var r={jsonrpc:"2.0",id:0,method:e,params:Array.isArray(t)?t:void 0!==t?[t]:[]};return this._sendRequestAsync(r).then((function(e){return e.result}))}if("function"===typeof t){var i=e,s=t;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map((function(e){return n._sendRequest(e)}));var o=e;return this._sendRequest(o)}},{key:"sendAsync",value:function(){var e=o(s().mark((function e(t,n){var r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"===typeof n){e.next=2;break}throw new Error("callback is required");case 2:if(!Array.isArray(t)){e.next=6;break}return r=n,this._sendMultipleRequestsAsync(t).then((function(e){return r(null,e)}
1)).catch((function(e){return r(e,null)})),e.abrupt("return");case 6:return i=n,e.abrupt("return",this._sendRequestAsync(t).then((function(e){return i(null,e)})).catch((function(e){return i(e,null)})));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"request",value:function(){var e=o(s().mark((function e(t){var n,r,i,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&"object"===typeof t&&!Array.isArray(t)){e.next=2;break}throw g.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});case 2:if(n=t.method,r=t.params,"string"===typeof n&&0!==n.length){e.next=5;break}throw g.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});case 5:if(void 0===r||Array.isArray(r)||"object"===typeof r&&null!==r){e.next=7;break}throw g.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});case 7:return i=void 0===r?[]:r,o=this._relayEventManager.makeRequestId(),e.next=11,this._sendRequestAsync({method:n,params:i,jsonrpc:"2.0",id:o});case 11:return a=e.sent,e.abrupt("return",a.result);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"scanQRCode",value:function(){var e=o(s().mark((function e(t){var n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return n=e.sent,e.next=5,n.scanQRCode((0,y.ensureRegExpString)(t)).promise;case 5:if("string"===typeof(r=e.sent).result){e.next=8;break}throw new Error("result was not a string");case 8:return e.abrupt("return",r.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"genericRequest",value:function(){var e=o(s().mark((function e(t,n){var r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return r=e.sent,e.next=5,r.genericRequest(t,n).promise;case 5:if("string"===typeof(i=e.sent).result){e.next=8;break}throw new Error("result was not a string");case 8:return e.abrupt("return",i.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"selectProvider",value:function(){var e=o(s().mark((function e(t){var n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return n=e.sent,e.next=5,n.selectProvider(t).promise;case 5:if("string"===typeof(r=e.sent).result){e.next=8;break}throw new Error("result was not a string");case 8:return e.abrupt("return",r.result);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"supportsSubscriptions",value:function(){return!1}},{key:"subscribe",value:function(){throw new Error("Subscriptions are not supported")}},{key:"unsubscribe",value:function(){throw new Error("Subscriptions are not supported")}},{key:"disconnect",value:function(){return!0}},{key:"_sendRequest",value:function(e){var t={jsonrpc:"2.0",id:e.id},n=e.method;if(t.result=this._handleSynchronousMethods(e),void 0===t.result)throw new Error("Coinbase Wallet does not support calling ".concat(n," synchronously without ")+"a callback. Please provide a callback parameter to call ".concat(n," ")+"asynchronously.");return t}},{key:"_setAddresses",value:function(e,t){if(!Array.isArray(e))throw new Error("addresses is not an array");var n=e.map((function(e){return(0,y.ensureAddressString)(e)}));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching&&!t||(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(b.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" "))))}},{key:"_sendRequestAsync",value:function(e){var t=this;return new Promise((function(n,r){try{var i=t._handleSynchronousMethods(e);if(void 0!==i)return n({jsonrpc:"2.0",id:e.id,result:i});var s=t._handleAsynchronousFilterMethods(e);if(void 0!==s)return void s.then((function(t){return n(Object.assign(Object.assign({},t),{id:e.id}))})).catch((function(e){return r(e)}));var o=t._handleSubscriptionMethods(e);if(void 0!==o)return void o.then((function(t){return n({jsonrpc:"2.0",id:e.id,result:t.result})})).catch((function(e){return r(e)}))}catch(a){return r(a)}t._handleAsynchronousMethods(e).then((function(t){return t&&n(Object.assign(Object.assign({},t),{id:e.id}))})).catch((function(e){return r(e)}))}))}},{key:"_sendMultipleRequestsAsync",value:function(e){var t=this;return Promise.all(e.map((function(e){return t._sendRequestAsync(e)})))}},{key:"_handleSynchronousMethods",value:function(e){var t=e.method,n=e.params||[];switch(t){case k.JSONRPCMethod.eth_accounts:return this._eth_accounts();case k.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case k.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case k.JSONRPCMethod.net_version:return this._net_version();case k.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}},{key:"_handleAsynchronousMethods",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.method,r=t.params||[],e.t0=n,e.next=e.t0===k.JSONRPCMethod.eth_requestAccounts?5:e.t0===k.JSONRPCMethod.eth_sign?6:e.t0===k.JSONRPCMethod.eth_ecRecover?7:e.t0===k.JSONRPCMethod.personal_sign?8:e.t0===k.JSONRPCMethod.personal_ecRecover?9:e.t0===k.JSONRPCMethod.eth_signTransaction?10:e.t0===k.JSONRPCMethod.eth_sendRawTransaction?11:e.t0===k.JSONRPCMethod.eth_sendTransaction?12:e.t0===k.JSONRPCMethod.eth_signTypedData_v1?13:e.t0===k.JSONRPCMethod.eth_signTypedData_v2?14:e.t0===k.JSONRPCMethod.eth_signTypedData_v3?15:e.t0===k.JSONRPCMethod.eth_signTypedData_v4||e.t0===k.JSONRPCMethod.eth_signTypedData?16:e.t0===k.JSONRPCMethod.cbWallet_arbitrary?17:e.t0===k.JSONRPCMethod.wallet_addEthereumChain?18:e.t0===k.JSONRPCMethod.wallet_switchEthereumChain?19:e.t0===k.JSONRPCMethod.wallet_watchAsset?20:21;break;case 5:return e.abrupt("return",this._eth_requestAccounts());case 6:return e.abrupt("return",this._eth_sign(r));case 7:return e.abrupt("return",this._eth_ecRecover(r));case 8:return e.abrupt("return",this._personal_sign(r));case 9:return e.abrupt("return",this._personal_ecRecover(r));case 10:return e.abrupt("return",this._eth_signTransaction(r));case 11:return e.abrupt("return",this._eth_sendRawTransaction(r));case 12:return e.abrupt("return",this._eth_sendTransaction(r));case 13:return e.abrupt("return",this._eth_signTypedData_v1(r));case 14:return e.abrupt("return",this._throwUnsupportedMethodError());case 15:return e.abrupt("return",this._eth_signTypedData_v3(r));case 16:return e.abrupt("return",this._eth_signTypedData_v4(r));case 17:return e.abrupt("return",this._cbwallet_arbitrary(r));case 18:return e.abrupt("return",this._wallet_addEthereumChain(r));case 19:return e.abrupt("return",this._wallet_switchEthereumChain(r));case 20:return e.abrupt("return",this._wallet_watchAsset(r));case 21:return e.next=23,this.initializeRelay();case 23:return i=e.sent,e.abrupt("return",i.makeEthereumJSONRPCRequest(t,this.jsonRpcUrl));case 25:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_handleAsynchronousFilterMethods",value:function(e){var t=e.method,n=e.params||[];switch(t){case k.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case k.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case k.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case k.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case k.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}},{key:"_handleSubscriptionMethods",value:function(e){switch(e.method){case k.JSONRPCMethod.eth_subscribe:case k.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}},{key:"_isKnownAddress",value:function(e){try{var t=(0,y.ensureAddressString)(e);return this._addresses.map((function(e){return(0,y.ensureAddressString)(e)})).includes(t)}catch(n){}return!1}},{key:"_ensureKnownAddress",value:function(e){var t;if(!this._isKnownAddress(e))throw null===(t=this.diagnostic)||void 0===t||t.log(m.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}},{key:"_prepareTransactionParams",value:function(e){var t=e.from?(0,y.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(t),{fromAddress:t,toAddress:e.to?(0,y.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,y.ensureBN)(e.value):new p.default(0),data:e.data?(0,y.ensureBuffer)(e.data):r.alloc(0),nonce:null!=e.nonce?(0,y.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,y.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,y.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,y.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,y.ensureBN)(e.gas):null,chainId:this.getChainId()}}},{key:"_isAuthorized",value:function(){return this._addresses.length>0}},{key:"_requireAuthorization",value:function(){if(!this._isAuthorized())throw g.ethErrors.provider.unauthorized({})}},{key:"_throwUnsupportedMethodError",value:function(){throw g.ethErrors.provider.unsupportedMethod({})}},{key:"_signEthereumMessage",value:function(){var e=o(s().mark((function e(t,n,r,i){var o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._ensureKnownAddress(n),e.prev=1,e.next=4,this.initializeRelay();case 4:return o=e.sent,e.next=7,o.signEthereumMessage(t,n,r,i).promise;case 7:return a=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:a.result});case 11:if(e.prev=11,e.t0=e.catch(1),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.
1next=15;break}throw g.ethErrors.provider.userRejectedRequest("User denied message signature");case 15:throw e.t0;case 16:case"end":return e.stop()}}),e,this,[[1,11]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_ethereumAddressFromSignedMessage",value:function(){var e=o(s().mark((function e(t,n,r){var i,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initializeRelay();case 2:return i=e.sent,e.next=5,i.ethereumAddressFromSignedMessage(t,n,r).promise;case 5:return o=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:o.result});case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_eth_accounts",value:function(){return i(this._addresses)}},{key:"_eth_coinbase",value:function(){return this.selectedAddress||null}},{key:"_net_version",value:function(){return this.getChainId().toString(10)}},{key:"_eth_chainId",value:function(){return(0,y.hexStringFromIntNumber)(this.getChainId())}},{key:"getChainId",value:function(){var e=this._storage.getItem(_)||"1",t=parseInt(e,10);return(0,y.ensureIntNumber)(t)}},{key:"_eth_requestAccounts",value:function(){var e=o(s().mark((function e(){var t,n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.diagnostic)||void 0===t||t.log(m.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?v.Session.hash(this._relay.session.id):void 0}),!(this._addresses.length>0)){e.next=3;break}return e.abrupt("return",Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses}));case 3:return e.prev=3,e.next=6,this.initializeRelay();case 6:return r=e.sent,e.next=9,r.requestEthereumAccounts().promise;case 9:n=e.sent,e.next=17;break;case 12:if(e.prev=12,e.t0=e.catch(3),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=16;break}throw g.ethErrors.provider.userRejectedRequest("User denied account authorization");case 16:throw e.t0;case 17:if(n.result){e.next=19;break}throw new Error("accounts received is empty");case 19:return this._setAddresses(n.result),e.abrupt("return",{jsonrpc:"2.0",id:0,result:this._addresses});case 21:case"end":return e.stop()}}),e,this,[[3,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_sign",value:function(e){this._requireAuthorization();var t=(0,y.ensureAddressString)(e[0]),n=(0,y.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}},{key:"_eth_ecRecover",value:function(e){var t=(0,y.ensureBuffer)(e[0]),n=(0,y.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}},{key:"_personal_sign",value:function(e){this._requireAuthorization();var t=(0,y.ensureBuffer)(e[0]),n=(0,y.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}},{key:"_personal_ecRecover",value:function(e){var t=(0,y.ensureBuffer)(e[0]),n=(0,y.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}},{key:"_eth_signTransaction",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=this._prepareTransactionParams(t[0]||{}),e.prev=2,e.next=5,this.initializeRelay();case 5:return r=e.sent,e.next=8,r.signEthereumTransaction(n).promise;case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 12:if(e.prev=12,e.t0=e.catch(2),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.next=16;break}throw g.ethErrors.provider.userRejectedRequest("User denied transaction signature");case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_sendRawTransaction",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,y.ensureBuffer)(t[0]),e.next=3,this.initializeRelay();case 3:return r=e.sent,e.next=6,r.submitEthereumTransaction(n,this.getChainId()).promise;case 6:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_sendTransaction",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=this._prepareTransactionParams(t[0]||{}),e.prev=2,e.next=5,this.initializeRelay();case 5:return r=e.sent,e.next=8,r.signAndSubmitEthereumTransaction(n).promise;case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i.result});case 12:if(e.prev=12,e.t0=e.catch(2),"string"!==typeof e.t0.message||!e.t0.message.match(/(denied|rejected)/i)){e.
1next=16;break}throw g.ethErrors.provider.userRejectedRequest("User denied transaction signature");case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v1",value:function(){var e=o(s().mark((function e(t){var n,r,i,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,y.ensureParsedJSONObject)(t[0]),r=(0,y.ensureAddressString)(t[1]),this._ensureKnownAddress(r),i=w.default.hashForSignTypedDataLegacy({data:n}),o=JSON.stringify(n,null,2),e.abrupt("return",this._signEthereumMessage(i,r,!1,o));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v3",value:function(){var e=o(s().mark((function e(t){var n,r,i,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,y.ensureAddressString)(t[0]),r=(0,y.ensureParsedJSONObject)(t[1]),this._ensureKnownAddress(n),i=w.default.hashForSignTypedData_v3({data:r}),o=JSON.stringify(r,null,2),e.abrupt("return",this._signEthereumMessage(i,n,!1,o));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_signTypedData_v4",value:function(){var e=o(s().mark((function e(t){var n,r,i,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._requireAuthorization(),n=(0,y.ensureAddressString)(t[0]),r=(0,y.ensureParsedJSONObject)(t[1]),this._ensureKnownAddress(n),i=w.default.hashForSignTypedData_v4({data:r}),o=JSON.stringify(r,null,2),e.abrupt("return",this._signEthereumMessage(i,n,!1,o));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_cbwallet_arbitrary",value:function(){var e=o(s().mark((function e(t){var n,r,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t[0],"string"===typeof(r=t[1])){e.next=4;break}throw new Error("parameter must be a string");case 4:if("object"===typeof n&&null!==n){e.next=6;break}throw new Error("parameter must be an object");case 6:return e.next=8,this.genericRequest(n,r);case 8:return i=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:i});case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_addEthereumChain",value:function(){var e=o(s().mark((function e(t){var n,r,i,o,a,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t[0],0!==(null===(n=a.rpcUrls)||void 0===n?void 0:n.length)){e.next=3;break}return e.abrupt("return",{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}});case 3:if(a.chainName&&""!==a.chainName.trim()){e.next=5;break}throw g.ethErrors.provider.custom({code:0,message:"chainName is a required field"});case 5:if(a.nativeCurrency){e.next=7;break}throw g.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});case 7:return u=parseInt(a.chainId,16),e.next=10,this.addEthereumChain(u,null!==(r=a.rpcUrls)&&void 0!==r?r:[],null!==(i=a.blockExplorerUrls)&&void 0!==i?i:[],a.chainName,null!==(o=a.iconUrls)&&void 0!==o?o:[],a.nativeCurrency);case 10:if(!e.sent){e.next=15;break}return e.abrupt("return",{jsonrpc:"2.0",id:0,result:null});case 15:return e.abrupt("return",{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}});case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_switchEthereumChain",value:function(){var e=o(s().mark((function e(t){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],e.next=3,this.switchEthereumChain(parseInt(n.chainId,16));case 3:return e.abrupt("return",{jsonrpc:"2.0",id:0,result:null});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_wallet_watchAsset",value:function(){var e=o(s().mark((function e(t){var n,r,i,o,a,u,c,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=Array.isArray(t)?t[0]:t).type){e.next=3;break}throw g.ethErrors.rpc.invalidParams({message:"Type is required"});case 3:if("ERC20"===(null===n||void 0===n?void 0:n.type)){e.next=5;break}throw g.ethErrors.rpc.invalidParams({message:"Asset of type '".concat(n.type,"' is not supported")});case 5:if(null===n||void 0===n?void 0:n.options){e.next=7;break}throw g.ethErrors.rpc.invalidParams({message:"Options are required"});case 7:if(null===n||void 0===n?void 0:n.options.address){e.next=9;break}throw g.ethErrors.rpc.invalidParams({message:"Address is required"});case 9:return r=this.getChainId(),i=n.options,o=i.address,a=i.symbol,u=i.image,c=i.decimals,e.next=13,this.watchAsset(n.type,o,a,c,u,r);case 13:return l=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:l});case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_uninstallFilter",value:function(e){var t=(0,y.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(t)}},{key:"_eth_newFilter",value:function(){var e=o(s().mark((function e(t){var n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t[0],e.next=3,this._filterPolyfill.newFilter(n);case 3:return r=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:r});case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_eth_newBlockFilter",value:function(){var e=o(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._filterPolyfill.newBlockFilter();case 2:return t=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:t});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_newPendingTransactionFilter",value:function(){var e=o(s().mark((function e(){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._filterPolyfill.newPendingTransactionFilter();case 2:return t=e.sent,e.abrupt("return",{jsonrpc:"2.0",id:0,result:t});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_eth_getFilterChanges",value:function(e){var t=(0,y.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(t)}},{key:"_eth_getFilterLogs",value:function(e){var t=(0,y.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(t)}},{key:"initializeRelay",value:function(){var e=this;return this._relay?Promise.resolve(this._relay):this._relayProvider().then((function(t){return t.setAccountsCallback((function(t,n){return e._setAddresses(t,n)})),t.setChainCallback((function(t,n){e.updateProviderInfo(n,parseInt(t,10),!0)})),e._relay=t,t}))}}]),n}(f.default);t.CoinbaseWalletProvider=I},86118:function(e,t,n){"use strict";var r=n(861).default,i=n(17061).default,s=n(17156).default,o=n(56690).default,a=n(89728).default;
1Object.defineProperty(t,"__esModule",{value:!0}),t.filterFromParam=t.FilterPolyfill=void 0;var u=n(67453),c=n(24032),l={jsonrpc:"2.0",id:0},h=function(){function e(t){o(this,e),this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,u.IntNumber)(1),this.provider=t}return a(e,[{key:"newFilter",value:function(){var e=s(i().mark((function e(t){var n,r,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d(t),r=this.makeFilterId(),e.next=4,this.setInitialCursorPosition(r,n.fromBlock);case 4:return s=e.sent,console.log("Installing new log filter(".concat(r,"):"),n,"initial cursor position:",s),this.logFilters.set(r,n),this.setFilterTimeout(r),e.abrupt("return",(0,c.hexStringFromIntNumber)(r));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"newBlockFilter",value:function(){var e=s(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return n=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),n),this.blockFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,c.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"newPendingTransactionFilter",value:function(){var e=s(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.makeFilterId(),e.next=3,this.setInitialCursorPosition(t,"latest");case 3:return n=e.sent,console.log("Installing new block filter (".concat(t,") with initial cursor position:"),n),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),e.abrupt("return",(0,c.hexStringFromIntNumber)(t));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"uninstallFilter",value:function(e){var t=(0,c.intNumberFromHexString)(e);return console.log("Uninstalling filter (".concat(t,")")),this.deleteFilter(t),!0}},{key:"getFilterChanges",value:function(e){var t=(0,c.intNumberFromHexString)(e);return this.timeouts.has(t)&&this.setFilterTimeout(t),this.logFilters.has(t)?this.getLogFilterChanges(t):this.blockFilters.has(t)?this.getBlockFilterChanges(t):this.pendingTransactionFilters.has(t)?this.getPendingTransactionFilterChanges(t):Promise.resolve(m())}},{key:"getFilterLogs",value:function(){var e=s(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,c.intNumberFromHexString)(t),r=this.logFilters.get(n)){e.next=4;break}return e.abrupt("return",m());case 4:return e.abrupt("return",this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getLogs",params:[f(r)]})));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"makeFilterId",value:function(){return(0,u.IntNumber)(++this.nextFilterId)}},{key:"sendAsyncPromise",value:function(e){var t=this;return new Promise((function(n,r){t.provider.sendAsync(e,(function(e,t){return e?r(e):Array.isArray(t)||null==t?r(new Error("unexpected response received: ".concat(JSON.stringify(t)))):void n(t)}))}))}},{key:"deleteFilter",value:function(e){console.log("Deleting filter (".concat(e,")")),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}},{key:"getLogFilterChanges",value:function(){var e=s(i().mark((function e(t){var n,s,o,a,h,d,p,g;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.logFilters.get(t),(s=this.cursors.get(t))&&n){e.next=4;break}return e.abrupt("return",m());case 4:return e.next=6,this.getCurrentBlockHeight();case 6:if(o=e.sent,a="latest"===n.toBlock?o:n.toBlock,!(s>o)){e.next=10;break}return e.abrupt("return",v());case 10:if(!(s>n.toBlock)){e.next=12;break}return e.abrupt("return",v());case 12:return console.log("Fetching logs from ".concat(s," to ").concat(a," for filter ").concat(t)),e.next=15,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getLogs",params:[f(Object.assign(Object.assign({},n),{fromBlock:s,toBlock:a}))]}));case 15:return h=e.sent,Array.isArray(h.result)&&(d=h.result.map((function(e){return(0,c.intNumberFromHexString)(e.blockNumber||"0x0")})),(p=Math.max.apply(Math,r(d)))&&p>s&&(g=(0,u.IntNumber)(p+1),console.log("Moving cursor position for filter (".concat(t,") from ").concat(s," to ").concat(g)),this.cursors.set(t,g))),e.abrupt("return",h);case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getBlockFilterChanges",value:function(){var e=s(i().mark((function e(t){var n,r,s,o,a=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.cursors.get(t)){e.next=3;break}return e.abrupt("return",m());case 3:return e.next=5,this.getCurrentBlockHeight();case 5:if(r=e.sent,!(n>r)){e.next=8;break}return e.abrupt("return",v());case 8:return console.log("Fetching blocks from ".concat(n," to ").concat(r," for filter (").concat(t,")")),e.next=11,Promise.all((0,c.range)(n,r+1).map((function(e){return a.getBlockHashByNumber((0,u.IntNumber)(e))})));case 11:return s=e.sent.filter((function(e){return!!e})),o=(0,u.IntNumber)(n+s.length),console.log("Moving cursor position for filter (".concat(t,") from ").concat(n," to ").concat(o)),this.cursors.set(t,o),e.abrupt("return",Object.assign(Object.assign({},l),{result:s}));case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getPendingTransactionFilterChanges",value:function(){var e=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(v()));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setInitialCursorPosition",value:function(){var e=s(i().mark((function e(t,n){var r,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentBlockHeight();case 2:return r=e.sent,s="number"===typeof n&&n>r?n:r,this.cursors.set(t,s),e.abrupt("return",s);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setFilterTimeout",value:function(e){var t=this,n=this.timeouts.get(e);n&&window.clearTimeout(n);var r=window.setTimeout((function(){console.log("Filter (".concat(e,") timed out")),t.deleteFilter(e)}),3e5);this.timeouts.set(e,r)}},{key:"getCurrentBlockHeight",value:function(){var e=s(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_blockNumber",params:[]}));case 2:return t=e.sent,n=t.result,e.abrupt("return",(0,c.intNumberFromHexString)((0,c.ensureHexString)(n)));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getBlockHashByNumber",value:function(){var e=s(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendAsyncPromise(Object.assign(Object.assign({},l),{method:"eth_getBlockByNumber",params:[(0,c.hexStringFromIntNumber)(t),!1]}));case 2:if(!(n=e.sent).result||"string"!==typeof n.result.hash){e.next=5;break}return e.abrupt("return",(0,c.ensureHexString)(n.result.hash));case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function d(e){return{fromBlock:p(e.fromBlock),toBlock:p(e.toBlock),addresses:void 0===e.address?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}function f(e){var t={fromBlock:g(e.fromBlock),toBlock:g(e.toBlock),topics:e.topics};return null!==e.addresses&&(t.address=e.addresses),t}function p(e){if(void 0===e||"latest"===e||"pending"===e)return"latest";if("earliest"===e)return(0,u.IntNumber)(0);if((0,c.isHexString)(e))return(0,c.intNumberFromHexString)(e);throw new Error("Invalid block option: ".concat(String(e)))}function g(e){return"latest"===e?e:(0,c.hexStringFromIntNumber)(e)}function m(){return Object.assign(Object.assign({},l),{error:{code:-32e3,message:"filter not found"}})}function v(){return Object.assign(Object.assign({},l),{result:[]})}t.FilterPolyfill=h,t.filterFromParam=d},66465:function(e,t){"use strict";
1Object.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={}))},83017:function(e,t,n){"use strict";var r=n(17061).default,i=n(17156).default,s=n(56690).default,o=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionManager=void 0;var a=n(61909),u=n(40390),c=function(){},l=function(){function e(t){s(this,e);var n=new a({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),r=u({blockTracker:n,provider:t}),i=r.events,o=r.middleware;this.events=i,this.subscriptionMiddleware=o}return o(e,[{key:"handleRequest",value:function(){var e=i(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,this.subscriptionMiddleware(t,n,c,c);case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this.subscriptionMiddleware.destroy()}}]),e}();t.SubscriptionManager=l},46387:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKUI=void 0;var s=n(4898),o=n(43070),a=n(10915),u=function(){function e(t){r(this,e),this.standalone=null,this.attached=!1,this.snackbar=new o.Snackbar({darkMode:t.darkMode}),this.linkFlow=new s.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}return i(e,[{key:"attach",value:function(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");var e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.linkFlow.attach(t),this.snackbar.attach(t),this.attached=!0,(0,a.injectCssReset)()}},{key:"setConnectDisabled",value:function(e){this.linkFlow.setConnectDisabled(e)}},{key:"addEthereumChain",value:function(e){}},{key:"watchAsset",value:function(e){}},{key:"switchEthereumChain",value:function(e){}},{key:"requestEthereumAccounts",value:function(e){this.linkFlow.open({onCancel:e.onCancel})}},{key:"hideRequestEthereumAccounts",value:function(){this.linkFlow.close()}},{key:"signEthereumMessage",value:function(e){}},{key:"signEthereumTransaction",value:function(e){}},{key:"submitEthereumTransaction",value:function(e){}},{key:"ethereumAddressFromSignedMessage",value:function(e){}},{key:"showConnecting",value:function(e){var t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",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.9687
15ZM2.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",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}},{key:"reloadUI",value:function(){document.location.reload()}},{key:"inlineAccountsResponse",value:function(){return!1}},{key:"inlineAddEthereumChain",value:function(e){return!1}},{key:"inlineWatchAsset",value:function(){return!1}},{key:"inlineSwitchEthereumChain",value:function(){return!1}},{key:"setStandalone",value:function(e){this.standalone=e}},{key:"isStandalone",value:function(){var e;return null!==(e=this.standalone)&&void 0!==e&&e}}]),e}();t.WalletSDKUI=u},93269:function(e,t,n){"use strict";var r=n(89728).default,i=n(56690).default,s=n(61655).default,o=n(26389).default,a=n(33496).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletUIError=void 0;var u=function(e){s(n,e);var t=o(n);function n(e,r){var s;return i(this,n),(s=t.call(this,e)).message=e,s.errorCode=r,s}return r(n)}(a(Error));t.WalletUIError=u,u.UserRejectedRequest=new u("User rejected request"),u.SwitchEthereumChainUnsupportedChainId=new u("Unsupported chainId",4902)},91865:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))},5761:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;var s=n(92001),o=n(14824),a=n(33031),u=n(24032),c="session:id",l="session:secret",h="session:linked",d=function(){function e(t,n,i,s){r(this,e),this._storage=t,this._id=n||(0,u.randomBytesHex)(16),this._secret=i||(0,u.randomBytesHex)(32),this._key=(new a.sha256).update("".concat(this._id,", ").concat(this._secret," WalletLink")).digest("hex"),this._linked=!!s}return i(e,[{key:"id",get:function(){return this._id}},{key:"secret",get:function(){return this._secret}},{key:"key",get:function(){return this._key}},{key:"linked",get:function(){return this._linked},set:function(e){this._linked=e,this.persistLinked()}},{key:"save",value:function(){return this._storage.setItem(c,this._id),this._storage.setItem(l,this._secret),this.persistLinked(),this}},{key:"persistLinked",value:function(){this._storage.setItem(h,this._linked?"1":"0")}}],[{key:"load",value:function(t){var n=t.getItem(c),r=t.getItem(h),i=t.getItem(l);return n&&i?new e(t,n,i,"1"===r):null}},{key:"persistedSessionIdChange$",get:function(){return(0,s.fromEvent)(window,"storage").pipe((0,o.filter)((function(e){return e.key===c})),(0,o.map)((function(e){return{oldValue:e.oldValue||null,newValue:e.newValue||null}})))}},{key:"hash",value:function(e){return(new a.sha256).update(e).digest("hex")}}]),e}();t.Session=d},38662:function(e,t,n){"use strict";var r=n(27424).default,i=n(56690).default,s=n(89728).default,o=n(61655).default,a=n(26389).default,u=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__decorate||function(e,t,n,r){var i,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 a=e.length-1;a>=0;a--)(i=e[a])&&(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}
1,h=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)&&u(t,e,n);return c(t,e),t},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelay=void 0;var f=d(n(89144)),p=n(77829),g=n(92001),m=n(14824),v=n(55554),b=n(83652),y=n(93269),w=n(67453),M=n(24032),k=h(n(37530)),E=n(5761),_=n(37558),x=n(76795),S=n(21317),C=n(98507),I=n(15373),A=n(48427),N=function(e){o(n,e);var t=a(n);function n(e){var r,s;i(this,n),(r=t.call(this)).accountsCallback=null,r.chainCallback=null,r.appName="",r.appLogoUrl=null,r.subscriptions=new g.Subscription,r.linkAPIUrl=e.linkAPIUrl,r.storage=e.storage,r.options=e;var o=r.subscribe(),a=o.session,u=o.ui,c=o.connection;if(r._session=a,r.connection=c,r.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");return e.eventListener?r.diagnostic={log:e.eventListener.onEvent}:r.diagnostic=e.diagnosticLogger,r._reloadOnDisconnect=null===(s=e.reloadOnDisconnect)||void 0===s||s,r.ui=u,r}return s(n,[{key:"subscribe",value:function(){var e=this,t=E.Session.load(this.storage)||new E.Session(this.storage).save(),i=new b.WalletSDKConnection(t.id,t.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(i.sessionConfig$.subscribe({next:function(t){e.onSessionConfigChanged(t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(i.incomingEvent$.pipe((0,m.filter)((function(e){return"Web3Response"===e.event}))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(i.linked$.pipe((0,m.skip)(1),(0,m.tap)((function(t){var n;e.isLinked=t;var r=e.storage.getItem(_.LOCAL_STORAGE_ADDRESSES_KEY);if(t&&(e.session.linked=t),e.isUnlinkedErrorState=!1,r){var i=r.split(" "),s="true"===e.storage.getItem("IsStandaloneSigning");if(""!==i[0]&&!t&&e.session.linked&&!s){e.isUnlinkedErrorState=!0;var o=e.getSessionIdHash();null===(n=e.diagnostic)||void 0===n||n.log(v.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:o})}}}))).subscribe()),this.subscriptions.add(i.sessionConfig$.pipe((0,m.filter)((function(e){return!!e.metadata&&"1"===e.metadata.__destroyed}))).subscribe((function(){var t,n=i.isDestroyed;return null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:n,sessionIdHash:e.getSessionIdHash()}),e.resetAndReload()}))),this.subscriptions.add(i.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.WalletUsername}))).pipe((0,m.mergeMap)((function(e){return k.decrypt(e.metadata.WalletUsername,t.secret)}))).subscribe({next:function(t){e.storage.setItem(_.WALLET_USER_NAME_KEY,t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.AppVersion}))).pipe((0,m.mergeMap)((function(e){return k.decrypt(e.metadata.AppVersion,t.secret)}))).subscribe({next:function(t){e.storage.setItem(_.APP_VERSION_KEY,t)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.ChainId&&void 0!==e.metadata.JsonRpcUrl}))).pipe((0,m.mergeMap)((function(e){return(0,g.zip)(k.decrypt(e.metadata.ChainId,t.secret),k.decrypt(e.metadata.JsonRpcUrl,t.secret))}))).pipe((0,m.distinctUntilChanged)()).subscribe({next:function(t){var n=r(t,2),i=n[0],s=n[1];e.chainCallback&&e.chainCallback(i,s)},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(i.sessionConfig$.pipe((0,m.filter)((function(e){return e.metadata&&void 0!==e.metadata.EthereumAddress}))).pipe((0,m.mergeMap)((function(e){return k.decrypt(e.metadata.EthereumAddress,t.secret)}))).subscribe({next:function(t){e.accountsCallback&&e.accountsCallback([t]),n.accountRequestCallbackIds.size>
10&&(Array.from(n.accountRequestCallbackIds.values()).forEach((function(n){var r=(0,A.Web3ResponseMessage)({id:n,response:(0,I.RequestEthereumAccountsResponse)([t])});e.invokeCallback(Object.assign(Object.assign({},r),{id:n}))})),n.accountRequestCallbackIds.clear())},error:function(){var t;null===(t=e.diagnostic)||void 0===t||t.log(v.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}}));var s=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:t,connected$:i.connected$});return i.connect(),{session:t,ui:s,connection:i}}},{key:"attachUI",value:function(){this.ui.attach()}},{key:"resetAndReload",value:function(){var e=this;this.connection.setSessionMetadata("__destroyed","1").pipe((0,m.timeout)(1e3),(0,m.catchError)((function(e){return(0,g.of)(null)}))).subscribe((function(t){var n,r,i,s=e.ui.isStandalone();try{e.subscriptions.unsubscribe()}catch(h){null===(n=e.diagnostic)||void 0===n||n.log(v.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(r=e.diagnostic)||void 0===r||r.log(v.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:e.getSessionIdHash()}),e.connection.destroy();var o=E.Session.load(e.storage);if((null===o||void 0===o?void 0:o.id)===e._session.id?e.storage.clear():o&&(null===(i=e.diagnostic)||void 0===i||i.log(v.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:e.getSessionIdHash(),storedSessionIdHash:E.Session.hash(o.id)})),e._reloadOnDisconnect)e.ui.reloadUI();else{e.accountsCallback&&e.accountsCallback([],!0);var a=e.subscribe(),u=a.session,c=a.ui,l=a.connection;e._session=u,e.connection=l,e.ui=c,s&&e.ui.setStandalone&&e.ui.setStandalone(!0),e.attachUI()}}),(function(t){var n;null===(n=e.diagnostic)||void 0===n||n.log(v.EVENTS.FAILURE,{method:"relay::resetAndReload",message:"failed to reset and reload with ".concat(t),sessionIdHash:e.getSessionIdHash()})}))}},{key:"setAppInfo",value:function(e,t){this.appName=e,this.appLogoUrl=t}},{key:"getStorageItem",value:function(e){return this.storage.getItem(e)}},{key:"session",get:function(){return this._session}},{key:"setStorageItem",value:function(e,t){this.storage.setItem(e,t)}},{key:"signEthereumMessage",value:function(e,t,n,r){return this.sendRequest({method:x.Web3Method.signEthereumMessage,params:{message:(0,M.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}},{key:"ethereumAddressFromSignedMessage",value:function(e,t,n){return this.sendRequest({method:x.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,M.hexStringFromBuffer)(e,!0),signature:(0,M.hexStringFromBuffer)(t,!0),addPrefix:n}})}},{key:"signEthereumTransaction",value:function(e){return this.sendRequest({method:x.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,M.bigIntStringFromBN)(e.weiValue),data:(0,M.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,M.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,M.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,M.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,M.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}},{key:"signAndSubmitEthereumTransaction",value:function(e){return this.sendRequest({method:x.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,M.bigIntStringFromBN)(e.weiValue),data:(0,M.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,M.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,M.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,M.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,M.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}},{key:"submitEthereumTransaction",value:function(e,t){return this.sendRequest({method:x.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,M.hexStringFromBuffer)(e,!0),chainId:t}})}},{key:"scanQRCode",value:function(e){return this.sendRequest({method:x.Web3Method.scanQRCode,params:{regExp:e}})}},{key:"getQRCodeUrl",value:function(){return(0,M.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}},{key:"genericRequest",value:function(e,t){return this.sendRequest({method:x.Web3Method.generic,params:{action:t,data:e}})}},{key:"sendGenericMessage",value:function(e){return this.sendRequest(e)}},{key:"sendRequest",value:function(e){var t=this,n=null,r=(0,M.randomBytesHex)(8),i=function(i){t.publishWeb3RequestCanceledEvent(r),t.handleErrorResponse(r,e.method,i),null===n||void 0===n||n()};return{promise:new Promise((function(s,o){t.ui.isStandalone()||(n=t.ui.showConnecting({isUnlinkedErrorState:t.isUnlinkedErrorState,onCancel:i,onResetConnection:t.resetAndReload})),t.relayEventManager.callbacks.set(r,(function(e){if(null===n||void 0===n||n(),e.errorMessage)return o(new Error(e.errorMessage));s(e)})),t.ui.isStandalone()?t.sendRequestStandalone(r,e):t.publishWeb3RequestEvent(r,e)})),cancel:i}}},{key:"setConnectDisabled",value:function(e){this.ui.setConnectDisabled(e)}},{key:"setAccountsCallback",value:function(e){this.accountsCallback=e}},{key:"setChainCallback",value:function(e){this.chainCallback=e}},{key:"publishWeb3RequestEvent",value:function(e,t){var n,r=this,i=(0,C.Web3RequestMessage)({id:e,request:t}),s=E.Session.load(this.storage);null===(n=this.diagnostic)||void 0===n||n.log(v.EVENTS.WEB3_REQUEST,{eventId:i.id,method:"relay::".concat(i.request.method),sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?E.Session.hash(s.id):"",isSessionMismatched:((null===s||void 0===s?void 0:s.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",i,!0).subscribe({next:function(e){var t;null===(t=r.diagnostic)||void 0===t||t.log(v.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:"relay::".concat(i.request.method),sessionIdHash:r.getSessionIdHash(),storedSessionIdHash:s?E.Session.hash(s.id):"",isSessionMismatched:((null===s||void 0===s?void 0:s.id)!==r._session.id).toString()})},error:function(e){r.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:i.id,response:{method:i.request.method,errorMessage:e.message}}))}}))}},{key:"publishWeb3RequestCanceledEvent",value:function(e){var t=(0,S.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",t,!1).subscribe())}},{key:"publishEvent",value:function(e,t,n){var r=this,i=this.session.secret;
1return new g.Observable((function(e){k.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin})),i).then((function(t){e.next(t),e.complete()}))})).pipe((0,m.mergeMap)((function(t){return r.connection.publishEvent(e,t,n)})))}},{key:"handleIncomingEvent",value:function(e){var t=this;try{this.subscriptions.add(k.decrypt(e.data,this.session.secret).pipe((0,m.map)((function(e){return JSON.parse(e)}))).subscribe({next:function(e){var n=(0,A.isWeb3ResponseMessage)(e)?e:null;n&&t.handleWeb3ResponseMessage(n)},error:function(){var e;null===(e=t.diagnostic)||void 0===e||e.log(v.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(n){return}}},{key:"handleWeb3ResponseMessage",value:function(e){var t,r=this,i=e.response;if(null===(t=this.diagnostic)||void 0===t||t.log(v.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:"relay::".concat(i.method),sessionIdHash:this.getSessionIdHash()}),(0,I.isRequestEthereumAccountsResponse)(i))return n.accountRequestCallbackIds.forEach((function(t){return r.invokeCallback(Object.assign(Object.assign({},e),{id:t}))})),void n.accountRequestCallbackIds.clear();this.invokeCallback(e)}},{key:"handleErrorResponse",value:function(e,t,n,r){this.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:e,response:(0,I.ErrorResponse)(t,(null!==n&&void 0!==n?n:y.WalletUIError.UserRejectedRequest).message,r)}))}},{key:"invokeCallback",value:function(e){var t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}},{key:"requestEthereumAccounts",value:function(){var e=this,t={method:x.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,M.randomBytesHex)(8),i=function(n){e.publishWeb3RequestCanceledEvent(r),e.handleErrorResponse(r,t.method,n)};return{promise:new Promise((function(s,o){var a;e.relayEventManager.callbacks.set(r,(function(t){if(e.ui.hideRequestEthereumAccounts(),t.errorMessage)return o(new Error(t.errorMessage));s(t)}));var u=(null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.userAgent)||null;if(u&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(u)){var c;try{c=(0,M.isInIFrame)()&&window.top?window.top.location:window.location}catch(h){c=window.location}c.href="https://go.cb-w.com/xoXnYwQimhb?cb_url=".concat(encodeURIComponent(c.href))}else{if(e.ui.inlineAccountsResponse()){e.ui.requestEthereumAccounts({onCancel:i,onAccounts:function(t){e.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,I.RequestEthereumAccountsResponse)(t)}))}})}else{var l=p.ethErrors.provider.userRejectedRequest("User denied account authorization");e.ui.requestEthereumAccounts({onCancel:function(){return i(l)}})}n.accountRequestCallbackIds.add(r),e.ui.inlineAccountsResponse()||e.ui.isStandalone()||e.publishWeb3RequestEvent(r,t)}})),cancel:i}}},{key:"selectProvider",value:function(e){var t=this,n={method:x.Web3Method.selectProvider,params:{providerOptions:e}},r=(0,M.randomBytesHex)(8);return{cancel:function(e){t.publishWeb3RequestCanceledEvent(r),t.handleErrorResponse(r,n.method,e)},promise:new Promise((function(n,i){t.relayEventManager.callbacks.set(r,(function(e){if(e.errorMessage)return i(new Error(e.errorMessage));n(e)}));t.ui.selectProvider&&t.ui.selectProvider({onApprove:function(e){t.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,I.SelectProviderResponse)(e)}))},onCancel:function(e){t.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:r,response:(0,I.SelectProviderResponse)(w.ProviderType.Unselected)}))},providerOptions:e})}))}}},{key:"watchAsset",value:function(e,t,n,r,i,s){var o=this,a={method:x.Web3Method.watchAsset,params:{type:e,options:{address:t,symbol:n,decimals:r,image:i},chainId:s}},u=null,c=(0,M.randomBytesHex)(8),l=function(e){o.publishWeb3RequestCanceledEvent(c),o.handleErrorResponse(c,a.method,e),null===u||void 0===u||u()};return this.ui.inlineWatchAsset()||(u=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{cancel:l,promise:new Promise((function(l,h){o.relayEventManager.callbacks.set(c,(function(e){if(null===u||void 0===u||u(),e.errorMessage)return h(new Error(e.errorMessage));l(e)}));o.ui.inlineWatchAsset()&&o.ui.watchAsset({onApprove:function(){o.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:c,response:(0,I.WatchAssetReponse)(!0)}))},onCancel:function(e){o.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:c,response:(0,I.WatchAssetReponse)(!1)}))},type:e,address:t,symbol:n,decimals:r,image:i,chainId:s}),o.ui.inlineWatchAsset()||o.ui.isStandalone()||o.publishWeb3RequestEvent(c,a)}))}}},{key:"addEthereumChain",value:function(e,t,n,r,i,s){var o=this,a={method:x.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:s}},u=null,c=(0,M.randomBytesHex)(8),l=function(e){o.publishWeb3RequestCanceledEvent(c),o.handleErrorResponse(c,a.method,e),null===u||void 0===u||u()};return this.ui.inlineAddEthereumChain(e)||(u=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{promise:new Promise((function(t,n){o.relayEventManager.callbacks.set(c,(function(e){if(null===u||void 0===u||u(),e.errorMessage)return n(new Error(e.errorMessage));t(e)}));o.ui.inlineAddEthereumChain(e)&&o.ui.addEthereumChain({onCancel:function(e){o.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:c,response:(0,I.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){o.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:c,response:(0,I.AddEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),o.ui.inlineAddEthereumChain(e)||o.ui.isStandalone()||o.publishWeb3RequestEvent(c,a)})),cancel:l}}},{key:"switchEthereumChain",value:function(e){var t=this,n={method:x.Web3Method.switchEthereumChain,params:{chainId:e}},r=null,i=(0,M.randomBytesHex)(8),s=function(e){t.publishWeb3RequestCanceledEvent(i),t.handleErrorResponse(i,n.method,e),null===r||void 0===r||r()};return this.ui.inlineSwitchEthereumChain()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:s,onResetConnection:this.resetAndReload})),{promise:new Promise((function(e,s){t.relayEventManager.callbacks.set(i,(function(t){return null===r||void 0===r||r(),t.errorMessage&&t.errorCode?s(p.ethErrors.provider.custom({code:t.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):t.errorMessage?s(new Error(t.errorMessage)):void e(t)}));t.ui.switchEthereumChain({onCancel:function(e){if("number"===typeof e){var n=e;t.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:i,response:(0,I.ErrorResponse)(x.Web3Method.switchEthereumChain,y.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,n)}))}else e instanceof y.WalletUIError?t.handleErrorResponse(i,x.Web3Method.switchEthereumChain,e,e.errorCode):t.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:i,response:(0,I.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:function(e){t.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:i,response:(0,I.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:e})}))},chainId:n.params.chainId}),t.ui.inlineSwitchEthereumChain()||t.ui.isStandalone()||t.publishWeb3RequestEvent(i,n)})),cancel:s}}},{key:"inlineAddEthereumChain",value:function(e){return this.ui.inlineAddEthereumChain(e)}},{key:"getSessionIdHash",value:function(){return E.Session.hash(this._session.id)}},{key:"sendRequestStandalone",value:function(e,t){var n=this,r=function(r){n.handleErrorResponse(e,t.method,r)},i=function(t){n.handleWeb3ResponseMessage((0,A.Web3ResponseMessage)({id:e,response:t}))};switch(t.method){case x.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:t,onSuccess:i,onCancel:r});break;case x.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:t,onSuccess:i});break;default:r()}}},{key:"onSessionConfigChanged",value:function(e){}}]),n}(_.WalletSDKRelayAbstract);N.accountRequestCallbackIds=new Set,l([f.default],N.prototype,"resetAndReload",null),l([f.default],N.prototype,"handleIncomingEvent",null),t.WalletSDKRelay=N},37558:function(e,t,n){"use strict";var r=n(17061).default,i=n(17156).default,s=n(56690).default,o=n(89728).default;
1Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayAbstract=t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0;var a=n(77829);t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion";var u=function(){function e(){s(this,e)}return o(e,[{key:"makeEthereumJSONRPCRequest",value:function(){var e=i(r().mark((function e(t,n){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Error: No jsonRpcUrl provided");case 2:return e.abrupt("return",window.fetch(n,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){if(!e)throw a.ethErrors.rpc.parse({});var t=e,n=t.error;if(n)throw(0,a.serializeError)(n);return t})));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t.WalletSDKRelayAbstract=u},90389:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletSDKRelayEventManager=void 0;var s=n(24032),o=function(){function e(){r(this,e),this._nextRequestId=0,this.callbacks=new Map}return i(e,[{key:"makeRequestId",value:function(){this._nextRequestId=(this._nextRequestId+1)%2147483647;var e=this._nextRequestId,t=(0,s.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}]),e}();t.WalletSDKRelayEventManager=o},76795:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))},21317:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestCanceledMessage=void 0;var r=n(91865);t.Web3RequestCanceledMessage=function(e){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:e}}},98507:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3RequestMessage=void 0;var r=n(91865);t.Web3RequestMessage=function(e){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},e)}},15373:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressFromSignedMessageResponse=t.SubmitEthereumTransactionResponse=t.SignEthereumTransactionResponse=t.SignEthereumMessageResponse=t.isRequestEthereumAccountsResponse=t.SelectProviderResponse=t.WatchAssetReponse=t.RequestEthereumAccountsResponse=t.SwitchEthereumChainResponse=t.AddEthereumChainResponse=t.ErrorResponse=void 0;var r=n(76795);t.ErrorResponse=function(e,t,n){return{method:e,errorMessage:t,errorCode:n}},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}}},48427:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.isWeb3ResponseMessage=t.Web3ResponseMessage=void 0;var r=n(91865);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}},37530:function(e,t,n){"use strict";var r=n(17061).default,i=n(861).default,s=n(17156).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=void 0;var o=n(92001),a=n(24032);function u(){return(u=s(r().mark((function e(t,n){var s,o,u,c,l,h,d,f,p;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(64===n.length){e.next=2;break}throw Error("secret must be 256 bits");case 2:return s=crypto.getRandomValues(new Uint8Array(12)),e.next=5,crypto.subtle.importKey("raw",(0,a.hexStringToUint8Array)(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 5:return o=e.sent,u=new TextEncoder,e.next=9,window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},o,u.encode(t));case 9:return c=e.sent,16,l=c.slice(c.byteLength-16),h=c.slice(0,c.byteLength-16),d=new Uint8Array(l),f=new Uint8Array(h),p=new Uint8Array([].concat(i(s),i(d),i(f))),e.abrupt("return",(0,a.uint8ArrayToHex)(p));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.encrypt=function(e,t){return u.apply(this,arguments)},t.decrypt=function(e,t){if(64!==t.length)throw Error("secret must be 256 bits");return new o.Observable((function(n){s(r().mark((function s(){var o,u,c,l,h,d,f,p,g;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,crypto.subtle.importKey("raw",(0,a.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]);case 2:return o=r.sent,u=(0,a.hexStringToUint8Array)(e),c=u.slice(0,12),l=u.slice(12,28),h=u.slice(28),d=new Uint8Array([].concat(i(h),i(l))),f={name:"AES-GCM",iv:new Uint8Array(c)},r.prev=9,r.next=12,window.crypto.subtle.decrypt(f,o,d);case 12:p=r.sent,g=new TextDecoder,n.next(g.decode(p)),n.complete(),r.next=21;break;case 18:r.prev=18,r.t0=r.catch(9),n.error(r.t0);case 21:case"end":return r.stop()}}),s,null,[[9,18]])})))()}))}},67453:function(e,t){"use strict";function n(){return function(e){return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=n,t.HexString=function(e){return e},t.AddressString=function(e){return e},t.BigIntString=function(e){return e},t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=function(e){return e},function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""}(t.ProviderType||(t.ProviderType={}))},24032:function(e,t,n){"use strict";var r=n(97429).Buffer,i=n(38416).default,s=n(861).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isInIFrame=t.createQrUrl=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBN=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBN=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;var a=o(n(27691)),u=n(35213),c=n(67453),l=/^[0-9]*$/,h=/^[a-f0-9]*$/;function d(e){return s(e).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}function f(e){return e.startsWith("0x")||e.startsWith("0X")}function p(e){return f(e)?e.slice(2):e}function g(e){return f(e)?"0x"+e.slice(2):"0x"+e}function m(e){if("string"!==typeof e)return!1;var t=p(e).toLowerCase();return h.test(t)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof e){var n=p(e).toLowerCase();if(h.test(n))return(0,c.HexString)(t?"0x"+n:n)}throw new Error('"'.concat(String(e),'" is not a hexadecimal string'))}function b(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=v(e,!1);return n.length%2===1&&(n=(0,c.HexString)("0"+n)),t?(0,c.HexString)("0x"+n):n}function y(e){if("number"===typeof e&&Number.isInteger(e))return(0,c.IntNumber)(e);if("string"===typeof e){if(l.test(e))return(0,c.IntNumber)(Number(e));if(m(e))return(0,c.IntNumber)(new a.default(b(e,!1),16).toNumber())}throw new Error("Not an integer: ".concat(String(e)))}function w(e){if(null==e||"function"!==typeof e.constructor)return!1;var t=e.constructor;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return d(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=d,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((function(e){return parseInt(e,16)})))},t.hexStringFromBuffer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.toString("hex");return(0,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 a.default(b(e,!1),16).toNumber())},t.hexStringFromIntNumber=function(e){return(0,c.HexString)("0x"+new a.default(e).toString(16))},t.has0xPrefix=f,t.strip0x=p,t.prepend0x=g,t.isHexString=m,t.ensureHexString=v,t.ensureEvenLengthHexString=b,t.ensureAddressString=function(e){if("string"===typeof e){var t=p(e).toLowerCase();if(m(t)&&40===t.length)return(0,c.AddressString)(g(t))}throw new Error("Invalid Ethereum address: ".concat(String(e)))},t.ensureBuffer=function(e){if(r.isBuffer(e))return e;if("string"===typeof e){if(m(e)){var t=b(e,!1);return r.from(t,"hex")}return r.from(e,"utf8")}throw new Error("Not binary data: ".concat(String(e)))},t.ensureIntNumber=y,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,c.RegExpString)(e.toString());throw new Error("Not a RegExp: ".concat(String(e)))},t.ensureBN=function(e){if(null!==e&&(a.default.isBN(e)||w(e)))return new a.default(e.toString(10),10);if("number"===typeof e)return new a.default(y(e));if("string"===typeof e){if(l.test(e))return new a.default(e,10);if(m(e))return new a.default(b(e,!1),16)}throw new Error("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 new Error("Not a JSON string or an object: ".concat(String(e)))},t.isBigNumber=w,t.range=function(e,t){return Array.from({length:t-e},(function(t,n){return e+n}))},t.getFavicon=function(){var e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),t=document.location,n=t.protocol,r=t.host,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")?null:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?n+i:"".concat(n,"//").concat(r).concat(i)},t.createQrUrl=function(e,t,n,r){var s,o=r?"parent-id":"id",a=(0,u.stringify)((i(s={},o,e),i(s,"secret",t),i(s,"server",n),i(s,"v","1"),s));return"".concat(n,"/#/link?").concat(a)},t.isInIFrame=function(){try{return null!==window.frameElement}catch(e){return!1}}},13368:function(e,t,n){var r=n(97429).Buffer,i=n(45912),s=n(27691);function o(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 a(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function u(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function l(e){var t=typeof e;if("string"===t)return i.isHexString(e)?new s(i.stripHexPrefix(e),16):new s(e,10);if("number"===t)return new s(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function h(e,t){var n,o,d,f;if("address"===e)return h("uint160",l(t));if("bool"===e)return h("uint8",t?1:0);if("string"===e)return h("bytes",new r(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof t.length)throw new Error("Not an array?");if("dynamic"!==(n=c(e))&&0!==n&&t.length>n)throw new Error("Elements exceed array size: "+n);for(f in d=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)d.push(h(e,t[f]));if("dynamic"===n){var p=h("uint256",t.length);d.unshift(p)}return r.concat(d)}if("bytes"===e)return t=new r(t),d=r.concat([h("uint256",t.length),t]),t.length%32!==0&&(d=r.concat([d,i.zeros(32-t.length%32)])),d;if(e.startsWith("bytes")){if((n=a(e))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);
1return i.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=a(e))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);if((o=l(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o.bitLength());if(o<0)throw new Error("Supplied uint is negative");return o.toArrayLike(r,"be",32)}if(e.startsWith("int")){if((n=a(e))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);if((o=l(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o.bitLength());return o.toTwos(256).toArrayLike(r,"be",32)}if(e.startsWith("ufixed")){if(n=u(e),(o=l(t))<0)throw new Error("Supplied ufixed is negative");return h("uint256",o.mul(new s(2).pow(new s(n[1]))))}if(e.startsWith("fixed"))return n=u(e),h("int256",l(t).mul(new s(2).pow(new s(n[1]))));throw new Error("Unsupported or invalid type: "+e)}function d(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function f(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n,s,u=[],c=0;c<e.length;c++){var h=o(e[c]),d=t[c];if("bytes"===h)u.push(d);else if("string"===h)u.push(new r(d,"utf8"));else if("bool"===h)u.push(new r(d?"01":"00","hex"));else if("address"===h)u.push(i.setLength(d,20));else if(h.startsWith("bytes")){if((n=a(h))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);u.push(i.setLengthRight(d,n))}else if(h.startsWith("uint")){if((n=a(h))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);if((s=l(d)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());u.push(s.toArrayLike(r,"be",n/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((n=a(h))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);if((s=l(d)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());u.push(s.toTwos(n).toArrayLike(r,"be",n/8))}}return r.concat(u)}e.exports={rawEncode:function(e,t){var n=[],i=[],s=32*e.length;for(var a in e){var u=o(e[a]),c=h(u,t[a]);d(u)?(n.push(h("uint256",s)),i.push(c),s+=c.length):n.push(c)}return r.concat(n.concat(i))},solidityPack:f,soliditySHA3:function(e,t){return i.keccak(f(e,t))}}},12023:function(e,t,n){var r=n(97429).Buffer,i=n(74704).default,s=n(27424).default,o=n(45912),a=n(13368),u={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},c={encodeData:function(e,t,n){var u=this,c=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=["bytes32"],h=[this.hashType(e,n)];if(c){var d,f=function e(t,i,l){if(void 0!==n[i])return["bytes32",null==l?"0x0000000000000000000000000000000000000000000000000000000000000000":o.keccak(u.encodeData(i,l,n,c))];if(void 0===l)throw new Error("missing value for field ".concat(t," of type ").concat(i));if("bytes"===i)return["bytes32",o.keccak(l)];if("string"===i)return"string"===typeof l&&(l=r.from(l,"utf8")),["bytes32",o.keccak(l)];if(i.lastIndexOf("]")===i.length-1){var h=i.slice(0,i.lastIndexOf("[")),d=l.map((function(n){return e(t,h,n)}));return["bytes32",o.keccak(a.rawEncode(d.map((function(e){return s(e,1)[0]})),d.map((function(e){return s(e,2)[1]}))))]}return[i,l]},p=i(n[e]);try{for(p.s();!(d=p.n()).done;){var g=d.value,m=f(g.name,g.type,t[g.name]),v=s(m,2),b=v[0],y=v[1];l.push(b),h.push(y)}}catch(_){p.e(_)}finally{p.f()}}else{var w,M=i(n[e]);try{for(M.s();!(w=M.n()).done;){var k=w.value,E=t[k.name];if(void 0!==E)if("bytes"===k.type)l.push("bytes32"),E=o.keccak(E),h.push(E);else if("string"===k.type)l.push("bytes32"),"string"===typeof E&&(E=r.from(E,"utf8")),E=o.keccak(E),h.push(E);else if(void 0!==n[k.type])l.push("bytes32"),E=o.keccak(this.encodeData(k.type,E,n,c)),h.push(E);else{if(k.type.lastIndexOf("]")===k.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");l.push(k.type),h.push(E)}}}catch(_){M.e(_)}finally{M.f()}}return a.rawEncode(l,h)},encodeType:function(e,t){var n="",r=this.findTypeDependencies(e,t).filter((function(t){return t!==e}));r=[e].concat(r.sort());var s,o=i(r);try{for(o.s();!(s=o.n()).done;){var a=s.value;if(!t[a])throw new Error("No type definition specified: "+a);n+=a+"("+t[a].map((function(e){var t=e.name;return e.type+" "+t})).join(",")+")"}}catch(u){o.e(u)}finally{o.f()}return n},findTypeDependencies:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);var r,s=i(t[e]);try{for(s.s();!(r=s.n()).done;){var o,a=r.value,u=i(this.findTypeDependencies(a.type,t,n));try{for(u.s();!(o=u.n()).done;){var c=o.value;!n.includes(c)&&n.push(c)}}catch(l){u.e(l)}finally{u.f()}}}catch(l){s.e(l)}finally{s.f()}return n},hashStruct:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return o.keccak(this.encodeData(e,t,n,r))},hashType:function(e,t){return o.keccak(this.encodeType(e,t))},sanitizeData:function(e){var t={};for(var n in u.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.sanitizeData(e),i=[r.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,t)),o.keccak(r.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:u,TypedDataUtils:c,hashForSignTypedDataLegacy:function(e){return function(e){var t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;var n=e.map((function(e){return"bytes"===e.type?o.toBuffer(e.value):e.value})),r=e.map((function(e){return e.type})),i=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return a.soliditySHA3(["bytes32","bytes32"],[a.soliditySHA3(new Array(e.length).fill("string"),i),a.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return c.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return c.hash(e.data)}}},45912:function(e,t,n){var r=n(97429).Buffer,i=n(82138),s=n(27691);function o(e){return r.allocUnsafe(e).fill(0)}function a(e,t,n){var r=o(t);return e=u(e),n?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)}function u(e){if(!r.isBuffer(e))if(Array.isArray(e))e=r.from(e);else if("string"===typeof e)e=c(e)?r.from((t=l(e)).length%2?"0"+t:t,"hex"):r.from(e);else if("number"===typeof e)e=intToBuffer(e);else if(null===e||void 0===e)e=r.allocUnsafe(0);else if(s.isBN(e))e=e.toArrayLike(r);else{if(!e.toArray)throw new Error("invalid type");e=r.from(e.toArray())}var t;return e}function c(e){return"string"===typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function l(e){return"string"===typeof e&&e.startsWith("0x")?e.slice(2):e}
vendor: 9,737 bytes, line 1
1e.exports={zeros:o,setLength:a,setLengthRight:function(e,t){return a(e,t,!0)},isHexString:c,stripHexPrefix:l,toBuffer:u,bufferToHex:function(e){return"0x"+(e=u(e)).toString("hex")},keccak:function(e,t){return e=u(e),t||(t=256),i("keccak"+t).update(e).digest()}}},84281:function(e){function t(e){this.mode=r.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,n=this.data.length;t<n;t++){var i=[],s=this.data.charCodeAt(t);s>65536?(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<n;t++)e.put(this.parsedData[t],8)}},n.prototype={addData:function(e){var n=new t(e);this.dataList.push(n),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[r][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=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=m.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<this.modules.length;i++)for(var s=1*i,o=0;o<this.modules[i].length;o++){var a=1*o;this.modules[i][o]&&(r.beginFill(0,100),r.moveTo(a,s),r.lineTo(a+1,s),r.lineTo(a+1,s+1),r.lineTo(a,s+1),r.endFill())}return r},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=m.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)this.modules[r+s][i+o]=-2==s||2==s||-2==o||2==o||0==s&&0==o}},setupTypeNumber:function(e){for(var t=m.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>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=m.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 a=0;a<2;a++)if(null==this.modules[r][o-a]){var u=!1;s<e.length&&(u=1==(e[s]>>>i&1)),m.getMask(t,r,o-a)&&(u=!u),this.modules[r][o-a]=u,-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 M,o=0;o<r.length;o++){var a=r[o];s.put(a.mode,4),s.put(a.getLength(),m.getLengthInBits(a.mode,e)),a.write(s)}var u=0;for(o=0;o<i.length;o++)u+=i[o].dataCount;if(s.getLengthInBits()>8*u)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*u+")");for(s.getLengthInBits()+4<=8*u&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*u)&&(s.put(n.PAD0,8),!(s.getLengthInBits()>=8*u));)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),a=0;a<t.length;a++){var u=t[a].dataCount,c=t[a].totalCount-u;r=Math.max(r,u),i=Math.max(i,c),s[a]=new Array(u);for(var l=0;l<s[a].length;l++)s[a][l]=255&e.buffer[l+n];n+=u;var h=m.getErrorCorrectPolynomial(c),d=new y(s[a],h.getLength()-1).mod(h);o[a]=new Array(h.getLength()-1);for(l=0;l<o[a].length;l++){var f=l+d.getLength()-o[a].length;o[a][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<t.length;l++)p+=t[l].totalCount;var g=new Array(p),v=0;for(l=0;l<r;l++)for(a=0;a<t.length;a++)l<s[a].length&&(g[v++]=s[a][l]);for(l=0;l<i;l++)for(a=0;a<t.length;a++)l<o[a].length&&(g[v++]=o[a][l]);return g};for(var r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i=1,s=0,o=3,a=2,u=0,c=1,l=2,h=3,d=4,f=5,p=6,g=7,m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;m.getBCHDigit(t)-m.getBCHDigit(m.G15)>=0;)t^=m.G15<<m.getBCHDigit(t)-m.getBCHDigit(m.G15);return(e<<10|t)^m.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;m.getBCHDigit(t)-m.getBCHDigit(m.G18)>=0;)t^=m.G18<<m.getBCHDigit(t)-m.getBCHDigit(m.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return m.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case u:return(t+n)%2==0;case c: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 f:return t*n%2+t*n%3==0;case p: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 y([1],0),n=0;n<e;n++)t=t.multiply(new y([1,v.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var s=0,o=e.isDark(r,i),a=-1;a<=1;a++)if(!(r+a<0||t<=r+a))for(var u=-1;u<=1;u++)i+u<0||t<=i+u||0==a&&0==u||o==e.isDark(r+a,i+u)&&s++;s>5&&(n+=3+s-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var c=0;e.isDark(r,i)&&c++,e.isDark(r+1,i)&&c++,e.isDark(r,i+1)&&c++,e.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}},v={glog:function(e){if(e<1)throw new Error("glog("+e+")");return v.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return v.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},b=0;b<8;b++)v.EXP_TABLE[b]=1<<b;for(b=8;b<256;b++)v.EXP_TABLE[b]=v.EXP_TABLE[b-4]^v.EXP_TABLE[b-5]^v.EXP_TABLE[b-6]^v.EXP_TABLE[b-8];for(b=0;b<255;b++)v.LOG_TABLE[v.EXP_TABLE[b]]=b;function y(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}function w(e,t){this.totalCount=e,this.dataCount=t}function M(){this.buffer=[],this.length=0}y.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<e.getLength();r++)t[n+r]^=v.gexp(v.glog(this.get(n))+v.glog(e.get(r)));return new y(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=v.glog(this.get(0))-v.glog(e.get(0)),n=new Array(this.getLength()),r
vendor: 4,274 bytes, line 1
1=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<e.getLength();r++)n[r]^=v.gexp(v.glog(e.get(r))+t);return new y(n,0).mod(e)}},w.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],w.getRSBlocks=function(e,t){var n=w.getRsBlockTable(e,t);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=[],s=0;s<r;s++)for(var o=n[3*s+0],a=n[3*s+1],u=n[3*s+2],c=0;c<o;c++)i.push(new w(a,u));return i},w.getRsBlockTable=function(e,t){switch(t){case i:return w.RS_BLOCK_TABLE[4*(e-1)+0];case s:return w.RS_BLOCK_TABLE[4*(e-1)+1];case o:return w.RS_BLOCK_TABLE[4*(e-1)+2];case a:return w.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},M.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>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 k=[[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,71
15,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 E(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,u=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=k.length;s<=o;s++){var a=k[s];if(!a)throw new Error("Content too long: expected "+i+" but got "+n);switch(t){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(n<=i)break;r++}if(r>k.length)throw new Error("Content too long");return r}(r,this.options.ecl),c=function(e){switch(e){case"L":return i;case"M":return s;case"Q":return o;case"H":return a;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new n(u,c),this.qrcode.addData(r),this.qrcode.make()}E.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,a=t.height,u=n.length,c=o/(u+2*t.padding),l=a/(u+2*t.padding),h="undefined"!=typeof t.join&&!!t.join,d="undefined"!=typeof t.swap&&!!t.swap,f="undefined"==typeof t.xmlDeclaration||!!t.xmlDeclaration,p="undefined"!=typeof t.predefined&&!!t.predefined,g=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+c+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+s:"",m=i+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+s,v="",b="",y=0;y<u;y++)for(var w=0;w<u;w++){if(n[w][y]){var M=w*c+t.padding*c,k=y*l+t.padding*l;if(d){var E=M;M=k,k=E}if(h){var _=c+M,x=l+k;M=Number.isInteger(M)?Number(M):M.toFixed(2),k=Number.isInteger(k)?Number(k):k.toFixed(2),_=Number.isInteger(_)?Number(_):_.toFixed(2),b+="M"+M+","+k+" V"+(x=Number.isInteger(x)?Number(x):x.toFixed(2))+" H"+_+" V"+k+" H"+M+" Z "}else v+=p?i+'<use x="'+M.toString()+'" y="'+k.toString()+'" href="#qrmodule" />'+s:i+'<rect x="'+M.toString()+'" y="'+k.toString()+'" width="'+c+'" height="'+l+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+s}}h&&(v=i+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+b+'" />');var S="";if(void 0!==this.options.image&&this.options.image.svg){var C=o*this.options.image.width/100,I=a*this.options.image.height/100,A=a/2-I/2;S+='<svg x="'.concat(o/2-C/2,'" y="').concat(A,'" width="').concat(C,'" height="').concat(I,'" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">'),S+=this.options.image.svg+s,S+="</svg>"}var N="";switch(e.container){case"svg":f&&(N+='<?xml version="1.0" standalone="yes"?>'+s),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+s,N+=g+m+v,N+=S,N+="</svg>";break;case"svg-viewbox":f&&(N+='<?xml version="1.0" standalone="yes"?>'+s),N+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+s,N+=g+m+v,N+=S,N+="</svg>";break;case"g":N+='<g width="'+o+'" height="'+a+'">'+s,N+=g+m+v,N+=S,N+="</g>";break;default:N+=(g+m+v+S).replace(/^\s+/,"")}return N},e.exports=E},87891:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="3.5.0"},27691:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;
vendor: 4,361 bytes, line 1
1"object"===typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o=n(30422).Buffer}catch(C){}function a(e,t,n){for(var i=0,s=Math.min(e.length,n),o=0,a=t;a<s;a++){var u,c=e.charCodeAt(a)-48;i<<=4,i|=u=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,o|=u}return r(!(240&o),"Invalid character in "+e),i}function u(e,t,n,i){for(var s=0,o=0,a=Math.min(e.length,n),u=t;u<a;u++){var c=e.charCodeAt(u)-48;s*=i,o=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&o<i,"Invalid character"),s+=o}return s}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"===typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,s=0;for(n=e.length-6,r=0;n>=t;n-=6)i=a(e,n,n+6),this.words[r]|=i<<s&67108863,this.words[r+1]|=i>>>26-s&4194303,(s+=24)>=26&&(s-=26,r++);n+6!==t&&(i=a(e,t,n+6),this.words[r]|=i<<s&67108863,this.words[r+1]|=i>>>26-s&4194303),this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,o=s%r,a=Math.min(s,s-o)+n,c=0,l=n;l<a;l+=r)c=u(e,l,l+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,l,e.length,t),l=0;l<o;l++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){c(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(C){s.prototype.inspect=l}else s.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 14,073 bytes, line 1
1777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],u=(16777215&(a<<i|s)).toString(16);n=0!==(s=a>>>24-i&16777215)||o!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],l=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modrn(l).toString(e);n=(p=p.idivn(l)).isZero()?g+n:h[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,u=o/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;l+=(o=(i=0|e.words[p])*(s=0|t.words[f])+h)/67108864|0,h=67108863&o}n.words[c]=0|h,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n++]=255&o,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),6===s?(n<e.length&&(e[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;e[n--]=255&o,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),6===s?(n>=0&&(e[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s<r.length;s++)t=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<n.length;s++)t=(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,o=0;o<r.length;o++)s=(t=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<n.length;o++)s=(t=(0|n.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,s,o=e.words,a=t.words,u=n.words,c=0,l=0|o[0],h=8191&l,d=l>>>13,f=0|o[1],p=8191&f,g=f>>>13,m=0|o[2],v=8191&m,b=m>>>13,y=0|o[3],w=8191&y,M=y>>>13,k=0|o[4],E=8191&k,_=k>>>13,x=0|o[5],S=8191&x,C=x>>>13,I=0|o[6],A=8191&I,N=I>>>13,R=0|o[7],L=8191&R,O=R>>>13,D=0|o[8],T=8191&D,P=D>>>13,j=0|o[9],B=8191&j,W=j>>>13,U=0|a[0],F=8191&U,H=U>>>13,z=0|a[1],q=8191&z,V=z>>>13,Z=0|a[2],G=8191&Z,K=Z>>>13,Q=0|a[3],J=8191&Q,Y=Q>>>13,$=0|a[4],X=8191&$,ee=$>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,le=0|a[8],he=8191&le,de=le>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(c+(r=Math.imul(h,F))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(d,F)|0))<<13)|0;c=((s=Math.imul(d,H))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,s=Math.imul(g,H);var ve=(c+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,q)|0))<<13)|0;c=((s=s+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,H))+Math.imul(b,F)|0,s=Math.imul(b,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,q)|0,s=s+Math.imul(g,V)|0;var be=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((s=s+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,H))+Math.imul(M,F)|0,s=Math.imul(M,H),r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,V)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,G)|0,s=s+Math.imul(g,K)|0;var ye=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,J)|0))<<13)|0;c=((s=s+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(_,F)|0,s=Math.imul(_,H),r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,V)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(b,G)|0,s=s+Math.imul(b,K)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,J)|0,s=s+Math.imul(g,Y)|0;var we=(c+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;c=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,F),i=(i=Math.imul(S,H))+Math.imul(C,F)|0,s=Math.imul(C,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(_,q)|0,s=s+Math.imul(_,V)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(M,G)|0,s=s+Math.imul(M,K)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,s=s+Math.imul(g,ee)|0;var Me=(c+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,H))+Math.imul(N,F)|0,s=Math.imul(N,H),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(C,q)|0,s=s+Math.imul(C,V)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(_,G)|0,s=s+Math.imul(_,K)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,Y)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,s=s+Math.imul(g,re)|0;var ke=(c+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(d,se)|0))<<13)|0;c=((s=s+Math.imul(d,oe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,H))+Math.imul(O,F)|0,s=Math.imul(O,H),r=r+Math.imul(A,q)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(N,q)|0,s=s+Math.imul(N,V)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(C,G)|0,s=s+Math.imul(C,K)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,Y)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(g,se)|0,s=s+Math.imul(g,oe)|0;var Ee=(c+(r=r+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((s=s+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(P,F)|0,s=Math.imul(P,H),r=r+Math.imul(L,q)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(O,q)|0,s=s+Math.imul(O,V)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(N,G)|0,s=s+Math.imul(N,K)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(C,J)|0,s=s+Math.imul(C,Y)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(M,ne)|0,s=s+Math.imul(M,re)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,oe)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,s=s+Math.imul(g,ce)|0;var _e=(c+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(W,F)|0,s=Math.imul(W,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,V)|0,r=r+Math.imul(L,G)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(O,G)|0,s=s+Math.imul(O,K)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,Y)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(C,X)|0,s=s+Math.imul(C,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(_,ne)|0,s=s+Math.imul(_,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(b,ue)|0,s=s+Math.imul(b,ce)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,he)|0,s=s+Math.imul(g,de)|0;var xe=(c+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((s=s+Math.imul(d,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,V))+Math.imul(W,q)|0,s=Math.imul(W,V),r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(P,G)|0,s=s+Math.imul(P,K)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(N,X)|0,s=s+Math.imul(N,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(C,ne)|0,s=s+Math.imul(C,re)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,oe)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(M,ue)|0,s=s+Math.imul(M,ce)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(b,he)|0,s=s+Math.imul(b,de)|0;var Se=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0)
vendor: 4,239 bytes, line 1
1)<<13)|0;c=((s=s+Math.imul(g,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,K))+Math.imul(W,G)|0,s=Math.imul(W,K),r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,J)|0,s=s+Math.imul(P,Y)|0,r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(O,X)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(N,ne)|0,s=s+Math.imul(N,re)|0,r=r+Math.imul(S,se)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(C,se)|0,s=s+Math.imul(C,oe)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(_,ue)|0,s=s+Math.imul(_,ce)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(M,he)|0,s=s+Math.imul(M,de)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(b,pe)|0))<<13)|0;c=((s=s+Math.imul(b,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,Y))+Math.imul(W,J)|0,s=Math.imul(W,Y),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,ee)|0,r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(A,se)|0,i=(i=i+Math.imul(A,oe)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,oe)|0,r=r+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(C,ue)|0,s=s+Math.imul(C,ce)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,de)|0;var Ie=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(M,pe)|0))<<13)|0;c=((s=s+Math.imul(M,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,ee))+Math.imul(W,X)|0,s=Math.imul(W,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(P,ne)|0,s=s+Math.imul(P,re)|0,r=r+Math.imul(L,se)|0,i=(i=i+Math.imul(L,oe)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,oe)|0,r=r+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(N,ue)|0,s=s+Math.imul(N,ce)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(C,he)|0,s=s+Math.imul(C,de)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(_,pe)|0))<<13)|0;c=((s=s+Math.imul(_,ge)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(W,ne)|0,s=Math.imul(W,re),r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(P,se)|0,s=s+Math.imul(P,oe)|0,r=r+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(O,ue)|0,s=s+Math.imul(O,ce)|0,r=r+Math.imul(A,he)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(N,he)|0,s=s+Math.imul(N,de)|0;var Ne=(c+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(C,pe)|0))<<13)|0;c=((s=s+Math.imul(C,ge)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,oe))+Math.imul(W,se)|0,s=Math.imul(W,oe),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(P,ue)|0,s=s+Math.imul(P,ce)|0,r=r+Math.imul(L,he)|0,i=(i=i+Math.imul(L,de)|0)+Math.imul(O,he)|0,s=s+Math.imul(O,de)|0;var Re=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(N,pe)|0))<<13)|0;c=((s=s+Math.imul(N,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,ue),i=(i=Math.imul(B,ce))+Math.imul(W,ue)|0,s=Math.imul(W,ce),r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(P,he)|0,s=s+Math.imul(P,de)|0;var Le=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((s=s+Math.imul(O,ge)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(B,he),i=(i=Math.imul(B,de))+Math.imul(W,he)|0,s=Math.imul(W,de);var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(P,pe)|0))<<13)|0;c=((s=s+Math.imul(P,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var De=(c+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,ge))+Math.imul(W,pe)|0))<<13)|0;return c=((s=Math.imul(W,ge))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,u[0]=me,u[1]=ve,u[2]=be,u[3]=ye,u[4]=we,u[5]=Me,u[6]=ke,u[7]=Ee,u[8]=_e,u[9]=xe,u[10]=Se,u[11]=Ce,u[12]=Ie,u[13]=Ae,u[14]=Ne,u[15]=Re,u[16]=Le,u[17]=Oe,u[18]=De,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,u=Math.min(s,t.length-1),c=Math.max(0,s-e.length+1);c<=u;c++){var l=s-c,h=(0|e.words[l])*(0|t.words[c]),d=67108863&h;a=67108863&(d=d+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(d>>>
vendor: 21,132 bytes, line 1
126)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function v(e,t,n){return m(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=p),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?p(this,e,t):n<1024?m(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,s){for(var o=0;o<s;o++)r[o]=t[e[o]],i[o]=n[e[o]]},b.prototype.transform=function(e,t,n,r,i,s){this.permute(s,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,d=c,f=0;f<o;f++){var p=n[l+f],g=r[l+f],m=n[l+f+o],v=r[l+f+o],b=h*m-d*v;v=h*v+d*m,m=b,n[l+f]=p+m,r[l+f]=g+v,n[l+f+o]=p-m,r[l+f+o]=g-v,f!==a&&(b=u*h-c*d,d=u*d+c*h,h=b)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(0===s),r(0===(-8192&s))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),u=new Array(r),c=new Array(r),l=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,c,r),this.transform(o,s,a,u,r,i),this.transform(c,s,l,h,r,i);for(var f=0;f<r;f++){var p=a[f]*l[f]-u[f]*h[f];u[f]=a[f]*h[f]+u[f]*l[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,s,r,i),this.conjugate(d,s,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),v(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"===typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){r("number"===typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,u=(0|this.words[t])-a<<n;this.words[t]=u|o,o=a>>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){var i;r("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,u=n;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-s|h>>>s,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},s.prototype.imaskn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return r("number"===typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){var i,s,o=e.length+n;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+a;var u=(0|e.words[i])*t;a=((s-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==t){(a=new s(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=r.clone()._ishlnsubmul(i,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/o|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),u=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),o.isub(u)):(n.isub(t),a.isub(i),u.isub(o))}return{a:a,b:u,gcd:n.iushln(c)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var h=0,d=1;0===(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(a)):(n.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0===(1&this.words[0])},s.prototype.isOdd=function(){return 1===(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new x(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"===typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(M,w),M.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&n,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},M.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(k,w),i(E,w),i(_,w),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new M;else if("p224"===e)t=new k;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=o;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();r(m<p);var v=this.pow(h,new s(1).iushln(p-m-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=m}return d},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new S(e)},i(S,x),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},84813:function(e,t,n){"use strict";var r=n(56690).default,i=n(89728).default,s=n(61655).default,o=n(26389).default,a=n(33496).default;
1Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;var u=n(59431),c=function(e){s(n,e);var t=o(n);function n(e,i,s){var o;if(r(this,n),!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!i||"string"!==typeof i)throw new Error('"message" must be a nonempty string.');return(o=t.call(this,i)).code=e,void 0!==s&&(o.data=s),o}return i(n,[{key:"serialize",value:function(){var e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}},{key:"toString",value:function(){return u.default(this.serialize(),h,2)}}]),n}(a(Error));t.EthereumRpcError=c;var l=function(e){s(n,e);var t=o(n);function n(e,i,s){if(r(this,n),!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');return t.call(this,e,i,s)}return i(n)}(c);function h(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=l},19840:function(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."}}},97593:function(e,t,n){"use strict";var r=n(27424).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;var i=n(84813),s=n(18166),o=n(19840);function a(e,t){var n=c(t),o=r(n,2),a=o[0],u=o[1];return new i.EthereumRpcError(e,a||s.getMessageFromCode(e),u)}function u(e,t){var n=c(t),o=r(n,2),a=o[0],u=o[1];return new i.EthereumProviderError(e,a||s.getMessageFromCode(e),u)}function c(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){var t=e.message,n=e.data;
1if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.ethErrors={rpc:{parse:function(e){return a(o.errorCodes.rpc.parse,e)},invalidRequest:function(e){return a(o.errorCodes.rpc.invalidRequest,e)},invalidParams:function(e){return a(o.errorCodes.rpc.invalidParams,e)},methodNotFound:function(e){return a(o.errorCodes.rpc.methodNotFound,e)},internal:function(e){return a(o.errorCodes.rpc.internal,e)},server:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");var t=e.code;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:function(e){return a(o.errorCodes.rpc.invalidInput,e)},resourceNotFound:function(e){return a(o.errorCodes.rpc.resourceNotFound,e)},resourceUnavailable:function(e){return a(o.errorCodes.rpc.resourceUnavailable,e)},transactionRejected:function(e){return a(o.errorCodes.rpc.transactionRejected,e)},methodNotSupported:function(e){return a(o.errorCodes.rpc.methodNotSupported,e)},limitExceeded:function(e){return a(o.errorCodes.rpc.limitExceeded,e)}},provider:{userRejectedRequest:function(e){return u(o.errorCodes.provider.userRejectedRequest,e)},unauthorized:function(e){return u(o.errorCodes.provider.unauthorized,e)},unsupportedMethod:function(e){return u(o.errorCodes.provider.unsupportedMethod,e)},disconnected:function(e){return u(o.errorCodes.provider.disconnected,e)},chainDisconnected:function(e){return u(o.errorCodes.provider.chainDisconnected,e)},custom:function(e){if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");var t=e.code,n=e.message,r=e.data;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new i.EthereumProviderError(t,n,r)}}}},77829:function(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;var r=n(84813);Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});var i=n(18166);Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=n(97593);Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});var o=n(19840);Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},18166:function(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;var r=n(19840),i=n(84813),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:s,message:u(s)};function u(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(e)){var i=e.toString();if(d(r.errorValues,i))return r.errorValues[i].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(e){if(!Number.isInteger(e))return!1;var 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=u,t.isValidCode=c,t.serializeError=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=r.fallbackError,o=void 0===s?a:s,l=r.shouldIncludeStack,f=void 0!==l&&l;if(!o||!Number.isInteger(o.code)||"string"!==typeof o.message)throw new Error("Mu
1st provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();var p={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){var g=e;p.code=g.code,g.message&&"string"===typeof g.message?(p.message=g.message,d(g,"data")&&(p.data=g.data)):(p.message=u(p.code),p.data={originalError:h(e)})}else{p.code=o.code;var m=null===(t=e)||void 0===t?void 0:t.message;p.message=m&&"string"===typeof m?m:o.message,p.data={originalError:h(e)}}var v=null===(n=e)||void 0===n?void 0:n.stack;return f&&e&&v&&"string"===typeof v&&(p.stack=v),p}},42054:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:i}},35213:function(e,t,n){"use strict";var r=n(95925),i=n(94160),s=n(42054);e.exports={formats:s,parse:i,stringify:r}},94160:function(e,t,n){"use strict";var r=n(65074),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(s),c=a?s.slice(0,a.index):s,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var h=0;n.depth>0&&null!==(a=o.exec(s))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+s.slice(a.index)+"]"),function(e,t,n,r){for(var i=r?t:u(t,n),s=e.length-1;s>=0;--s){var o,a=e[s];if("[]"===a&&n.parseArrays)o=[].concat(i);else{o=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);n.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(o=[])[l]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof e?function(e,t){var n,c={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,h),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var g,m,v=d[n],b=v.indexOf("]="),y=-1===b?v.indexOf("="):b+1;-1===y?(g=t.decoder(v,o.decoder,p,"key"),m=t.strictNullHandling?null:""):(g=t.decoder(v.slice(0,y),o.decoder,p,"key"),m=r.maybeMap(u(v.slice(y+1),t),(function(e){return t.decoder(e,o.decoder,p,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===p&&(m=a(m)),v.indexOf("[]=")>-1&&(m=s(m)?[m]:m),i.call(c,g)?c[g]=r.combine(c[g],m):c[g]=m}return c}(e,n):e,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],g=c(p,l[p],n,"string"===typeof e);h=r.merge(h,g,n)}return!0===n.allowSparse?h:r.compact(h)}},95925:function(e,t,n){"use strict";var r=n(43472),i=n(65074),s=n(42054),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=String.prototype.split,l=Array.prototype.push,h=function(e,t){l.apply(e,u(t)?t:[t])},d=Date.prototype.toISOString,f=s.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:s.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},g={},m=function e(t,n,s,o,a,l,d,f,m,v,b,y,w,M,k){for(var E,_=t,x=k,S=0,C=!1;void 0!==(x=x.get(g))&&!C;){var I=x.get(t);if(S+=1,"undefined"!==typeof I){if(I===S)throw new RangeError("Cyclic object value");C=!0}"undefined"===typeof x.get(g)&&(S=0)}if("function"===typeof d?_=d(n,_):_ instanceof Date?_=v(_):"comma"===s&&u(_)&&(_=i.maybeMap(_,(function(e){return e instanceof Date?v(e):e}))),null===_){if(o)return l&&!w?l(n,p.encoder,M,"key",b):n;_=""}if("string"===typeof(E=_)||"number"===typeof E||"boolean"===typeof E||"symbol"===typeof E||"bigint"===typeof E||i.isBuffer(_)){if(l){var A=w?n:l(n,p.encoder,M,"key",b);if("comma"===s&&w){for(var N=c.call(String(_),","),R="",L=0;L<N.length;++L)R+=(0===L?"":",")+y(l(N[L],p.encoder,M,"value",b));return[y(A)+"="+R]}return[y(A)+"="+y(l(_,p.encoder,M,"value",b))]}return[y(n)+"="+y(String(_))]}var O,D=[];if("undefined"===typeof _)return D;if("comma"===s&&u(_))O=[{value:_.length>0?_.join(",")||null:void 0}];else if(u(d))O=d;else{var T=Object.keys(_);O=f?T.sort(f):T}for(var P=0;P<O.length;++P){var j=O[P],B="object"===typeof j&&"undefined"!==typeof j.value?j.value:_[j];if(!a||null!==B){var W=u(_)?"function"===typeof s?s(n,j):n:n+(m?"."+j:"["+j+"]");k.set(t,S);var U=r();U.set(g,k),h(D,e(B,W,s,o,a,l,d,f,m,v,b,y,w,M,U))}}return D};e.exports=function(e,t){var n,i=e,c=function(e){if(!e)return p;if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=s.default;if("undefined"!==typeof e.format){if(!o.call(s.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=s.formatters[n],i=p.filter;return("function"===typeof e.filter||u(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof c.filter?i=(0,c.filter)("",i):u(c.filter)&&(n=c.filter);var l,d=[];if("object"!==typeof i||null===i)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[l];n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var g=r(),v=0;v<n.length;++v){var b=n[v];c.skipNulls&&null===i[b]||h(d,m(i[b],b,f,c.strictNullHandling,c.skipNulls,c.encode?
1c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var y=d.join(c.delimiter),w=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),y.length>0?w+y:""}},65074:function(e,t,n){"use strict";var r=n(42054),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)"undefined"!==typeof e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],o=i.obj[i.prop],a=Object.keys(o),u=0;u<a.length;++u){var c=a[u],l=o[c];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:o,prop:c}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(s(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(e,t,n,i,s){if(0===e.length)return e;var a=e;if("symbol"===typeof e?a=Symbol.prototype.toString.call(e):"string"!==typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<a.length;++c){var l=a.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===r.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=o[l]:l<2048?u+=o[192|l>>6]+o[128|63&l]:l<55296||l>=57344?u+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=o[240|l>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(s(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!==typeof n){if(s(t))t.push(n);else{if(!t||"object"!==typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(n);var o=t;return s(t)&&!s(n)&&(o=a(t,r)),s(t)&&s(n)?(n.forEach((function(n,s){if(i.call(t,s)){var o=t[s];o&&"object"===typeof o&&n&&"object"===typeof n?t[s]=e(o,n,r):t.push(n)}else t[s]=n})),t):Object.keys(n).reduce((function(t,s){var o=n[s];return i.call(t,s)?t[s]=e(t[s],o,r):t[s]=o,t}),o)}}},39785:function(e){"use strict";e.exports={i8:"3.5.0"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.