1(this["webpackJsonptweetn-finance"]=this["webpackJsonptweetn-finance"]||[]).push([[9],{1042:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(65),o=n(91);var i=function(t){var e,n;function r(e){var n,r=(void 0===e?{}:e).supportedChainIds;return(n=t.call(this)||this).supportedChainIds=r,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.emitUpdate=function(t){this.emit(o.a.Update,t)},i.emitError=function(t){this.emit(o.a.Error,t)},i.emitDeactivate=function(){this.emit(o.a.Deactivate)},r}(r.EventEmitter)},1343:function(t,e,n){var r=n(1344),o=n(1345),i=n(1348),c={ethereum:"undefined"!==typeof window&&"undefined"!==typeof window.ethereum?window.ethereum:null,web3:"undefined"!==typeof window&&"undefined"!==typeof window.web3?window.web3.currentProvider:null},s="undefined"!==typeof window&&"undefined"!==typeof window.WebSocket?window.WebSocket:null,u="undefined"!==typeof window&&"undefined"!==typeof window.XMLHttpRequest?window.XMLHttpRequest:null;c.ethereum&&(c.ethereum.__isProvider=!0);var a={injected:c.ethereum||n(1349)(c.web3),ipc:n(1350)("IPC connections are unavliable in the browser"),ws:n(1351)(s),http:n(1353)(u)};t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["injected","frame"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(a,r(t,i),e)}},1344:function(t,e,n){var r=n(225).default,o=function(t){return"injected"===t?"injected":t.endsWith(".ipc")?"ipc":t.startsWith("wss://")||t.startsWith("ws://")?"ws":t.startsWith("https://")||t.startsWith("http://")?"http":""};t.exports=function(t,e){var n;return(n=[]).concat.apply(n,r([].concat(t).map((function(t){return e[t]?e[t].map((function(e){return{type:t,location:e,protocol:o(e)}})):{type:"custom",location:t,protocol:o(t)}})))).filter((function(t){return!(!t.protocol&&"injected"!==t.type)||(console.log('eth-provider | Invalid provider preset/location: "'+t.location+'"'),!1)}))}},1345:function(t,e,n){var r=n(2),o=n(5).default,i=n(65),c=n(1346),s=n(1347),u=function(t){function e(e){t.status=e,t instanceof i&&t.emit("status",e)}function n(){return c.apply(this,arguments)}function c(){return(c=o(r.mark((function o(){return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.inSetup){r.next=2;break}return r.abrupt("return",setTimeout(n,1e3));case 2:return r.prev=2,r.next=5,t.send("eth_syncing");case 5:if(!r.sent){r.next=10;break}e("syncing"),setTimeout((function(){return n()}),5e3),r.next=11;break;case 10:e("connected");case 11:r.next=16;break;case 13:r.prev=13,r.t0=r.catch(2),e("disconnected");case 16:case"end":return r.stop()}}),o,null,[[2,13]])})))).apply(this,arguments)}return e("loading"),n(),t.on("connect",(function(){return n()})),t.on("close",(function(){return e("disconnected")})),t};t.exports=function(t,e,n){if(t.injected.__isProvider&&e.map((function(t){return t.type})).indexOf("injected")>-1)return delete t.injected.__isProvider,u(t.injected);var r=new c(new s(t,e,n));return r.setMaxListeners(128),u(r)}},1346:function(t,e,n){var r=n(225).default,o=n(2),i=n(5).default,c=n(30).default,s=n(31).default,u=n(89).default,a=n(90).default,d=function(t){"use strict";u(n,t);var e=a(n);function n(t){var r;return c(this,n),(r=e.call(this)).connected=!1,r.nextId=0,r.promises={},r.subscriptions=[],r.connection=t,r.connection.on("connect",(function(){return r.checkConnection()})),r.connection.on("close",(function(){return r.emit("close")})),r.connection.on("payload",(function(t){var e=t.id,n=t.method,o=t.error,i=t.result;"undefined"!==typeof e?r.promises[e]&&(t.error?r.promises[e].reject(o):r.promises[e].resolve(i),delete r.promises[e]):n&&n.indexOf("_subscription")>-1&&(r.emit(t.params.subscription,t.params.result),r.emit(n,t.params),r.emit("data",t))})),r.on("newListener",(function(t,e){"networkChanged"===t?!r.attemptedNetworkSubscription&&r.connected&&r.startNetworkSubscription():"accountsChanged"===t&&!r.attemptedAccountsSubscription&&r.connected&&r.startAccountsSubscription()})),r}return s(n,[{key:"checkConnection",value:function(){var t=i(o.mark((function t(){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=this,t.next=4,this._send("net_version");case 4:t.t1=t.sent,t.t0.emit.call(t.t0,"connect",t.t1),this.connected=!0,this.listenerCount("networkChanged")&&!this.attemptedNetworkSubscription&&this.startNetworkSubscription(),this.listenerCount("accountsChanged")&&!this.attemptedAccountsSubscription&&this.startAccountsSubscription(),t.next=14;break;case 11:t.prev=11,t.t2=t.catch(0),this.connected=!1;case 14:case"end":return t.stop()}}),t,this,[[0,11]])})));return function(){return t.apply(this,arguments)}}()},{key:"startNetworkSubscription",value:function(){var t=i(o.mark((function t(){var e,n=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.attemptedNetworkSubscription=!0,t.prev=1,t.next=4,this.subscribe("eth_subscribe","networkChanged");case 4:e=t.sent,this.on(e,(function(t){return n.emit("networkChanged",t)})),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),console.warn("Unable to subscribe to networkChanged",t.t0);case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(){return t.apply(this,arguments)}}()},{key:"startAccountsSubscription",value:function(){var t=i(o.mark((function t(){var e,n=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.attemptedAccountsSubscription=!0,t.prev=1,t.next=4,this.subscribe("eth_subscribe","accountsChanged");case 4:e=t.sent,this.on(e,(function(t){return n.emit("accountsChanged",t)})),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),console.warn("Unable to subscribe to accountsChanged",t.t0);case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(){return t.apply(this,arguments)}}()},{key:"enable",value:function(){var t=this;return new Promise((function(e,n){t._send("eth_accounts").then((function(r){if(r.length>0)t.accounts=r,t.coinbase=r[0],t.emit("enable"),e(r);else{var o=new Error("User Denied Full Provider");o.code=4001,n(o)}})).catch(n)}))}},{key:"_send",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||"string"!==typeof t)return new Error("Method is not a valid string.");
1if(!(n instanceof Array))return new Error("Params is not a valid array.");var r={jsonrpc:"2.0",id:this.nextId++,method:t,params:n},o=new Promise((function(t,n){e.promises[r.id]={resolve:t,reject:n}}));return this.connection.send(r),o}},{key:"send",value:function(){return this._send.apply(this,arguments)}},{key:"_sendBatch",value:function(t){var e=this;return Promise.all(t.map((function(t){return e._send(t.method,t.params)})))}},{key:"subscribe",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this._send(t,[e].concat(r(o))).then((function(t){return n.subscriptions.push(t),t}))}},{key:"unsubscribe",value:function(t,e){var n=this;return this._send(t,[e]).then((function(t){if(t)return n.subscriptions=n.subscriptions.filter((function(t){return t!==e})),n.removeAllListeners(e),t}))}},{key:"sendAsync",value:function(t,e){return e&&"function"===typeof e?t?t instanceof Array?this.sendAsyncBatch(t,e):this._send(t.method,t.params).then((function(n){e(null,{id:t.id,jsonrpc:t.jsonrpc,result:n})})).catch((function(t){e(t)})):e(new Error("Invalid Payload")):e(new Error("Invalid or undefined callback provided to sendAsync"))}},{key:"sendAsyncBatch",value:function(t,e){return this._sendBatch(t).then((function(n){var r=n.map((function(e,n){return{id:t[n].id,jsonrpc:t[n].jsonrpc,result:e}}));e(null,r)})).catch((function(t){e(t)}))}},{key:"isConnected",value:function(){return this.connected}},{key:"close",value:function(){var t=this;this.connection.close(),this.connected=!1;var e=new Error("Provider closed, subscription lost, please subscribe again.");this.subscriptions.forEach((function(n){return t.emit(n,e)})),this.subscriptions=[]}}]),n}(n(65));t.exports=d},1347:function(t,e,n){var r=n(30).default,o=n(31).default,i=n(89).default,c=n(90).default,s=n(65),u=!1,a=function(t){"use strict";i(n,t);var e=c(n);function n(t,o,i){var c;return r(this,n),(c=e.call(this)).targets=o,c.connections=t,c.connected=!1,c.status="loading",c.interval=i.interval||5e3,c.name=i.name||"default",c.inSetup=!0,c.connect(),c}return o(n,[{key:"connect",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.connection&&"connected"===this.connection.status&&e>=this.connection.index)u;else if(0===this.targets.length)u;else{var n=this.targets[e],r=n.protocol,o=n.location;this.connection=this.connections[r](o),this.connection.on("error",(function(n){return t.connected?t.listenerCount("error")?t.emit("error",n):void console.warn("eth-provider - Uncaught connection error: "+n.message):t.connectionError(e,n)})),this.connection.on("close",(function(e){t.connected=!1,t.emit("close"),t.closing||t.refresh()})),this.connection.on("connect",(function(){t.connection.target=t.targets[e],t.connection.index=e,t.targets[e].status=t.connection.status,t.connected=!0,t.inSetup=!1,t.emit("connect")})),this.connection.on("data",(function(e){return t.emit("data",e)})),this.connection.on("payload",(function(e){return t.emit("payload",e)}))}}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.interval;clearTimeout(this.connectTimer),this.connectTimer=setTimeout((function(){return t.connect()}),e)}},{key:"connectionError",value:function(t,e){this.targets[t].status=e,this.targets.length-1===t?(this.inSetup=!1,this.refresh()):this.connect(++t)}},{key:"close",value:function(){this.closing=!0,this.connection?this.connection.close():this.emit("close"),clearTimeout(this.connectTimer)}},{key:"error",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.emit("payload",{id:t.id,jsonrpc:t.jsonrpc,error:{message:e,code:n}})}},{key:"send",value:function(t){var e=this;this.inSetup?setTimeout((function(){return e.send(t)}),100):this.connection.closed?this.error(t,"Not connected"):this.connection.send(t)}}]),n}(s);t.exports=a},1348:function(t,e){t.exports={injected:["injected"],frame:["ws://127.0.0.1:1248","http://127.0.0.1:1248"],direct:["ws://127.0.0.1:8546","http://127.0.0.1:8545"],infura:["wss://mainnet.infura.io/ws/v3/786ade30f36244469480aa5c2bf0743b","https://mainnet.infura.io/v3/786ade30f36244469480aa5c2bf0743b"],infuraRopsten:["wss://ropsten.infura.io/ws/v3/786ade30f36244469480aa5c2bf0743b","https://ropsten.infura.io/v3/786ade30f36244469480aa5c2bf0743b"],infuraRinkeby:["wss://rinkeby.infura.io/ws/v3/786ade30f36244469480aa5c2bf0743b","https://rinkeby.infura.io/v3/786ade30f36244469480aa5c2bf0743b"],infuraKovan:["wss://kovan.infura.io/ws/v3/786ade30f36244469480aa5c2bf0743b","https://kovan.infura.io/v3/786ade30f36244469480aa5c2bf0743b"]}},1349:function(t,e,n){var r=n(31).default,o=n(30).default,i=n(89).default,c=n(90).default,s=function(t){"use strict";i(n,t);var e=c(n);function n(t,r){var i;return o(this,n),i=e.call(this),t?setTimeout((function(){return i.emit("error",new Error("Injected web3 provider is not currently supported"))}),0):setTimeout((function(){return i.emit("error",new Error("No injected provider found"))}),0),i}return r(n)}(n(65));t.exports=function(t){return function(e){return new s(t,e)}}},1350:function(t,e,n){var r=n(31).default,o=n(30).default,i=n(89).default,c=n(90).default,s=function(t){"use strict";i(n,t);var e=c(n);function n(t){var r;return o(this,n),r=e.call(this),setTimeout((function(){return r.emit("error",new Error(t))}),0),r}return r(n)}(n(65));t.exports=function(t){return function(){return new s(t)}}},1351:function(t,e,n){var r,o=n(30).default,i=n(31).default,c=n(89).default,s=n(90).default,u=n(65),a=n(1352),d=function(t){"use strict";c(n,t);var e=s(n);function n(t,i,c){var s;return o(this,n),s=e.call(this),r=t,setTimeout((function(){return s.create(i,c)}),0),s}return i(n,[{key:"create",value:function(t,e){var n=this;
1r||this.emit("error",new Error("No WebSocket transport available"));try{this.socket=new r(t)}catch(o){return this.emit("error",o)}this.socket.addEventListener("error",(function(t){return n.emit("error",t)})),this.socket.addEventListener("open",(function(){n.emit("connect"),n.socket.addEventListener("message",(function(t){var e="string"===typeof t.data?t.data:"";a(e,(function(t,e){t||e.forEach((function(t){Array.isArray(t)?t.forEach((function(t){return n.emit("payload",t)})):n.emit("payload",t)}))}))})),n.socket.addEventListener("close",(function(){return n.onClose()}))}))}},{key:"onClose",value:function(){this.socket=null,this.closed=!0,this.emit("close"),this.removeAllListeners()}},{key:"close",value:function(){this.socket?this.socket.close():this.onClose()}},{key:"error",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.emit("payload",{id:t.id,jsonrpc:t.jsonrpc,error:{message:e,code:n}})}},{key:"send",value:function(t){var e=this;this.socket&&this.socket.readyState===this.socket.CONNECTING?setTimeout((function(n){return e.send(t)}),10):!this.socket||this.socket.readyState>1?(this.connected=!1,this.error(t,"Not connected")):this.socket.send(JSON.stringify(t))}}]),n}(u);t.exports=function(t){return function(e,n){return new d(t,e,n)}}},1352:function(t,e){var n,r;t.exports=function(t,e){var o=[];t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(t){var i;n&&(t=n+t);try{i=JSON.parse(t)}catch(c){return n=t,clearTimeout(r),void(r=setTimeout((function(){return e(new Error("Parse response timeout"))}),15e3))}clearTimeout(r),n=null,i&&o.push(i)})),e(null,o)}},1353:function(t,e,n){var r,o=n(30).default,i=n(31).default,c=n(89).default,s=n(90).default,u=n(65),a=n(399),d=function(t){"use strict";c(n,t);var e=s(n);function n(t,i,c){var s;return o(this,n),s=e.call(this),r=t,s.connected=!1,s.subscriptions=!1,s.status="loading",s.url=i,s.pollId=a(),setTimeout((function(){return s.create()}),0),s}return i(n,[{key:"create",value:function(){var t=this;if(!r)return this.emit("error",new Error("No HTTP transport available"));this.on("error",(function(){t.connected&&t.close()})),this.init()}},{key:"init",value:function(){var t=this;this.send({jsonrpc:"2.0",method:"eth_syncing",params:[],id:1},(function(e,n){if(e)return t.emit("error",e);t.send({jsonrpc:"2.0",id:1,method:"eth_pollSubscriptions",params:[t.pollId,"immediate"]},(function(e,n){e||(t.subscriptions=!0,t.pollSubscriptions()),t.connected=!0,t.emit("connect")}))}))}},{key:"pollSubscriptions",value:function(){var t=this;this.send({jsonrpc:"2.0",id:1,method:"eth_pollSubscriptions",params:[this.pollId]},(function(e,n){if(e)return t.subscriptionTimeout=setTimeout((function(){return t.pollSubscriptions()}),1e4),t.emit("error",e);t.closed||(t.subscriptionTimeout=t.pollSubscriptions()),n&&n.map((function(t){var e;try{e=JSON.parse(t)}catch(n){e=!1}return e})).filter((function(t){return t})).forEach((function(e){return t.emit("payload",e)}))}
1))}},{key:"close",value:function(){this.closed=!0,this.emit("close"),clearTimeout(this.subscriptionTimeout),this.removeAllListeners()}},{key:"filterStatus",value:function(t){if(t.status>=200&&t.status<300)return t;var e=new Error(t.statusText);throw e.res=t,e.message}},{key:"error",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.emit("payload",{id:t.id,jsonrpc:t.jsonrpc,error:{message:e,code:n}})}},{key:"send",value:function(t,e){var n=this;if(this.closed)return this.error(t,"Not connected");if("eth_subscribe"===t.method){if(!this.subscriptions)return this.error(t,"Subscriptions are not supported by this HTTP endpoint");t.pollId=this.pollId}var o=new r,i=!1,c=function(r,c){if(!i)if(o.abort(),i=!0,e)e(r,c);else{var s=t.id,u=t.jsonrpc,a=r?{id:s,jsonrpc:u,error:{message:r.message,code:r.code}}:{id:s,jsonrpc:u,result:c};n.emit("payload",a)}};o.open("POST",this.url,!0),o.setRequestHeader("Content-Type","application/json"),o.timeout=6e4,o.onerror=c,o.ontimeout=c,o.onreadystatechange=function(){if(4===o.readyState)try{var t=JSON.parse(o.responseText);c(t.error,t.result)}catch(e){c(e)}},o.send(JSON.stringify(t))}}]),n}(u);t.exports=function(t){return function(e,n){return new d(t,e,n)}}},1747:function(t,e,n){"use strict";n.r(e),n.d(e,"FrameConnector",(function(){return v})),n.d(e,"UserRejectedRequestError",(function(){return p}));var r=n(1042),o=n(1343),i=n.n(o),c=n(73);function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function h(t,e,n){return h=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&a(o,n.prototype),o},h.apply(null,arguments)}function f(t){var e="function"===typeof Map?new Map:void 0;return f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return h(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)},f(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var p=function(t){function e(){var e;return(e=t.call(this)||this).name=e.constructor.name,e.message="The user rejected the request.",e}return s(e,t),e}(f(Error)),v=function(t){function e(e){var n;return 1!==e.supportedChainIds.length&&Object(c.a)(!1),(n=t.call(this,e)||this).handleNetworkChanged=n.handleNetworkChanged.bind(l(n)),n.handleChainChanged=n.handleChainChanged.bind(l(n)),n.handleAccountsChanged=n.handleAccountsChanged.bind(l(n)),n.handleClose=n.handleClose.bind(l(n)),n}s(e,t);var n=e.prototype;return n.handleNetworkChanged=function(t){this.emitUpdate({provider:this.provider,chainId:t})},n.handleChainChanged=function(t){this.emitUpdate({chainId:t})},n.handleAccountsChanged=function(t){this.emitUpdate({account:0===t.length?null:t[0]})},n.handleClose=function(t,e){this.emitDeactivate()},n.activate=function(){try{var t=this;return t.provider||(t.provider=i()("frame")),t.provider.on("networkChanged",t.handleNetworkChanged).on("chainChanged",t.handleChainChanged).on("accountsChanged",t.handleAccountsChanged).on("close",t.handleClose),Promise.resolve(t.provider.enable().then((function(t){return t[0]})).catch((function(t){throw t&&4001===t.code?new p:t}))).then((function(e){return{provider:t.provider,account:e}}))}catch(e){return Promise.reject(e)}},n.getProvider=function(){try{return Promise.resolve(this.provider)}catch(t){return Promise.reject(t)}},n.getChainId=function(){try{return Promise.resolve(this.provider.send("eth_chainId"))}catch(t){return Promise.reject(t)}},n.getAccount=function(){try{return Promise.resolve(this.provider.send("eth_accounts").then((function(t){return t[0]})))}catch(t){return Promise.reject(t)}},n.deactivate=function(){this.provider.removeListener("networkChanged",this.handleNetworkChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("accountsChanged",this.handleAccountsChanged).removeListener("close",this.handleClose)},e}(r.a)}}]);
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.