PageSourceSearch

https://carv.io/assets/ethersproject_logger-giz6h4wi.js

js carv.io collected 2026-10-02 04:55:23 UTC 5,054 bytes, 2 lines download raw bytes

1try{let r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new r.Error).stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="ea26cde5-ac99-4a5b-b0e0-3c58717dfb2e",r._sentryDebugIdIdentifier="sentry-dbid-ea26cde5-ac99-4a5b-b0e0-3c58717dfb2e")}catch(c){}let r=!1,e=!1;const t={debug:1,default:2,info:2,warning:3,error:4,off:5};let o=t.default,n=null;const s=function(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(t){r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}();var E,a,i,N;(a=E||(E={})).DEBUG="DEBUG",a.INFO="INFO",a.WARNING="WARNING",a.ERROR="ERROR",a.OFF="OFF",(N=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",N.NOT_IMPLEMENTED="NOT_IMPLEMENTED",N.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",N.NETWORK_ERROR="NETWORK_ERROR",N.SERVER_ERROR="SERVER_ERROR",N.TIMEOUT="TIMEOUT",N.BUFFER_OVERRUN="BUFFER_OVERRUN",N.NUMERIC_FAULT="NUMERIC_FAULT",N.MISSING_NEW="MISSING_NEW",N.INVALID_ARGUMENT="INVALID_ARGUMENT",N.MISSING_ARGUMENT="MISSING_ARGUMENT",N.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",N.CALL_EXCEPTION="CALL_EXCEPTION",N.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",N.NONCE_EXPIRED="NONCE_EXPIRED",N.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",N.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",N.TRANSACTION_REPLACED="TRANSACTION_REPLACED",N.ACTION_REJECTED="ACTION_REJECTED";const l="0123456789abcdef";class R{constructor(r){Object.defineProperty(this,"version",{enumerable:!0,value:r,writable:!1})}_log(r,e){const o=r.toLowerCase();null==t[o]&&this.throwArgumentError("invalid log level name","logLevel",r)}debug(...r){this._log(R.levels.DEBUG,r)}info(...r){this._log(R.levels.INFO,r)}warn(...r){this._log(R.levels.WARNING,r)}makeError(r,t,o){if(e)return this.makeError("censored error",t,{});t||(t=R.errors.UNKNOWN_ERROR),o||(o={});const n=[];Object.keys(o).forEach(r=>{const e=o[r];try{if(e instanceof Uint8Array){let t="";for(let r=0;r<e.length;r++)t+=l[e[r]>>4],t+=l[15&e[r]];n.push(r+"=Uint8Array(0x"+t+")")}else n.push(r+"="+JSON.stringify(e))}catch(t){n.push(r+"="+JSON.stringify(o[r].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);const s=r;let E="";switch(t){case i.NUMERIC_FAULT:{E="NUMERIC_FAULT";const e=r;switch(e){case"overflow":case"underflow":case"division-by-zero":E+="-"+e;break;case"negative-power":case"negative-width":E+="-unsupported";break;case"unbound-bitwise-result":E+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:E=t}E&&(r+=" [ See: https://links.ethers.org/v5-errors-"+E+" ]"),n.length&&(r+=" ("+n.join(", ")+")");const a=new Error(r);return a.reason=s,a.code=t,Object.keys(o).forEach(function(r){a[r]=o[r]}),a}throwError(r,e,t){throw this.makeError(r,e,t)}throwArgumentError(r,e,t){return this.throwError(r,R.errors.INVALID_ARGUMENT,{argument:e,value:t})}assert(r,e,t,o){r||this.throwError(e,t,o)}assertArgument(r,e,t,o){r||this.throwArgumentError(e,t,o)}checkNormalize(r){s&&this.throwError("platform missing String.prototype.normalize",R.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:s})}checkSafeUint53(r,e){"number"==typeof r&&(null==e&&(e="value not safe"),(r<0||r>=9007199254740991)&&this.throwError(e,R.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:r}),r%1&&this.throwError(e,R.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:r}))}checkArgumentCount(r,e,t){t=t?": "+t:"",r<e&&this.throwError("missing argument"+t,R.errors.MISSING_ARGUMENT,{count:r,expectedCount:e}),r>e&&this.throwError("too many arguments"+t,R.errors.UNEXPECTED_ARGUMENT,{count:r,expectedCount:e})}checkNew(r,e){r!==Object&&null!=r||this.throwError("missing new",R.errors.MISSING_NEW,{name:e.name})}checkAbstract(r,e){r===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",R.errors.UNSUPPORTED_OPERATION,{name:r.name,operation:"new"}):r!==Object&&null!=r||this.throwError("missing new",R.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return n||(n=new R("logger/5.7.0")),n}static setCensorship(t,o){if(!t&&o&&this.globalLogger().throwError("cannot permanently disable censorship",R.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!t)return;this.globalLogger().throwError("error censorship permanent",R.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}e=!!t,r=!!o}static setLogLevel(r){const e=t[r.toLowerCase()];null!=e?o=e:R.globalLogger().warn("invalid log level - "+r)}static from(r){return new R(r)}}R.errors=i,R.levels=E;export{R as L};
2//# sourceMappingURL=ethersproject_logger-giz6h4wi.js.map

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.