33 lines
116 KiB
JavaScript
33 lines
116 KiB
JavaScript
|
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("WalletConnectSocketTransport",[],r):"object"==typeof exports?exports.WalletConnectSocketTransport=r():t.WalletConnectSocketTransport=r()}(this,(function(){return function(t){var r={};function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)n.d(e,i,function(r){return t[r]}.bind(null,i));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=27)}([function(t,r,n){"use strict";(function(t){n.d(r,"f",(function(){return s})),n.d(r,"g",(function(){return a})),n.d(r,"i",(function(){return h})),n.d(r,"h",(function(){return f})),n.d(r,"b",(function(){return c})),n.d(r,"c",(function(){return l})),n.d(r,"e",(function(){return d})),n.d(r,"d",(function(){return p})),n.d(r,"n",(function(){return m})),n.d(r,"m",(function(){return g})),n.d(r,"o",(function(){return y})),n.d(r,"z",(function(){return v})),n.d(r,"y",(function(){return w})),n.d(r,"A",(function(){return M})),n.d(r,"u",(function(){return b})),n.d(r,"t",(function(){return _})),n.d(r,"r",(function(){return O})),n.d(r,"q",(function(){return E})),n.d(r,"s",(function(){return k})),n.d(r,"p",(function(){return x})),n.d(r,"l",(function(){return T})),n.d(r,"k",(function(){return R})),n.d(r,"j",(function(){return B})),n.d(r,"w",(function(){return I})),n.d(r,"a",(function(){return j})),n.d(r,"x",(function(){return L})),n.d(r,"v",(function(){return N}));var e=n(9),i=n.n(e),o=n(24),u=n.n(o);function s(t){return new Uint8Array(t)}function a(t,r=!1){const n=t.toString("hex");return r?j(n):n}function h(t){return t.toString("utf8")}function f(t){return t.readUIntBE(0,t.length)}function c(t){return u()(t)}function l(t,r=!1){return a(c(t),r)}function d(t){return h(c(t))}function p(t){return f(c(t))}function m(r){return t.from(I(r),"hex")}function g(t){return s(m(t))}function y(t){return h(m(t))}function v(r){return t.from(r,"utf8")}function w(t){return s(v(t))}function M(t,r=!1){return a(v(t),r)}function b(t){return c(S(A(t)))}function _(t){return S(A(t))}function A(t){return C((t>>>0).toString(2))}function S(t){return new Uint8Array(P(t).map(t=>parseInt(t,2)))}function O(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}function E(r){return t.isBuffer(r)}function k(t){return i.a.strict(t)&&!E(t)}function x(t){return!k(t)&&!E(t)&&void 0!==t.byteLength}function T(t){return E(t)?"buffer":k(t)?"typed-array":x(t)?"array-buffer":Array.isArray(t)?"array":typeof t}function R(t){return function(t){return!("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}(t)?"binary":O(t)?"hex":"utf8"}function B(...r){return t.concat(r)}function P(t,r=8){const n=C(t).match(new RegExp(`.{${r}}`,"gi"));return Array.from(n||[])}function C(t,r=8,n="0"){return function(t,r,n="0"){return U(t,r,!0,n)}(t,function(t,r=8){const n=t%r;return n?(t-n)/r*r+r:t}(t.length,r),n)}function I(t){return t.replace(/^0x/,"")}function j(t){return t.startsWith("0x")?t:"0x"+t}function L(t){return(t=C(t=I(t),2))&&(t=j(t)),t}function N(t){const r=t.startsWith("0x");return t=(t=I(t)).startsWith("0")?t.substring(1):t,r?j(t):t}function U(t,r,n,e="0"){const i=r-t.length;let o=t;if(i>0){const r=e.repeat(i);o=n?r+t:t+r}return o}}).call(this,n(11).Buffer)},function(t,r,n){"use strict";n.d(r,"b",(function(){return e})),n.d(r,"d",(function(){return i})),n
|
|||
|
/*!
|
|||
|
* The buffer module from node.js, for the browser.
|
|||
|
*
|
|||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
var e=n(31),i=n(32),o=n(33);function u(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,n);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return h(this,t,r,n)}function h(t,r,n,e){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,n,e){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(e||0))throw new RangeError("'length' is out of bounds");r=void 0===n&&void 0===e?new Uint8Array(r):void 0===e?new Uint8Array(r,n):new Uint8Array(r,n,e);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=l(t,r);return t}(t,r,n,e):"string"==typeof r?function(t,r,n){"string"==typeof n&&""!==n||(n="utf8");if(!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var e=0|p(r,n),i=(t=s(t,e)).write(r,n);i!==e&&(t=t.slice(0,i));return t}(t,r,n):function(t,r){if(a.isBuffer(r)){var n=0|d(r.length);return 0===(t=s(t,n)).length||r.copy(t,0,0,n),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(e=r.length)!=e?s(t,0):l(t,r);if("Buffer"===r.type&&o(r.data))return l(t,r.data)}var e;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(f(r),t=s(t,r<0?0:0|d(r)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)t[n]=0;return t}function l(t,r){var n=r.length<0?0:0|d(r.length);t=s(t,n);for(var e=0;e<n;e+=1)t[e]=255&r[e];return t}function d(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function p(t,r){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var e=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(e)return D(t).length;r=(""+r).toLowerCase(),e=!0}}function m(t,r,n){var e=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,r,n);case"utf8":case"utf-8":return E(this,r,n);case"ascii":return k(this,r,n);case"latin1":case"binary":return x(this,r,n);case"base64":return O(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,r,n);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}function g(t,r,n){var e=t[r];t[r]=t[n],t[n]=e}function y(t,r,n,e,i){if(0===t.length)return-1;if("string"==typeof n?(e=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=a.from(r,e)),a.isBuffer(r))return 0===r.length?-1:v(t,r,n,e,i);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):v(t,[r],n,e,i);throw new TypeError("val must be string, number or Buffer")}function v(t,r,n,e,i){var o,u=1,s=t.length,a=r.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs
|
|||
|
/**
|
|||
|
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|||
|
*
|
|||
|
* @version 0.8.0
|
|||
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|||
|
* @copyright Chen, Yi-Cyuan 2015-2018
|
|||
|
* @license MIT
|
|||
|
*/!function(){"use strict";var u="input is invalid type",s="object"==typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var h=!s&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node?a=i:h&&(a=self);var f=!a.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,c=n(34),l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],m=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],y=[224,256,384,512],v=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],M={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var b=function(t,r,n){return function(e){return new L(t,r,t).update(e)[n]()}},_=function(t,r,n){return function(e,i){return new L(t,r,i).update(e)[n]()}},A=function(t,r,n){return function(r,e,i,o){return x["cshake"+t].update(r,e,i,o)[n]()}},S=function(t,r,n){return function(r,e,i,o){return x["kmac"+t].update(r,e,i,o)[n]()}},O=function(t,r,n,e){for(var i=0;i<w.length;++i){var o=w[i];t[o]=r(n,e,o)}return t},E=function(t,r){var n=b(t,r,"hex");return n.create=function(){return new L(t,r,t)},n.update=function(t){return n.create().update(t)},O(n,b,t,r)},k=[{name:"keccak",padding:[1,256,65536,16777216],bits:y,createMethod:E},{name:"sha3",padding:[6,1536,393216,100663296],bits:y,createMethod:E},{name:"shake",padding:[31,7936,2031616,520093696],bits:v,createMethod:function(t,r){var n=_(t,r,"hex");return n.create=function(n){return new L(t,r,n)},n.update=function(t,r){return n.create(r).update(t)},O(n,_,t,r)}},{name:"cshake",padding:p,bits:v,createMethod:function(t,r){var n=M[t],e=A(t,0,"hex");return e.create=function(e,i,o){return i||o?new L(t,r,e).bytepad([i,o],n):x["shake"+t].create(e)},e.update=function(t,r,n,i){return e.create(r,n,i).update(t)},O(e,A,t,r)}},{name:"kmac",padding:p,bits:v,createMethod:function(t,r){var n=M[t],e=S(t,0,"hex");return e.create=function(e,i,o){return new N(t,r,i).bytepad(["KMAC",o],n).bytepad([e],n)},e.update=function(t,r,n,i){return e.create(t,n,i).update(r)},O(e,S,t,r)}}],x={},T=[],R=0;R<k.length;++R)for(var B=k[R],P=B.bits,C=0;C<P.length;++C){var I=B.name+"_"+P[C];if(T.push(I),x[I]=B.createMethod(P[C],B.padding),"sha3"!==B.name){var j=B.name+P[C];T.push(j),x[j]=x[I]}}function L(t,r,n){this.blocks=[],this.s=[],this.padding=r,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var e=0;e<50;++e)this.s[e]=0}function N(t,r,n){L.call(this,t,r,n)}L.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(u);if(null===t)throw new Error(u);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(u);r=!0}for(var e,i,o=this.blocks,s=this.byteCount,a=t.length,h=this.blockCount,f=0,c=this.s;f<a;){if(this.reset)for(this.reset=!1,o[0]=this.block,e=1;e<h+1;++e)o[e]=0;if(r)for(e=this.start;f<a&&e<s;++f)o[e>>2]|=t[f]<<m[3&e++];else for(e=this.start;f<a&&e<s;++f)(i=t.charCodeAt(f))<128?o[e>>2]|=i<<m[3&e++]:i<2048?(o[e>>2]|=(192|i>>6)<<m[3&e++],o[e>>2]|=(128|63&i)<<m[3&e++]):i<55296||i>=57344?(o[e>>2]|=(224|i>>12)<<m[3&e++],o[e>>2]|=(128|i>>6&63)<<m[3&e++],o[e>>2]|=(128|63&i)<<m[3&e++]):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++f)),o[e>>2]|=(240|i>>18)<<m[3&e++],o[e>>2]|=(128|i>>12&63)<<m[3&e++],o[e>>2]|=(128|i>>6&63)<<m[3&e++],o[e>>2]|=(1
|
|||
|
/*! *****************************************************************************
|
|||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|||
|
this file except in compliance with the License. You may obtain a copy of the
|
|||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|||
|
|
|||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|||
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|||
|
|
|||
|
See the Apache Version 2.0 License for specific language governing permissions
|
|||
|
and limitations under the License.
|
|||
|
***************************************************************************** */
|
|||
|
var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])})(t,r)};function i(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)};function u(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(e=Object.getOwnPropertySymbols(t);i<e.length;i++)r.indexOf(e[i])<0&&(n[e[i]]=t[e[i]])}return n}function s(t,r,n,e){var i,o=arguments.length,u=o<3?r:null===e?e=Object.getOwnPropertyDescriptor(r,n):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,r,n,e);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(u=(o<3?i(u):o>3?i(r,n,u):i(r,n))||u);return o>3&&u&&Object.defineProperty(r,n,u),u}function a(t,r){return function(n,e){r(n,e,t)}}function h(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)}function f(t,r,n,e){return new(n||(n=Promise))((function(i,o){function u(t){try{a(e.next(t))}catch(t){o(t)}}function s(t){try{a(e.throw(t))}catch(t){o(t)}}function a(t){t.done?i(t.value):new n((function(r){r(t.value)})).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function c(t,r){var n,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=r.call(t,u)}catch(t){o=[6,t],e=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function l(t,r){for(var n in t)r.hasOwnProperty(n)||(r[n]=t[n])}function d(t){var r="function"==typeof Symbol&&t[Symbol.iterator],n=0;return r?r.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function p(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,o=n.call(t),u=[];try{for(;(void 0===r||r-- >0)&&!(e=o.next()).done;)u.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function m(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(p(arguments[r]));return t}function g(t){return this instanceof g?(this.v=t,this):new g(t)}function y(t,r,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=n.apply(t,r||[]),o=[];return e={},u("next"),u("throw"),u("return"),e[Symbol.asyncIterator]=function(){return this},e;function u(t){i[t]&&(e[t]=function(r){return new Promise((function(n,e){o.push([t,r,n,e])>1||s(t,r)}))})}function s(t,r){try{(n=i[t](r)).value instanceof g?Promise.resolve(n.value.v).then(a,h):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function a(t){s("next",t)}function h(t){s("throw",t)}function f(t,r){t(r),o.shift(),o.length&&s(o[0][0],o[0][1])}}function v(t){var r,n;return r={},e("next"),e("throw",(function(t){throw t})),e("return"),r[Symbol.iterator]=function(){return this},r;function e(e,i){r[e]=t[e]?function(r){return(n=!n)?{value:g(t[e](r)),done:"return"===e}:i?i(r):r}:i}}function
|
|||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|||
|
r.read=function(t,r,n,e,i){var o,u,s=8*i-e-1,a=(1<<s)-1,h=a>>1,f=-7,c=n?i-1:0,l=n?-1:1,d=t[r+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[r+c],c+=l,f-=8);for(u=o&(1<<-f)-1,o>>=-f,f+=e;f>0;u=256*u+t[r+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===a)return u?NaN:1/0*(d?-1:1);u+=Math.pow(2,e),o-=h}return(d?-1:1)*u*Math.pow(2,o-e)},r.write=function(t,r,n,e,i,o){var u,s,a,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=e?0:o-1,p=e?1:-1,m=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=f):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),(r+=u+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(u++,a/=2),u+c>=f?(s=0,u=f):u+c>=1?(s=(r*a-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;t[n+d]=255&u,d+=p,u/=256,h-=8);t[n+d-p]|=128*m}},function(t,r){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r){(function(r){t.exports=r}).call(this,{})},function(t,r,n){"use strict";(function(t){function n(){return(null==t?void 0:t.crypto)||(null==t?void 0:t.msCrypto)||{}}function e(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowserCryptoAvailable=r.getSubtleCrypto=r.getBrowerCrypto=void 0,r.getBrowerCrypto=n,r.getSubtleCrypto=e,r.isBrowserCryptoAvailable=function(){return!!n()&&!!e()}}).call(this,n(6))},function(t,r,n){"use strict";(function(t){function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function e(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowser=r.isNode=r.isReactNative=void 0,r.isReactNative=n,r.isNode=e,r.isBrowser=function(){return!n()&&!e()}}).call(this,n(8))},function(t,r,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,r,n){"use strict";var e=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(t,r){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;r=r||1;var n=t.slice(0,r),e=t.slice(r);return Array.prototype.concat.call([],o(n),o(e))}function u(t){try{return decodeURIComponent(t)}catch(i){for(var r=t.match(e),n=1;n<r.length;n++)r=(t=o(r,n).join("")).match(e);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(r){return function(t){for(var r={"%FE%FF":"<22><>","%FF%FE":"<22><>"},n=i.exec(t);n;){try{r[n[0]]=decodeURIComponent(n[0])}catch(t){var e=u(n[0]);e!==n[0]&&(r[n[0]]=e)}n=i.exec(t)}r["%C2"]="<22>";for(var o=Object.keys(r),s=0;s<o.length;s++){var a=o[s];t=t.replace(new RegExp(a,"g"),r[a])}return t}(t)}}},function(t,r,n){"use strict";t.exports=(t,r)=>{if("string"!=typeof t||"string"!=typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===r)return[t];const n=t.indexOf(r);return-1===n?[t]:[t.slice(0,n),t.slice(n+r.length)]}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(t,r){this._eventEmitters.push({event:t,callback:r})}trigger(t){let r=[];t&&(r=this._eventEmitters.filter(r=>r.event===t)),r.forEach(t=>{t.callback()})}}},function(t,r,n){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(t,r,n){"use strict";n.r(r);var e=n(22),i=n(2),o=n(23);function u(t){return Object(o.a)(t)}function s(){const t=u();return t&&t.os?t.os:void 0}function a(){const t=s();return!!t&&t.toLowerCase().includes("android")}function h(){const t=s();return!!t&&(t.toLowerCase().includes("ios")||t.to
|