ethers.js/dist/shims.js

1 line
142 KiB
JavaScript
Raw Permalink Normal View History

2018-11-28 00:03:39 +03:00
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this)._shims=t()}}(function(){return function i(s,u,a){function f(e,t){if(!u[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(c)return c(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=u[e]={exports:{}};s[e][0].call(o.exports,function(t){return f(s[e][1][t]||t)},o,o.exports,i,s,u,a)}return u[e].exports}for(var c="function"==typeof require&&require,t=0;t<a.length;t++)f(a[t]);return f}({1:[function(t,e,r){(function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=(r=e.atob,(n=function(t){return r(String(t).replace(/[\t\n\f\r ]+/g,""))}).original=r,n)}else{var r,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(t){for(var e,r,n,o,i="",s=0,u=(t=String(t)).length%3;s<t.length;){if(255<(r=t.charCodeAt(s++))||255<(n=t.charCodeAt(s++))||255<(o=t.charCodeAt(s++)))throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");i+=a.charAt((e=r<<16|n<<8|o)>>18&63)+a.charAt(e>>12&63)+a.charAt(e>>6&63)+a.charAt(63&e)}return u?i.slice(0,u-3)+"===".substring(u):i},e.atob=function(t){if(t=String(t).replace(/[\t\n\f\r ]+/g,""),!s.test(t))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");t+="==".slice(2-(3&t.length));for(var e,r,n,o="",i=0;i<t.length;)e=a.indexOf(t.charAt(i++))<<18|a.indexOf(t.charAt(i++))<<12|(r=a.indexOf(t.charAt(i++)))<<6|(n=a.indexOf(t.charAt(i++))),o+=64===r?String.fromCharCode(e>>16&255):64===n?String.fromCharCode(e>>16&255,e>>8&255):String.fromCharCode(e>>16&255,e>>8&255,255&e);return o}}})(void 0!==r?r:this)},{}],2:[function(V,r,n){(function(U){var t,e;t=this,e=function(){"use strict";function f(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,e=void 0,o=void 0,u=function(t,e){l[n]=t,l[n+1]=e,2===(n+=2)&&(o?o(p):y())};var t="undefined"!=typeof window?window:void 0,i=t||{},s=i.MutationObserver||i.WebKitMutationObserver,a="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var t=setTimeout;return function(){return t(p,1)}}var l=new Array(1e3);function p(){for(var t=0;t<n;t+=2){(0,l[t])(l[t+1]),l[t]=void 0,l[t+1]=void 0}n=0}var d,v,g,w,y=void 0;function m(t,e){var r=arguments,n=this,o=new this.constructor(_);void 0===o[C]&&L(o);var i,s=n._state;return s?(i=r[s-1],u(function(){return K(s,o,i,n._result)})):k(n,o,t,e),o}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(_);return j(e,t),e}a?y=function(){return process.nextTick(p)}:s?(v=0,g=new s(p),w=document.createTextNode(""),g.observe(w,{characterData:!0}),y=function(){w.data=v=++v%2}):c?((d=new MessageChannel).port1.onmessage=p,y=function(){return d.port2.postMessage(0)}):y=void 0===t&&"function"==typeof V?function(){try{var t=V("vertx");return void 0!==(e=t.runOnLoop||t.runOnContext)?function(){e(p)}:h()}catch(t){return h()}}():h();var C=Math.random().toString(36).substring(16);function _(){}var A=void 0,S=1,x=2,F=new O;function B(t){try{return t.then}catch(t){return F.error=t,F}}function N(t,e,r){var n,o,i,s;e.constructor===t.constructor&&r===m&&e.constructor.resolve===b?(i=t,(s=e)._state===S?T(i,s._result):s._state===x?D(i,s._result):k(s,void 0,function(t){return j(i,t)},function(t){return D(i,t)})):r===F?(D(t,F.error),F.error=null):void 0===r?T(t,e):f(r)?(n=e,o=r,u(function(e){var r=!1,t=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(o,n,function(t){r||(r=!0,n!==t?j(e,t):T(e,t))},function(t){r||(r=