1"use strict";(self.webpackChunkdexguru=self.webpackChunkdexguru||[]).push([[3226],{74724:(e,r,t)=>{t.d(r,{Q:()=>h});var o=t(99138),n=t(78663),s=t(49229),i=t(58256);const a=new n.Logger(s.i);let c=1;function u(e,r){const t="Web3LegacyFetcher";return function(e,n){const s={method:e,params:n,id:c++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:t,request:(0,o.deepCopy)(s),provider:this}),r(s,((r,o)=>{if(r)return this.emit("debug",{action:"response",fetcher:t,error:r,request:s,provider:this}),n(r);if(this.emit("debug",{action:"response",fetcher:t,request:s,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class h extends i.r{constructor(e,r){null==e&&a.throwArgumentError("missing provider","provider",e);let t=null,n=null,s=null;"function"===typeof e?(t="unknown:",n=e):(t=e.host||e.path||"",!t&&e.isMetaMask&&(t="metamask"),s=e,e.request?(""===t&&(t="eip-1193:"),n=function(e){return function(r,t){null==t&&(t=[]);const n={method:r,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,o.deepCopy)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=u(0,e.sendAsync.bind(e)):e.send?n=u(0,e.send.bind(e)):a.throwArgumentError("unsupported provider","provider",e),t||(t="unknown:")),super(t,r),(0,o.defineReadOnly)(this,"jsonRpcFetchFunc",n),(0,o.defineReadOnly)(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}},56082:(e,r,t)=>{t.d(r,{q:()=>d});var o=t(82895),n=t(99138),s=t(58256),i=t(78663),a=t(49229);let c=null;try{if(c=WebSocket,null==c)throw new Error("inject please")}catch(g){const e=new i.Logger(a.i);c=function(){e.throwError("WebSockets not supported in this environment",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var u=function(e,r,t,o){return new(t||(t=Promise))((function(n,s){function i(e){try{c(o.next(e))}catch(r){s(r)}}function a(e){try{c(o.throw(e))}catch(r){s(r)}}function c(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,a)}c((o=o.apply(e,r||[])).next())}))};const h=new i.Logger(a.i);let l=1;class d extends s.r{constructor(e,r){"any"===r&&h.throwError("WebSocketProvider does not support 'any' network yet",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"===typeof e?e:"_websocket",r),this._pollingInterval=-1,this._wsReady=!1,"string"===typeof e?(0,n.defineReadOnly)(this,"_websocket",new c(this.connection.url)):(0,n.defineReadOnly)(this,"_websocket",e),(0,n.defineReadOnly)(this,"_requests",{}),(0,n.defineReadOnly)(this,"_subs",{}),(0,n.defineReadOnly)(this,"_subIds",{}),(0,n.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const r=e.data,t=JSON.parse(r);if(null!=t.id){const e=String(t.id),o=this._requests[e];if(delete this._requests[e],void 0!==t.result)o.callback(null,t.result),this.emit("debug",{action:"response",request:JSON.parse(o.payload),response:t.result,provider:this});else{let e=null;t.error?(e=new Error(t.error.message||"unknown error"),(0,n.defineReadOnly)(e,"code",t.error.code||null),(0,n.defineReadOnly)(e,"response",r)):e=new Error("unknown error"),o.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(o.payload),provider:this})}}else if("eth_subscription"===t.method){const e=this._subs[t.params.subscription];e&&e.processFunc(t.params.result)}else console.warn("this should not happen")};const t=setInterval((()=>{this.emit("poll")}),1e3);t.unref&&t.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){h.throwError("cannot reset events block on WebSocketProvider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){h.throwError("cannot set polling interval on WebSocketProvider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return u(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&h.throwError("cannot set polling on WebSocketProvider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,r){const t=l++;return new Promise(((o,n)=>{const s=JSON.stringify({method:e,params:r,id:t,jsonrpc:"2.0"});
1this.emit("debug",{action:"request",request:JSON.parse(s),provider:this}),this._requests[String(t)]={callback:function(e,r){return e?n(e):o(r)},payload:s},this._wsReady&&this.websocket.send(s)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,r,t){return u(this,void 0,void 0,(function*(){let o=this._subIds[e];null==o&&(o=Promise.all(r).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=o);const n=yield o;this._subs[n]={tag:e,processFunc:t}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const r=o.O$.from(e.number).toNumber();this._emitted.block=r,this.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(r=>{null==r.removed&&(r.removed=!1),this.emit(e.filter,this.formatter.filterLog(r))}));break;case"tx":{const r=e=>{const r=e.hash;this.getTransactionReceipt(r).then((e=>{e&&this.emit(r,e)}))};r(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(r)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let r=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;r="tx"}else if(this.listenerCount(e.event))return;const t=this._subIds[r];t&&(delete this._subIds[r],t.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return u(this,void 0,void 0,(function*(){this.websocket.readyState===c.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}},29373:(e,r,t)=>{t.r(r),t.d(r,{randomBytes:()=>o.O,shuffled:()=>n.y});var o=t(32899),n=t(27547)},32899:(e,r,t)=>{t.d(r,{O:()=>c});var o=t(80928),n=t(78663);const s=new n.Logger("random/5.7.0");const i=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t.g)return t.g;throw new Error("unable to locate global object")}();let a=i.crypto||i.msCrypto;function c(e){(e<=0||e>1024||e%1||e!=e)&&s.throwArgumentError("invalid length","length",e);const r=new Uint8Array(e);return a.getRandomValues(r),(0,o.arrayify)(r)}a&&a.getRandomValues||(s.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(e){return s.throwError("no secure random source avaialble",n.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},27547:(e,r,t)=>{function o(e){for(let r=(e=e.slice()).length-1;r>0;r--){const t=Math.floor(Math.random()*(r+1)),o=e[r];e[r]=e[t],e[t]=o}return e}t.d(r,{y:()=>o})},69702:(e,r,t)=>{t.r(r),t.d(r,{decode:()=>d,encode:()=>u});var o=t(80928),n=t(78663);const s=new n.Logger("rlp/5.7.0");function i(e){const r=[];for(;e;)r.unshift(255&e),e>>=8;return r}function a(e,r,t){let o=0;for(let n=0;n<t;n++)o=256*o+e[r+n];return o}function c(e){if(Array.isArray(e)){let r=[];if(e.forEach((function(e){r=r.concat(c(e))})),r.length<=55)return r.unshift(192+r.length),r;const t=i(r.length);return t.unshift(247+t.length),t.concat(r)}(0,o.isBytesLike)(e)||s.throwArgumentError("RLP object must be BytesLike","object",e);const r=Array.prototype.slice.call((0,o.arrayify)(e));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;const t=i(r.length);return t.unshift(183+t.length),t.concat(r)}function u(e){return(0,o.hexlify)(c(e))}function h(e,r,t,o){const i=[];for(;t<r+1+o;){const a=l(e,t);i.push(a.result),(t+=a.consumed)>r+1+o&&s.throwError("child data too short",n.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+o,result:i}}function l(e,r){if(0===e.length&&s.throwError("data too short",n.Logger.errors.BUFFER_OVERRUN,{}),e[r]>=248){const t=e[r]-247;r+1+t>e.length&&s.throwError("data short segment too short",n.Logger.errors.BUFFER_OVERRUN,{});const o=a(e,r+1,t);return r+1+t+o>e.length&&s.throwError("data long segment too short",n.Logger.errors.BUFFER_OVERRUN,{}),h(e,r,r+1+t,t+o)}if(e[r]>=192){const t=e[r]-192;return r+1+t>e.length&&s.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{}),h(e,r,r+1,t)}if(e[r]>=184){const t=e[r]-183;r+1+t>e.length&&s.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{});const i=a(e,r+1,t);r+1+t+i>e.length&&s.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+t+i,result:(0,o.hexlify)(e.slice(r+1+t,r+1+t+i))}}if(e[r]>=128){const t=e[r]-128;r+1+t>e.length&&s.throwError("data too short",n.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+t,result:(0,o.hexlify)(e.slice(r+1,r+1+t))}}return{consumed:1,result:(0,o.hexlify)(e[r])}}function d(e){const r=(0,o.arrayify)(e),t=l(r,0);return t.consumed!==r.length&&s.throwArgumentError("invalid rlp data","data",e),t.result}},40025:(e,r,t)=>{t.r(r),t.d(r,{computeHmac:()=>o.Gy,ripemd160:()=>o.bP,sha256:()=>o.JQ,sha512:()=>
1o.o,SupportedAlgorithm:()=>n.p});var o=t(42299),n=t(90478)},42299:(e,r,t)=>{t.d(r,{Gy:()=>d,bP:()=>u,JQ:()=>h,o:()=>l});var o=t(81739),n=t.n(o),s=t(80928),i=t(90478),a=t(78663);const c=new a.Logger("sha2/5.7.0");function u(e){return"0x"+n().ripemd160().update((0,s.arrayify)(e)).digest("hex")}function h(e){return"0x"+n().sha256().update((0,s.arrayify)(e)).digest("hex")}function l(e){return"0x"+n().sha512().update((0,s.arrayify)(e)).digest("hex")}function d(e,r,t){return i.p[e]||c.throwError("unsupported algorithm "+e,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+n().hmac(n()[e],(0,s.arrayify)(r)).update((0,s.arrayify)(t)).digest("hex")}},90478:(e,r,t)=>{var o;t.d(r,{p:()=>o}),function(e){e.sha256="sha256",e.sha512="sha512"}(o||(o={}))}}]);
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.