33 lines
124 KiB
JavaScript
33 lines
124 KiB
JavaScript
|
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("WalletConnectIsoCrypto",[],r):"object"==typeof exports?exports.WalletConnectIsoCrypto=r():t.WalletConnectIsoCrypto=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=38)}([function(t,r,n){"use strict";n.r(r),function(t){n.d(r,"bufferToArray",(function(){return s})),n.d(r,"bufferToHex",(function(){return a})),n.d(r,"bufferToUtf8",(function(){return f})),n.d(r,"bufferToNumber",(function(){return h})),n.d(r,"bufferToBinary",(function(){return c})),n.d(r,"arrayToBuffer",(function(){return l})),n.d(r,"arrayToHex",(function(){return d})),n.d(r,"arrayToUtf8",(function(){return p})),n.d(r,"arrayToNumber",(function(){return m})),n.d(r,"arrayToBinary",(function(){return y})),n.d(r,"hexToBuffer",(function(){return g})),n.d(r,"hexToArray",(function(){return v})),n.d(r,"hexToUtf8",(function(){return w})),n.d(r,"hexToNumber",(function(){return b})),n.d(r,"hexToBinary",(function(){return M})),n.d(r,"utf8ToBuffer",(function(){return _})),n.d(r,"utf8ToArray",(function(){return A})),n.d(r,"utf8ToHex",(function(){return T})),n.d(r,"utf8ToNumber",(function(){return S})),n.d(r,"utf8ToBinary",(function(){return O})),n.d(r,"numberToBuffer",(function(){return E})),n.d(r,"numberToArray",(function(){return x})),n.d(r,"numberToHex",(function(){return B})),n.d(r,"numberToUtf8",(function(){return R})),n.d(r,"numberToBinary",(function(){return k})),n.d(r,"binaryToBuffer",(function(){return C})),n.d(r,"binaryToArray",(function(){return P})),n.d(r,"binaryToHex",(function(){return N})),n.d(r,"binaryToUtf8",(function(){return L})),n.d(r,"binaryToNumber",(function(){return I})),n.d(r,"isBinaryString",(function(){return j})),n.d(r,"isHexString",(function(){return U})),n.d(r,"isBuffer",(function(){return H})),n.d(r,"isTypedArray",(function(){return D})),n.d(r,"isArrayBuffer",(function(){return W})),n.d(r,"getType",(function(){return F})),n.d(r,"getEncoding",(function(){return Y})),n.d(r,"concatBuffers",(function(){return z})),n.d(r,"concatArrays",(function(){return q})),n.d(r,"trimLeft",(function(){return G})),n.d(r,"trimRight",(function(){return Z})),n.d(r,"calcByteLength",(function(){return $})),n.d(r,"splitBytes",(function(){return V})),n.d(r,"swapBytes",(function(){return J})),n.d(r,"swapHex",(function(){return K})),n.d(r,"sanitizeBytes",(function(){return X})),n.d(r,"padLeft",(function(){return Q})),n.d(r,"padRight",(function(){return tt})),n.d(r,"removeHexPrefix",(function(){return rt})),n.d(r,"addHexPrefix",(function(){return nt})),n.d(r,"sanitizeHex",(function(){return et})),n.d(r,"removeHexLeadingZeros",(function(){return it}));var e=n(12),i=n.n(e),o=n(33),u=n.n(o);function s(t){return new Uint8Array(t)}function a(t,r=!1){const n=t.toString("hex");return r?nt(n):n}function f(t){return t.toString("utf8")}function h(t){return t.readUIntBE(0,t.length)}function c(t){return y(s(t))}function l(t){return u()(t)}function d(t,r=!1){return a(l(t),r)}function p(t){return f(l(t))}function m(t){return h(l(t))}function y(t){return Array.from(t).map(k).join("")}function g(r){return t.from(rt(r),"hex")}function v(t){return s(g(t))}function w(t){return f(g(t))}fu
|
|||
|
/*!
|
|||
|
* The buffer module from node.js, for the browser.
|
|||
|
*
|
|||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
var e=n(43),i=n(44),o=n(45);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 f(this,t,r,n)}function f(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 h(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(h(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 W(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 B(this,r,n);case"utf8":case"utf-8":return O(this,r,n);case"ascii":return E(this,r,n);case"latin1":case"binary":return x(this,r,n);case"base64":return S(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 y(t,r,n){var e=t[r];t[r]=t[n],t[n]=e}function g(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 f=!s&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node?a=i:f&&(a=self);var h=!a.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,c=n(48),l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],m=[0,8,16,24],y=[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],g=[224,256,384,512],v=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],b={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 M=function(t,r,n){return function(e){return new I(t,r,t).update(e)[n]()}},_=function(t,r,n){return function(e,i){return new I(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]()}},T=function(t,r,n){return function(r,e,i,o){return x["kmac"+t].update(r,e,i,o)[n]()}},S=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},O=function(t,r){var n=M(t,r,"hex");return n.create=function(){return new I(t,r,t)},n.update=function(t){return n.create().update(t)},S(n,M,t,r)},E=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:O},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:O},{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 I(t,r,n)},n.update=function(t,r){return n.create(r).update(t)},S(n,_,t,r)}},{name:"cshake",padding:p,bits:v,createMethod:function(t,r){var n=b[t],e=A(t,0,"hex");return e.create=function(e,i,o){return i||o?new I(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)},S(e,A,t,r)}},{name:"kmac",padding:p,bits:v,createMethod:function(t,r){var n=b[t],e=T(t,0,"hex");return e.create=function(e,i,o){return new j(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)},S(e,T,t,r)}}],x={},B=[],R=0;R<E.length;++R)for(var k=E[R],C=k.bits,P=0;P<C.length;++P){var N=k.name+"_"+C[P];if(B.push(N),x[N]=k.createMethod(C[P],k.padding),"sha3"!==k.name){var L=k.name+C[P];B.push(L),x[L]=x[N]}}function I(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 j(t,r,n){I.call(this,t,r,n)}I.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,f=this.blockCount,h=0,c=this.s;h<a;){if(this.reset)for(this.reset=!1,o[0]=this.block,e=1;e<f+1;++e)o[e]=0;if(r)for(e=this.start;h<a&&e<s;++h)o[e>>2]|=t[h]<<m[3&e++];else for(e=this.start;h<a&&e<s;++h)(i=t.charCodeAt(h))<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(++h)),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 f(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)}function h(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 y(t){return this instanceof y?(this.v=t,this):new y(t)}function g(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 y?Promise.resolve(n.value.v).then(a,f):h(o[0][2],n)}catch(t){h(o[0][3],t)}var n}function a(t){s("next",t)}function f(t){s("throw",t)}function h(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:y(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,f=a>>1,h=-7,c=n?i-1:0,l=n?-1:1,d=t[r+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+t[r+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=e;h>0;u=256*u+t[r+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===a)return u?NaN:1/0*(d?-1:1);u+=Math.pow(2,e),o-=f}return(d?-1:1)*u*Math.pow(2,o-e)},r.write=function(t,r,n,e,i,o){var u,s,a,f=8*o-i-1,h=(1<<f)-1,c=h>>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=h):(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>=h?(s=0,u=h):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,f+=i;f>0;t[n+d]=255&u,d+=p,u/=256,f-=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){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,r){},function(t,r){(function(r){t.exports=r}).call(this,{})},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";n.r(r);var e=n(34),i=n(4),o=n(35);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 f(){const t=s();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function h(){return!!s()&&(a()||f())}function c(){const t=u();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}function l(){return!c()&&!!v()}const d=i.getFromWindow,p=i.getFromWindowOrThrow,m=i.getDocumentOrThrow,y=i.getDocument,g=i.getNavigatorOrThrow,v=i.getNavigator,w=i.getLocationOrThrow,b=i.getLocation,M=i.getCryptoOrThrow,_=i.getCrypto,A=i.getLocalStorageOrThrow,T=i.getLocalStorage;function S(){return e.getWindowMetadata()}const O=function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(r){return t}},E=function(t){return"string"==typeof t?t:JSON.stringify(t)};function x(t,r){const n=E(r),e=T();e&&e.setItem(t,n)}function B(t){let r=null,n=null;const e=T();return e&&(n=e.getItem(t)),r=n?O(n):n,r}function R(t){const r=T();r&&r.removeItem(t)}function k(t,r){const n=encodeURIComponent(t);return r.universalLink?`${r.universalLink}/wc?uri=${n}`:r.deepLink?`${r.deepLink}${r.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function C(t){const r=t.href.split("?")[0];x("WALLETCONNECT_DEEPLINK_CHOICE"
|